Abort cpu_initialize if we detect that we've lost a race.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2032 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
059182cc4f
commit
eccc357ea0
|
@ -231,6 +231,14 @@ void cpu_initialize(void)
|
||||||
die("CPU: missing cpu device structure");
|
die("CPU: missing cpu device structure");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that we haven't been passed bad information as the result of a race
|
||||||
|
// (i.e. BSP timed out while waiting for us to load secondary_stack)
|
||||||
|
|
||||||
|
if (cpu->path.u.apic.apic_id != lapicid()) {
|
||||||
|
printk_err("CPU #%d Initialization FAILED: APIC ID mismatch (%u != %u)\n",
|
||||||
|
info->index, cpu->path.u.apic.apic_id, lapicid());
|
||||||
|
// return without setting initialized flag
|
||||||
|
} else {
|
||||||
/* Find what type of cpu we are dealing with */
|
/* Find what type of cpu we are dealing with */
|
||||||
identify_cpu(cpu);
|
identify_cpu(cpu);
|
||||||
printk_debug("CPU: vendor %s device %x\n",
|
printk_debug("CPU: vendor %s device %x\n",
|
||||||
|
@ -247,6 +255,8 @@ void cpu_initialize(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
printk_info("CPU #%d Initialized\n", info->index);
|
printk_info("CPU #%d Initialized\n", info->index);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue