Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/51099 )
Change subject: lib/cbfs.c: Fix return value of failure to measure ......................................................................
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 arthur@aheymans.xyz --- M src/lib/cbfs.c 1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/51099/1
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 60dc15a..4bc6962 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -69,8 +69,9 @@ 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 @@ 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; }