blob: 4bff360a08fb02ad8228575d96ecf6308179bdb0 [file] [log] [blame]
Kyösti Mälkki5a5c8862014-01-26 14:41:54 +02001#include <smp/node.h>
Julius Werner86fc11d2015-10-09 13:37:58 -07002#include <arch/bootblock_common.h>
Patrick Georgi546953c2014-11-29 10:38:17 +01003#include <halt.h>
Patrick Georgic9fa96d2010-02-24 13:58:23 +00004
5static void main(unsigned long bist)
6{
7 if (boot_cpu()) {
Kyösti Mälkkif9022482012-11-14 08:01:44 +02008 bootblock_mainboard_init();
Patrick Georgifab35e32011-03-08 07:50:43 +00009
10#if CONFIG_USE_OPTION_TABLE
Kyösti Mälkkif28dbe02011-12-05 20:17:17 +020011 sanitize_cmos();
Patrick Georgifab35e32011-03-08 07:50:43 +000012#endif
Duncan Laurieb6e97b12012-09-09 19:09:56 -070013#if CONFIG_CMOS_POST
14 cmos_post_init();
15#endif
Kyösti Mälkkif28dbe02011-12-05 20:17:17 +020016 }
Patrick Georgifab35e32011-03-08 07:50:43 +000017
Aaron Durbin75c51d92015-09-29 16:31:20 -050018#if CONFIG_SEPARATE_VERSTAGE
19 const char* target1 = "fallback/verstage";
20#else
Patrick Georgic9fa96d2010-02-24 13:58:23 +000021 const char* target1 = "fallback/romstage";
Aaron Durbin75c51d92015-09-29 16:31:20 -050022#endif
23
Patrick Georgic9fa96d2010-02-24 13:58:23 +000024 unsigned long entry;
25 entry = findstage(target1);
26 if (entry) call(entry, bist);
Patrick Georgi546953c2014-11-29 10:38:17 +010027 halt();
Patrick Georgic9fa96d2010-02-24 13:58:23 +000028}