Expand description
Local APIC (Advanced Programmable Interrupt Controller) driver
Provides MMIO-based access to the Local APIC registers. The Local APIC base address is discovered via ACPI MADT and accessed through the HHDM (Higher Half Direct Map).
Constants§
- IPI_
RESCHED_ VECTOR - Vector used for cross-CPU reschedule IPIs.
- IPI_
TLB_ SHOOTDOWN_ VECTOR - Vector used for TLB shootdown IPIs.
- LVT_
TIMER_ MASKED - LVT Timer: masked (bit 16)
- LVT_
TIMER_ PERIODIC - LVT Timer: periodic mode (bit 17)
- LVT_
TIMER_ VECTOR - Dedicated Local APIC timer interrupt vector (aligned with Theseus-style setup).
- REG_ESR
- Error Status Register
- REG_
ICR_ HIGH - Interrupt Command Register (high)
- REG_
ICR_ LOW - Interrupt Command Register (low)
- REG_
LVT_ TIMER - LVT Timer Register
- REG_
TIMER_ CURRENT - Timer Current Count Register
- REG_
TIMER_ DIVIDE - Timer Divide Configuration Register
- REG_
TIMER_ INIT - Timer Initial Count Register
Functions§
- eoi
- Send End-of-Interrupt to the Local APIC
- init
- Initialize the Local APIC.
- init_ap
- Initialize per-core Local APIC state on Application Processors.
- is_
initialized - Check if the Local APIC has been initialized
- is_
present - Check if APIC is present via CPUID
- is_
x2apic_ enabled - Returns true when Local APIC is running in x2APIC mode.
- is_
x2apic_ supported - Check if x2APIC is supported via CPUID
- lapic_
id - Get the current Local APIC ID.
- lapic_
phys - Return the physical base address of the LAPIC MMIO region, or 0 if not yet initialized.
- read_
reg ⚠ - Read a Local APIC register
- send_
ipi_ raw - Send an IPI with a pre-built ICR low value to a specific APIC destination.
- send_
resched_ ipi - Send a “reschedule now” IPI to the CPU identified by
target_apic_id. - write_
reg ⚠ - Write a Local APIC register