blob: c10ee1f0333d94563a204b2d2388992d85b0121f [file] [log] [blame]
Stefan Reinauer52db0b92012-12-07 17:15:04 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2010 Google Inc
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 * MA 02110-1301 USA
20 */
21
Stefan Reinauer52db0b92012-12-07 17:15:04 -080022#include <bootblock_common.h>
David Hendricks3d7344a2013-01-08 21:05:06 -080023#include <arch/cbfs.h>
24#include <arch/hlt.h>
Stefan Reinauer52db0b92012-12-07 17:15:04 -080025
David Hendricks3d7344a2013-01-08 21:05:06 -080026static int boot_cpu(void)
27{
28 /*
29 * FIXME: This is a stub for now. All non-boot CPUs should be
30 * waiting for an interrupt. We could move the chunk of assembly
31 * which puts them to sleep in here...
32 */
33 return 1;
34}
Stefan Reinauer52db0b92012-12-07 17:15:04 -080035
36void main(unsigned long bist)
37{
David Hendricks3d7344a2013-01-08 21:05:06 -080038 const char *target1 = "fallback/romstage";
39 unsigned long entry;
Stefan Reinauer52db0b92012-12-07 17:15:04 -080040
41 if (boot_cpu()) {
David Hendricks3d7344a2013-01-08 21:05:06 -080042 bootblock_mainboard_init();
Stefan Reinauer52db0b92012-12-07 17:15:04 -080043 }
David Hendricks3d7344a2013-01-08 21:05:06 -080044
Stefan Reinauer52db0b92012-12-07 17:15:04 -080045 entry = findstage(target1);
David Hendricks3d7344a2013-01-08 21:05:06 -080046 if (entry) call(entry);
Stefan Reinauer52db0b92012-12-07 17:15:04 -080047
48 hlt();
49}