From 84b2f9f5b8e40eb9a114c1be5741b4141c5566e0 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 23 Jun 2022 11:53:34 +0200 Subject: lib/program_loaders.c: Mark run_ramstage with __noreturn This allows the compiler to optimize out code called after run_ramstage. Also remove some die() statements in soc code as run_ramstage already has a die_with_postcode statement. Change-Id: Id8b841712661d3257b0dc67b509f97bdc31fcf6f Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/65811 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Julius Werner --- src/soc/amd/cezanne/romstage.c | 1 - src/soc/amd/picasso/romstage.c | 3 --- src/soc/amd/sabrina/romstage.c | 1 - 3 files changed, 5 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/cezanne/romstage.c b/src/soc/amd/cezanne/romstage.c index 7a395bdf9b..dce0b69735 100644 --- a/src/soc/amd/cezanne/romstage.c +++ b/src/soc/amd/cezanne/romstage.c @@ -25,5 +25,4 @@ void __noreturn romstage_main(void) memmap_stash_early_dram_usage(); run_ramstage(); - die("failed to load ramstage\n"); } diff --git a/src/soc/amd/picasso/romstage.c b/src/soc/amd/picasso/romstage.c index e66f423d52..ccb11f083a 100644 --- a/src/soc/amd/picasso/romstage.c +++ b/src/soc/amd/picasso/romstage.c @@ -25,7 +25,4 @@ void __noreturn romstage_main(void) post_code(0x44); run_ramstage(); - - post_code(0x50); /* Should never see this post code. */ - die("failed to load ramstage\n"); } diff --git a/src/soc/amd/sabrina/romstage.c b/src/soc/amd/sabrina/romstage.c index c5dfbdaa18..9f2be8ee51 100644 --- a/src/soc/amd/sabrina/romstage.c +++ b/src/soc/amd/sabrina/romstage.c @@ -27,5 +27,4 @@ void __noreturn romstage_main(void) memmap_stash_early_dram_usage(); run_ramstage(); - die("failed to load ramstage\n"); } -- cgit v1.2.3