Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30084
Change subject: cbfs: Alert if something goes wrong in cbfs_boot_locate() ......................................................................
cbfs: Alert if something goes wrong in cbfs_boot_locate()
Change-Id: I5a3cb41b3a7ff2aa527cc2b40c9d7438474c2f93 Signed-off-by: Nico Huber nico.huber@secunet.com --- M src/lib/cbfs.c 1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/30084/1
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 9ea7df6..a5c9f85 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -41,17 +41,23 @@ const struct region_device *boot_dev; struct cbfs_props props;
- if (cbfs_boot_region_properties(&props)) + if (cbfs_boot_region_properties(&props)) { + printk(BIOS_ALERT, "ERROR: Failed to locate boot region\n"); return -1; + }
/* All boot CBFS operations are performed using the RO device. */ boot_dev = boot_device_ro();
- if (boot_dev == NULL) + if (boot_dev == NULL) { + printk(BIOS_ALERT, "ERROR: Failed to find boot device\n"); return -1; + }
- if (rdev_chain(&rdev, boot_dev, props.offset, props.size)) + if (rdev_chain(&rdev, boot_dev, props.offset, props.size)) { + printk(BIOS_ALERT, "ERROR: Failed to access boot region inside boot device\n"); return -1; + }
return cbfs_locate(fh, &rdev, name, type); }