summaryrefslogtreecommitdiff
path: root/sys/firmware/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/firmware/acpi')
-rw-r--r--sys/firmware/acpi/acpi_madt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/firmware/acpi/acpi_madt.c b/sys/firmware/acpi/acpi_madt.c
index 5f5d8d4..055ebd2 100644
--- a/sys/firmware/acpi/acpi_madt.c
+++ b/sys/firmware/acpi/acpi_madt.c
@@ -46,6 +46,14 @@ __KERNEL_META("$Hyra$: acpi_madt.c, Ian Marco Moffett, "
static struct acpi_madt *madt = NULL;
+void *
+acpi_get_lapic_base(void)
+{
+ if (madt == NULL)
+ return NULL;
+ return (void *)(uint64_t)madt->lapic_addr;
+}
+
static void
do_parse(struct cpu_info *ci)
{
@@ -53,7 +61,6 @@ do_parse(struct cpu_info *ci)
uint8_t *end = NULL;
void *ioapic_mmio_base = NULL;
- void *lapic_mmio_base = NULL;
struct apic_header *hdr = NULL;
struct ioapic *ioapic = NULL;
@@ -61,10 +68,6 @@ do_parse(struct cpu_info *ci)
cur = (uint8_t *)(madt + 1);
end = (uint8_t *)madt + madt->hdr.length;
- /* Init the Local APIC */
- lapic_mmio_base = (void *)(uintptr_t)madt->lapic_addr;
- ci->lapic_base = lapic_mmio_base;
-
/* Parse the rest of the MADT */
while (cur < end) {
hdr = (void *)cur;