Bootblock does not need a unique boot_cpu()
[coreboot.git] / src / arch / x86 / include / bootblock_common.h
1 #include <cpu/x86/lapic/boot_cpu.c>
2
3 #ifdef CONFIG_BOOTBLOCK_CPU_INIT
4 #include CONFIG_BOOTBLOCK_CPU_INIT
5 #else
6 static void bootblock_cpu_init(void) { }
7 #endif
8 #ifdef CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
9 #include CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT
10 #else
11 static void bootblock_northbridge_init(void) { }
12 #endif
13 #ifdef CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
14 #include CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT
15 #else
16 static void bootblock_southbridge_init(void) { }
17 #endif
18
19 #include <arch/cbfs.h>
20
21 #if CONFIG_USE_OPTION_TABLE
22 #include <pc80/mc146818rtc.h>
23
24 static void sanitize_cmos(void)
25 {
26         if (cmos_error() || !cmos_chksum_valid()) {
27                 unsigned char *cmos_default = (unsigned char*)walkcbfs("cmos.default");
28                 if (cmos_default) {
29                         int i;
30                         for (i = 14; i < 128; i++) {
31                                 cmos_write(cmos_default[i], i);
32                         }
33                 }
34         }
35 }
36 #endif