1 #include <bootblock_common.h>
2 #include <pc80/mc146818rtc.h>
4 static const char *get_fallback(const char *stagelist) {
5 while (*stagelist) stagelist++;
9 static void main(unsigned long bist)
13 const char *default_filenames = "normal/romstage\0fallback/romstage";
16 bootblock_northbridge_init();
17 bootblock_southbridge_init();
20 #if CONFIG_USE_OPTION_TABLE
23 boot_mode = do_normal_boot();
26 /* Questionable single byte read from CMOS.
27 * Do not add any other CMOS access in the
28 * bootblock for AP CPUs.
30 boot_mode = last_boot_normal();
33 char *filenames = (char *)walkcbfs("coreboot-stages");
35 filenames = default_filenames;
37 char *normal_candidate = filenames;
40 entry = findstage(normal_candidate);
42 entry = findstage(get_fallback(normal_candidate));
44 if (entry) call(entry, bist);
46 /* run fallback if normal can't be found */
47 entry = findstage(get_fallback(normal_candidate));
48 if (entry) call(entry, bist);
50 /* duh. we're stuck */
51 asm volatile ("1:\n\thlt\n\tjmp 1b\n\t");