blob: 46c961e0ed2c73c5eb20922a9029bf5d02601173 [file] [log] [blame]
Paul Burtone8530032014-06-14 00:00:10 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Imagination Technologies
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.
Paul Burtone8530032014-06-14 00:00:10 +010015 */
16
Julius Werner86fc11d2015-10-09 13:37:58 -070017#include <arch/bootblock_common.h>
Paul Burtone8530032014-06-14 00:00:10 +010018#include <console/console.h>
Ionela Voinescu2fdc61a2015-03-09 15:31:38 +000019#include <halt.h>
Aaron Durbin7c2eb0d2015-03-30 19:47:02 -050020#include <program_loading.h>
Paul Burtone8530032014-06-14 00:00:10 +010021
22void main(void)
23{
Paul Burtone8530032014-06-14 00:00:10 +010024 bootblock_cpu_init();
Ionela Voinescu2fdc61a2015-03-09 15:31:38 +000025
26 /* Mainboard basic init */
Paul Burtone8530032014-06-14 00:00:10 +010027 bootblock_mainboard_init();
28
Martin Roth898a7752017-06-01 11:39:59 -060029#if IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)
Paul Burtone8530032014-06-14 00:00:10 +010030 console_init();
31#endif
32
Andrew Brestickerb8936ad2015-02-05 13:40:49 -080033 bootblock_mmu_init();
34
Ionela Voinescu2fdc61a2015-03-09 15:31:38 +000035 if (init_extra_hardware()) {
36 printk(BIOS_ERR, "bootblock_simple: failed to init HW.\n");
37 } else {
38 run_romstage();
39 }
40 halt();
Paul Burtone8530032014-06-14 00:00:10 +010041}