From b1c5bf67c267bf9624ffe854ddb367ad44753abd Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 19 Jul 2011 07:36:24 +0200 Subject: [PATCH] use a more robust method to find the MP table --- arch/x86/kernel/apic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index ba933b56..df811140 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c @@ -327,7 +327,6 @@ void smp_start(uint32_t id) } #endif -#ifndef CONFIG_MULTIBOOT static unsigned int* search_apic(unsigned int base, unsigned int limit) { uint32_t* ptr; @@ -340,7 +339,6 @@ static unsigned int* search_apic(unsigned int base, unsigned int limit) { return NULL; } -#endif #if MAX_CORES > 1 int smp_init(void) @@ -561,6 +559,13 @@ static int apic_probe(void) uint32_t i, count; int isa_bus = -1; + apic_mp = (apic_mp_t*) search_apic(0xF0000, 0x100000); + if (apic_mp) + goto found_mp; + apic_mp = (apic_mp_t*) search_apic(0x9F000, 0xA0000); + if (apic_mp) + goto found_mp; + // searching MP signature in the reserved memory areas #ifdef CONFIG_MULTIBOOT if (mb_info && (mb_info->flags & (1 << 6))) { @@ -583,13 +588,8 @@ static int apic_probe(void) mmap++; } } -found_mp: -#else - apic_mp = (apic_mp_t*) search_apic(0xF0000, 0x100000); - if (!apic_mp) - apic_mp = (apic_mp_t*) search_apic(0x9F000, 0xA0000); #endif - +found_mp: if (!apic_mp) goto no_mp;