aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-11 23:40:21 -0500
committerIan Moffett <ian@osmora.org>2024-02-11 23:40:21 -0500
commit8ee6f7a06ce2d569805edd35a1ac79c2511b2a27 (patch)
treeb3318811da7ab7a0c5204f20d68920b5f50502ee /sys/arch/amd64/amd64
parent3ac9a53caabcb8b9f43b5e1638968c027c2c79d6 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c2
1 files changed, 2 insertions, 0 deletions
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 <vm/vm.h>
#include <vm/physseg.h>
#include <firmware/acpi/acpi.h>
+#include <sys/syslog.h>
__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 */