diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-02-26 14:22:47 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-03-03 08:58:48 +0000 |
commit | 27545df163033c77a37f666909c116011fd17617 (patch) | |
tree | 67a83811af53d0b682ba19ac38b89307b3564216 /src | |
parent | e8e5107b49950084ed21603223d1a42eb9131313 (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/cbfs.c | 7 |
1 files 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; } |