From ff76b3643b0954ce574624e6837a5a9f5b705d68 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Sun, 3 Oct 2010 13:47:28 +0200 Subject: [PATCH] lapic pointer was not correctly initialized MADT enumeration works now on x86_64, tested on HP Compaq 6710b. --- sys/platform/pc64/x86_64/mp_machdep.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/platform/pc64/x86_64/mp_machdep.c b/sys/platform/pc64/x86_64/mp_machdep.c index 713e603b15..b7292483f8 100644 --- a/sys/platform/pc64/x86_64/mp_machdep.c +++ b/sys/platform/pc64/x86_64/mp_machdep.c @@ -588,7 +588,12 @@ mp_enable(u_int boot_addr) if (cpu_apic_address == 0) panic("mp_enable: no local apic (madt)!\n"); - bsp_apic_id = (lapic.id & 0xff000000) >> 24; + /* + * XXX: where is the best place to set lapic? + */ + lapic = pmap_mapdev_uncacheable(cpu_apic_address, sizeof(struct LAPIC)); + + bsp_apic_id = (lapic->id & 0xff000000) >> 24; if (madt_pass2(madt_paddr, bsp_apic_id)) panic("mp_enable: madt_pass2 failed\n"); } -- 2.11.4.GIT