summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2019-05-06 16:12:57 -0600
committerDuncan Laurie <dlaurie@chromium.org>2019-05-22 14:21:57 +0000
commit7006458777483291abfca790beb48f201ba74c37 (patch)
tree51b74ce035d0869dae3ef61d0f9de8e156862ae6 /src/security
parentba44a27f7fcc50677e2b0789f61fce2df8f6d620 (diff)
downloadcoreboot-7006458777483291abfca790beb48f201ba74c37.tar.xz
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/security')
-rw-r--r--src/security/vboot/vboot_logic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index d4ad32736b..626310010c 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -320,7 +320,8 @@ void verstage_main(void)
if (CONFIG(VBOOT_MEASURED_BOOT) &&
!(ctx.flags & VB2_CONTEXT_S3_RESUME)) {
if (vboot_init_crtm() != VB2_SUCCESS)
- die("Initializing measured boot mode failed!");
+ die_with_post_code(POST_INVALID_ROM,
+ "Initializing measured boot mode failed!");
}
if (get_recovery_mode_switch()) {
@@ -395,7 +396,8 @@ void verstage_main(void)
printk(BIOS_INFO, "Phase 4\n");
rv = locate_firmware(&ctx, &fw_main);
if (rv)
- die("Failed to read FMAP to locate firmware");
+ die_with_post_code(POST_INVALID_ROM,
+ "Failed to read FMAP to locate firmware");
rv = hash_body(&ctx, &fw_main);
save_if_needed(&ctx);