Julius Werner has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62656 )
Change subject: prog_loader: Change legacy_romstage_select_and_load() to return cb_err ......................................................................
prog_loader: Change legacy_romstage_select_and_load() to return cb_err
This is passing through a cb_err from cbfs_prog_stage_load(), so it should be declared to return that as well.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I5510d05953fe8c0e2cb511f01f862b66ced154ae --- M src/arch/x86/bootblock_normal.c M src/include/program_loading.h M src/lib/prog_loaders.c 3 files changed, 5 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/62656/1
diff --git a/src/arch/x86/bootblock_normal.c b/src/arch/x86/bootblock_normal.c index 9341ac3..873fb3e 100644 --- a/src/arch/x86/bootblock_normal.c +++ b/src/arch/x86/bootblock_normal.c @@ -24,8 +24,8 @@
if (do_normal_boot()) { romstage->name = boot_candidate; - if (!cbfs_prog_stage_load(romstage)) - return 0; + if (cbfs_prog_stage_load(romstage) == CB_SUCCESS) + return CB_SUCCESS; }
romstage->name = get_fallback(boot_candidate); diff --git a/src/include/program_loading.h b/src/include/program_loading.h index ba42465..7ff55fc 100644 --- a/src/include/program_loading.h +++ b/src/include/program_loading.h @@ -5,8 +5,7 @@ #include <bootmem.h> #include <commonlib/bsd/cbfs_serialized.h> #include <commonlib/region.h> -#include <stdint.h> -#include <stddef.h> +#include <types.h>
enum { /* Last segment of program. Can be used to take different actions for @@ -139,7 +138,7 @@ void run_romstage(void);
/* Runtime selector for CBFS_PREFIX of romstage. */ -int legacy_romstage_select_and_load(struct prog *romstage); +enum cb_err legacy_romstage_select_and_load(struct prog *romstage);
/************************ * RAMSTAGE LOADING * diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 878f729e..04209ff 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -27,7 +27,7 @@ timestamp_add_now(TS_START_COPYROM);
if (ENV_X86 && CONFIG(BOOTBLOCK_NORMAL)) { - if (legacy_romstage_select_and_load(&romstage)) + if (legacy_romstage_select_and_load(&romstage) != CB_SUCCESS) goto fail; } else { if (cbfs_prog_stage_load(&romstage))