Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 1 | /* |
| 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 Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 15 | */ |
| 16 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 17 | #include <arch/bootblock_common.h> |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 18 | #include <console/console.h> |
Ionela Voinescu | 2fdc61a | 2015-03-09 15:31:38 +0000 | [diff] [blame] | 19 | #include <halt.h> |
Aaron Durbin | 7c2eb0d | 2015-03-30 19:47:02 -0500 | [diff] [blame] | 20 | #include <program_loading.h> |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 21 | |
| 22 | void main(void) |
| 23 | { |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 24 | bootblock_cpu_init(); |
Ionela Voinescu | 2fdc61a | 2015-03-09 15:31:38 +0000 | [diff] [blame] | 25 | |
| 26 | /* Mainboard basic init */ |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 27 | bootblock_mainboard_init(); |
| 28 | |
Martin Roth | 898a775 | 2017-06-01 11:39:59 -0600 | [diff] [blame] | 29 | #if IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE) |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 30 | console_init(); |
| 31 | #endif |
| 32 | |
Andrew Bresticker | b8936ad | 2015-02-05 13:40:49 -0800 | [diff] [blame] | 33 | bootblock_mmu_init(); |
| 34 | |
Ionela Voinescu | 2fdc61a | 2015-03-09 15:31:38 +0000 | [diff] [blame] | 35 | if (init_extra_hardware()) { |
| 36 | printk(BIOS_ERR, "bootblock_simple: failed to init HW.\n"); |
| 37 | } else { |
| 38 | run_romstage(); |
| 39 | } |
| 40 | halt(); |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 41 | } |