system76-coreboot/src/arch/x86/init/bootblock_simple.c
Kyösti Mälkki f28dbe0c5d 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>
2011-12-24 12:10:14 +01:00

22 lines
408 B
C

#include <bootblock_common.h>
static void main(unsigned long bist)
{
if (boot_cpu()) {
bootblock_northbridge_init();
bootblock_southbridge_init();
bootblock_cpu_init();
#if CONFIG_USE_OPTION_TABLE
sanitize_cmos();
#endif
}
const char* target1 = "fallback/romstage";
unsigned long entry;
entry = findstage(target1);
if (entry) call(entry, bist);
asm volatile ("1:\n\thlt\n\tjmp 1b\n\t");
}