use a more robust method to find the MP table
This commit is contained in:
parent
d203a070f4
commit
b1c5bf67c2
1 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue