From bab9e2e6bdf3bbfa6047773a04632e0fbdf64afb Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 29 May 2021 07:30:33 +0200 Subject: arch/x86: Add a common romstage entry It might be possible to have this used for more than x86, but that will be for a later commit. Change-Id: I4968364a95b5c69c21d3915d302d23e6f1ca182f Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/55067 Tested-by: build bot (Jenkins) Reviewed-by: Elyes Haouas --- src/drivers/amd/agesa/romstage.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/drivers/amd/agesa') diff --git a/src/drivers/amd/agesa/romstage.c b/src/drivers/amd/agesa/romstage.c index 35b2778e68..82ef31ebd3 100644 --- a/src/drivers/amd/agesa/romstage.c +++ b/src/drivers/amd/agesa/romstage.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -31,16 +32,12 @@ static void fill_sysinfo(struct sysinfo *cb) */ static void ap_romstage_main(void); -static void romstage_main(void) +void __noreturn romstage_main(void) { struct sysinfo romstage_state; struct sysinfo *cb = &romstage_state; int cbmem_initted = 0; - timestamp_add_now(TS_ROMSTAGE_START); - - console_init(); - printk(BIOS_DEBUG, "APIC %02u: CPU Family_Model = %08x\n", initial_lapicid(), cpuid_eax(1)); @@ -79,6 +76,7 @@ static void romstage_main(void) prepare_and_run_postcar(); /* We do not return. */ + die("failed to load postcar\n"); } static void ap_romstage_main(void) @@ -96,11 +94,6 @@ static void ap_romstage_main(void) halt(); } -asmlinkage void car_stage_entry(void) -{ - romstage_main(); -} - void *cbmem_top_chipset(void) { /* Top of CBMEM is at highest usable DRAM address below 4GiB. */ -- cgit v1.2.3