Kyösti Mälkki | 5a5c886 | 2014-01-26 14:41:54 +0200 | [diff] [blame] | 1 | #include <smp/node.h> |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 2 | #include <arch/bootblock_common.h> |
Patrick Georgi | 546953c | 2014-11-29 10:38:17 +0100 | [diff] [blame] | 3 | #include <halt.h> |
Patrick Georgi | c9fa96d | 2010-02-24 13:58:23 +0000 | [diff] [blame] | 4 | |
5 | static void main(unsigned long bist) | ||||
6 | { | ||||
7 | if (boot_cpu()) { | ||||
Kyösti Mälkki | f902248 | 2012-11-14 08:01:44 +0200 | [diff] [blame] | 8 | bootblock_mainboard_init(); |
Patrick Georgi | fab35e3 | 2011-03-08 07:50:43 +0000 | [diff] [blame] | 9 | |
10 | #if CONFIG_USE_OPTION_TABLE | ||||
Kyösti Mälkki | f28dbe0 | 2011-12-05 20:17:17 +0200 | [diff] [blame] | 11 | sanitize_cmos(); |
Patrick Georgi | fab35e3 | 2011-03-08 07:50:43 +0000 | [diff] [blame] | 12 | #endif |
Duncan Laurie | b6e97b1 | 2012-09-09 19:09:56 -0700 | [diff] [blame] | 13 | #if CONFIG_CMOS_POST |
14 | cmos_post_init(); | ||||
15 | #endif | ||||
Kyösti Mälkki | f28dbe0 | 2011-12-05 20:17:17 +0200 | [diff] [blame] | 16 | } |
Patrick Georgi | fab35e3 | 2011-03-08 07:50:43 +0000 | [diff] [blame] | 17 | |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 18 | #if CONFIG_SEPARATE_VERSTAGE |
19 | const char* target1 = "fallback/verstage"; | ||||
20 | #else | ||||
Patrick Georgi | c9fa96d | 2010-02-24 13:58:23 +0000 | [diff] [blame] | 21 | const char* target1 = "fallback/romstage"; |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 22 | #endif |
23 | |||||
Patrick Georgi | c9fa96d | 2010-02-24 13:58:23 +0000 | [diff] [blame] | 24 | unsigned long entry; |
25 | entry = findstage(target1); | ||||
26 | if (entry) call(entry, bist); | ||||
Patrick Georgi | 546953c | 2014-11-29 10:38:17 +0100 | [diff] [blame] | 27 | halt(); |
Patrick Georgi | c9fa96d | 2010-02-24 13:58:23 +0000 | [diff] [blame] | 28 | } |