miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
lapic.c File Reference
Include dependency graph for lapic.c:

Functions

static void pic_disable (void)
void lapic_init (void)
 Detect, identity-map, and software-enable the local APIC.
void lapic_eoi_asm (void)
 Non-inline wrapper for lapic_eoi(), callable from assembly.
static uint64_t lapic_rdtsc (void)
void lapic_timer_isr (void *frame)
void lapic_timer_idt_install (void)
 Install the IDT entry for LAPIC_TIMER_VECTOR (48).
void lapic_timer_init (void)
 Calibrate and start the BSP LAPIC timer.
void lapic_timer_init_ap (void)
 Start the LAPIC timer on the calling AP.
void lapic_send_ipi (uint8_t target_lapic_id, uint8_t vector)
 Send a Fixed IPI to a remote CPU.
void sched_kick_isr (void *frame)

Variables

volatile uint32_tlapic_base = NULL
uint32_t lapic_bsp_timer_icr = 0
volatile uint64_t lapic_tick_count = 0
uint64_t miniOS_tsc_hz = 0
uint64_t miniOS_tsc_boot = 0

Function Documentation

◆ lapic_rdtsc()

uint64_t lapic_rdtsc ( void )
inlinestatic
Here is the caller graph for this function:

◆ lapic_timer_isr()

void lapic_timer_isr ( void * frame)
Here is the call graph for this function:

◆ pic_disable()

void pic_disable ( void )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sched_kick_isr()

void sched_kick_isr ( void * frame)

sched_kick_isr() - Scheduler-kick IPI C handler. @frame: Interrupt frame pointer (unused).

Called from sched_kick_wrapper on the remote CPU. Sends EOI before calling sched_tick() so the LAPIC can accept new interrupts while the context switch is in progress.

Here is the call graph for this function:

Variable Documentation

◆ miniOS_tsc_boot

uint64_t miniOS_tsc_boot = 0

◆ miniOS_tsc_hz

uint64_t miniOS_tsc_hz = 0