From 27545df163033c77a37f666909c116011fd17617 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 26 Feb 2021 14:22:47 +0100 Subject: lib/cbfs.c: Fix return value of failure to measure Returning an error on a failure to measure makes the system not bootable. Change-Id: Ifd20e543d3b30de045c0656eccdcc494c2fb10ce Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/51099 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner Reviewed-by: Christian Walter --- src/lib/cbfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 60dc15a7cb..4bc6962562 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -69,8 +69,9 @@ cb_err_t cbfs_boot_lookup(const char *name, bool force_ro, if (rdev_chain(rdev, &cbd->rdev, data_offset, be32toh(mdata->h.len))) return CB_ERR; - if (tspi_measure_cbfs_hook(rdev, name, be32toh(mdata->h.type))) - return CB_ERR; + if (tspi_measure_cbfs_hook(rdev, name, be32toh(mdata->h.type))) { + printk(BIOS_ERR, "CBFS ERROR: error when measuring '%s'\n", name); + } return CB_SUCCESS; } @@ -144,7 +145,7 @@ int cbfs_locate_file_in_region(struct cbfsf *fh, const char *region_name, ret = cbfs_locate(fh, &rdev, name, type); if (!ret) if (tspi_measure_cbfs_hook(&rdev, name, *type)) - return -1; + LOG("error measuring %s in region %s\n", name, region_name); return ret; } -- cgit v1.2.3