blob: 05a75bb80f2aad161f191053695db88ec0834a13 [file] [log] [blame]
Angel Pons585495e2020-04-03 01:21:38 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Hung-Te Lin7635a602013-02-12 00:07:38 +08002
Arthur Heymans23926742022-04-06 23:17:19 +02003#include <cbmem.h>
Hung-Te Lin7635a602013-02-12 00:07:38 +08004#include <console/console.h>
Aaron Durbine4f3e7a2015-03-17 13:25:19 -05005#include <program_loading.h>
Arthur Heymans3e914d32022-04-06 22:25:50 +02006#include <romstage_common.h>
Hung-Te Lin7635a602013-02-12 00:07:38 +08007
Arthur Heymansa2bc2542021-05-29 08:10:49 +02008#if CONFIG(SEPARATE_ROMSTAGE)
Hung-Te Lin7635a602013-02-12 00:07:38 +08009void main(void)
10{
Hung-Te Lin7635a602013-02-12 00:07:38 +080011 console_init();
Arthur Heymans3e914d32022-04-06 22:25:50 +020012 romstage_main();
13}
Arthur Heymansa2bc2542021-05-29 08:10:49 +020014#endif
Arthur Heymans23926742022-04-06 23:17:19 +020015
Arthur Heymans3e914d32022-04-06 22:25:50 +020016void __noreturn romstage_main(void)
17{
Arthur Heymans23926742022-04-06 23:17:19 +020018 cbmem_initialize_empty();
Aaron Durbine4f3e7a2015-03-17 13:25:19 -050019 run_ramstage();
Hung-Te Lin7635a602013-02-12 00:07:38 +080020}