diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index a5136f2312ba..62f5e63c3aac 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -316,18 +316,20 @@ mptable_probe_cpus(void) static int mptable_setup_local(void) { + vm_paddr_t addr; /* Is this a pre-defined config? */ printf("MPTable: <"); if (mpfps->config_type != 0) { - lapic_init(DEFAULT_APIC_BASE); + addr = DEFAULT_APIC_BASE; printf("Default Configuration %d", mpfps->config_type); } else { - lapic_init(mpct->apic_address); + addr = mpct->apic_address; printf("%.*s %.*s", (int)sizeof(mpct->oem_id), mpct->oem_id, (int)sizeof(mpct->product_id), mpct->product_id); } printf(">\n"); + lapic_init(addr); return (0); } diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 5cfe1661c237..5faf7c05577f 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -321,18 +321,20 @@ mptable_probe_cpus(void) static int mptable_setup_local(void) { + vm_paddr_t addr; /* Is this a pre-defined config? */ printf("MPTable: <"); if (mpfps->config_type != 0) { - lapic_init(DEFAULT_APIC_BASE); + addr = DEFAULT_APIC_BASE; printf("Default Configuration %d", mpfps->config_type); } else { - lapic_init(mpct->apic_address); + addr = mpct->apic_address; printf("%.*s %.*s", (int)sizeof(mpct->oem_id), mpct->oem_id, (int)sizeof(mpct->product_id), mpct->product_id); } printf(">\n"); + lapic_init(addr); return (0); }