diff options
author | Keith Short <keithshort@chromium.org> | 2019-05-06 16:12:57 -0600 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2019-05-22 14:21:57 +0000 |
commit | 7006458777483291abfca790beb48f201ba74c37 (patch) | |
tree | 51b74ce035d0869dae3ef61d0f9de8e156862ae6 /src/lib | |
parent | ba44a27f7fcc50677e2b0789f61fce2df8f6d620 (diff) |
post_code: add post code for failure to load next stage
Add a new post code, POST_INVALID_ROM, used when coreboot fails to
locate or validate a resource that is stored in ROM.
BUG=b:124401932
BRANCH=sarien
TEST=build coreboot for sarien and arcada platforms
Change-Id: Ie6de6590595d8fcdc57ad156237fffa03d5ead38
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32770
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/prog_loaders.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 3b77712550..a21663fc0f 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -69,7 +69,8 @@ void run_romstage(void) fail: if (CONFIG(BOOTBLOCK_CONSOLE)) - die("Couldn't load romstage.\n"); + die_with_post_code(POST_INVALID_ROM, + "Couldn't load romstage.\n"); halt(); } @@ -162,7 +163,7 @@ void run_ramstage(void) prog_run(&ramstage); fail: - die("Ramstage was not loaded!\n"); + die_with_post_code(POST_INVALID_ROM, "Ramstage was not loaded!\n"); } #ifdef __RAMSTAGE__ // gc-sections should take care of this @@ -195,13 +196,14 @@ void payload_load(void) break; } /* else fall-through */ default: - die("Unsupported payload type.\n"); + die_with_post_code(POST_INVALID_ROM, + "Unsupported payload type.\n"); break; } out: if (prog_entry(payload) == NULL) - die("Payload not loaded.\n"); + die_with_post_code(POST_INVALID_ROM, "Payload not loaded.\n"); } void payload_run(void) |