Move cmos.default handling to bootblock
[coreboot.git] / src / arch / x86 / init / bootblock_normal.c
1 #include <bootblock_common.h>
2 #include <pc80/mc146818rtc.h>
3
4 static void main(unsigned long bist)
5 {
6         if (boot_cpu()) {
7                 bootblock_northbridge_init();
8                 bootblock_southbridge_init();
9         }
10
11 #if CONFIG_USE_OPTION_TABLE
12         sanitize_cmos();
13 #endif
14
15         unsigned long entry;
16         if (do_normal_boot())
17                 entry = findstage("normal/romstage");
18         else
19                 entry = findstage("fallback/romstage");
20
21         if (entry) call(entry, bist);
22
23         /* run fallback if normal can't be found */
24         entry = findstage("fallback/romstage");
25         if (entry) call(entry, bist);
26
27         /* duh. we're stuck */
28         asm volatile ("1:\n\thlt\n\tjmp 1b\n\t");
29 }
30