Angel Pons | 585495e | 2020-04-03 01:21:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 2 | |
Arthur Heymans | 2392674 | 2022-04-06 23:17:19 +0200 | [diff] [blame] | 3 | #include <cbmem.h> |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 4 | #include <console/console.h> |
Aaron Durbin | e4f3e7a | 2015-03-17 13:25:19 -0500 | [diff] [blame] | 5 | #include <program_loading.h> |
Arthur Heymans | 3e914d3 | 2022-04-06 22:25:50 +0200 | [diff] [blame] | 6 | #include <romstage_common.h> |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 7 | |
Arthur Heymans | a2bc254 | 2021-05-29 08:10:49 +0200 | [diff] [blame^] | 8 | #if CONFIG(SEPARATE_ROMSTAGE) |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 9 | void main(void) |
10 | { | ||||
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 11 | console_init(); |
Arthur Heymans | 3e914d3 | 2022-04-06 22:25:50 +0200 | [diff] [blame] | 12 | romstage_main(); |
13 | } | ||||
Arthur Heymans | a2bc254 | 2021-05-29 08:10:49 +0200 | [diff] [blame^] | 14 | #endif |
Arthur Heymans | 2392674 | 2022-04-06 23:17:19 +0200 | [diff] [blame] | 15 | |
Arthur Heymans | 3e914d3 | 2022-04-06 22:25:50 +0200 | [diff] [blame] | 16 | void __noreturn romstage_main(void) |
17 | { | ||||
Arthur Heymans | 2392674 | 2022-04-06 23:17:19 +0200 | [diff] [blame] | 18 | cbmem_initialize_empty(); |
Aaron Durbin | e4f3e7a | 2015-03-17 13:25:19 -0500 | [diff] [blame] | 19 | run_ramstage(); |
Hung-Te Lin | 7635a60 | 2013-02-12 00:07:38 +0800 | [diff] [blame] | 20 | } |