2016-01-12 23:55:28 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2014-01-26 13:41:54 +01:00
|
|
|
#include <smp/node.h>
|
2016-01-08 04:10:24 +01:00
|
|
|
#include <arch/bootblock_romcc.h>
|
2014-11-29 10:38:17 +01:00
|
|
|
#include <halt.h>
|
2010-02-24 14:58:23 +01:00
|
|
|
|
|
|
|
static void main(unsigned long bist)
|
|
|
|
{
|
|
|
|
if (boot_cpu()) {
|
2012-11-14 07:01:44 +01:00
|
|
|
bootblock_mainboard_init();
|
2011-03-08 08:50:43 +01:00
|
|
|
|
2017-06-01 19:39:59 +02:00
|
|
|
#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
|
2011-12-05 19:17:17 +01:00
|
|
|
sanitize_cmos();
|
2012-09-10 04:09:56 +02:00
|
|
|
#endif
|
2017-06-01 19:39:59 +02:00
|
|
|
#if IS_ENABLED(CONFIG_CMOS_POST)
|
2012-09-10 04:09:56 +02:00
|
|
|
cmos_post_init();
|
2011-03-08 08:50:43 +01:00
|
|
|
#endif
|
2011-12-05 19:17:17 +01:00
|
|
|
}
|
2011-03-08 08:50:43 +01:00
|
|
|
|
2017-06-01 19:39:59 +02:00
|
|
|
#if IS_ENABLED(CONFIG_VBOOT_SEPARATE_VERSTAGE)
|
2017-03-16 21:41:11 +01:00
|
|
|
const char *target1 = "fallback/verstage";
|
2015-09-29 23:31:20 +02:00
|
|
|
#else
|
2017-03-16 21:41:11 +01:00
|
|
|
const char *target1 = "fallback/romstage";
|
2015-09-29 23:31:20 +02:00
|
|
|
#endif
|
|
|
|
|
2010-02-24 14:58:23 +01:00
|
|
|
unsigned long entry;
|
|
|
|
entry = findstage(target1);
|
2017-03-17 00:01:40 +01:00
|
|
|
if (entry)
|
|
|
|
call(entry, bist);
|
2014-11-29 10:38:17 +01:00
|
|
|
halt();
|
2010-02-24 14:58:23 +01:00
|
|
|
}
|