From 8ee6f7a06ce2d569805edd35a1ac79c2511b2a27 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 11 Feb 2024 23:40:21 -0500 Subject: kernel/amd64: acpi: Fetch LAPIC base separate This commit creates a acpi_get_lapic_base() so we don't have to parse the MADT each time we want the Local APIC base. Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/machdep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 1194b63..07f16fc 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -41,6 +41,7 @@ #include #include #include +#include __MODULE_NAME("machdep"); __KERNEL_META("$Hyra$: machdep.c, Ian Marco Moffett, " @@ -135,6 +136,7 @@ processor_init(void) ioapic_init(); } + cur_cpu->lapic_base = acpi_get_lapic_base(); CPU_INFO_UNLOCK(cur_cpu); lapic_init(); /* Per core */ -- cgit v1.2.3