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