|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
#include <miniOS/arch/x86_64/apic.h>#include <miniOS/arch/x86_64/port.h>#include <miniOS/arch/x86_64/irq.h>#include <miniOS/arch/x86_64/segment.h>#include <miniOS/arch/x86_64/smp.h>#include <miniOS/mm/vmm.h>#include <miniOS/io.h>#include <miniOS/sched/sched.h>
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_t * | lapic_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 |
|
inlinestatic |

| void lapic_timer_isr | ( | void * | frame | ) |

|
static |


| 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.

| uint64_t miniOS_tsc_boot = 0 |
| uint64_t miniOS_tsc_hz = 0 |