Only BSP CPU writes CMOS in bootblock code
CMOS accesses are not safe for multi-processor and only the BSP CPU should count reboots and test CMOS sanity. A questionable single byte CMOS read access from AP CPUs remains. AP CPUs should always select the same romstage prefix as BSP CPU. Change-Id: I29118e33c07c0080c94abb90f703e38312c72432 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/446 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
f42fdabe65
commit
f28dbe0c5d
|
@ -3,18 +3,28 @@
|
||||||
|
|
||||||
static void main(unsigned long bist)
|
static void main(unsigned long bist)
|
||||||
{
|
{
|
||||||
|
unsigned long entry;
|
||||||
|
int boot_mode;
|
||||||
|
|
||||||
if (boot_cpu()) {
|
if (boot_cpu()) {
|
||||||
bootblock_northbridge_init();
|
bootblock_northbridge_init();
|
||||||
bootblock_southbridge_init();
|
bootblock_southbridge_init();
|
||||||
bootblock_cpu_init();
|
bootblock_cpu_init();
|
||||||
}
|
|
||||||
|
|
||||||
#if CONFIG_USE_OPTION_TABLE
|
#if CONFIG_USE_OPTION_TABLE
|
||||||
sanitize_cmos();
|
sanitize_cmos();
|
||||||
#endif
|
#endif
|
||||||
|
boot_mode = do_normal_boot();
|
||||||
|
} else {
|
||||||
|
|
||||||
unsigned long entry;
|
/* Questionable single byte read from CMOS.
|
||||||
if (do_normal_boot())
|
* Do not add any other CMOS access in the
|
||||||
|
* bootblock for AP CPUs.
|
||||||
|
*/
|
||||||
|
boot_mode = last_boot_normal();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (boot_mode)
|
||||||
entry = findstage("normal/romstage");
|
entry = findstage("normal/romstage");
|
||||||
else
|
else
|
||||||
entry = findstage("fallback/romstage");
|
entry = findstage("fallback/romstage");
|
||||||
|
|
|
@ -6,11 +6,11 @@ static void main(unsigned long bist)
|
||||||
bootblock_northbridge_init();
|
bootblock_northbridge_init();
|
||||||
bootblock_southbridge_init();
|
bootblock_southbridge_init();
|
||||||
bootblock_cpu_init();
|
bootblock_cpu_init();
|
||||||
}
|
|
||||||
|
|
||||||
#if CONFIG_USE_OPTION_TABLE
|
#if CONFIG_USE_OPTION_TABLE
|
||||||
sanitize_cmos();
|
sanitize_cmos();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
const char* target1 = "fallback/romstage";
|
const char* target1 = "fallback/romstage";
|
||||||
unsigned long entry;
|
unsigned long entry;
|
||||||
|
|
Loading…
Reference in New Issue