2012-12-08 02:15:04 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Google Inc
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
|
|
* MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <bootblock_common.h>
|
2013-01-09 06:05:06 +01:00
|
|
|
#include <arch/cbfs.h>
|
|
|
|
#include <arch/hlt.h>
|
2012-12-08 02:15:04 +01:00
|
|
|
|
2013-01-09 06:05:06 +01:00
|
|
|
static int boot_cpu(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* FIXME: This is a stub for now. All non-boot CPUs should be
|
|
|
|
* waiting for an interrupt. We could move the chunk of assembly
|
|
|
|
* which puts them to sleep in here...
|
|
|
|
*/
|
|
|
|
return 1;
|
|
|
|
}
|
2012-12-08 02:15:04 +01:00
|
|
|
|
|
|
|
void main(unsigned long bist)
|
|
|
|
{
|
2013-01-09 06:05:06 +01:00
|
|
|
const char *target1 = "fallback/romstage";
|
|
|
|
unsigned long entry;
|
2012-12-08 02:15:04 +01:00
|
|
|
|
|
|
|
if (boot_cpu()) {
|
2013-01-09 06:05:06 +01:00
|
|
|
bootblock_mainboard_init();
|
2013-01-18 00:07:35 +01:00
|
|
|
bootblock_cpu_init();
|
2012-12-08 02:15:04 +01:00
|
|
|
}
|
2013-01-09 06:05:06 +01:00
|
|
|
|
2012-12-08 02:15:04 +01:00
|
|
|
entry = findstage(target1);
|
2013-01-09 06:05:06 +01:00
|
|
|
if (entry) call(entry);
|
2012-12-08 02:15:04 +01:00
|
|
|
|
|
|
|
hlt();
|
|
|
|
}
|