summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2023-01-26 10:38:11 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2023-01-30 00:42:47 +0000
commiteabd3bab1c8ea9c272a82f4f865777b27089d820 (patch)
tree5006bf79ff24b87a11b18ad06f94027ced384632 /flashrom.c
parentbc712deaceba5c7ea8ff2086595f029739cb0921 (diff)
downloadflashrom-eabd3bab1c8ea9c272a82f4f865777b27089d820.tar.gz
flashrom-eabd3bab1c8ea9c272a82f4f865777b27089d820.tar.bz2
flashrom-eabd3bab1c8ea9c272a82f4f865777b27089d820.zip
flashrom.c: Fix skip flag typo in read_flash()
Only picked up by internal test infra in ChromeOS when instrumenting futility(1). The following error was incured, ``` >> Starting firmware updater. >> Target image: images/bios-kindred.ro-12672-141-0.rw-12672-141-0.bin (RO:Google_Kindred.12672.141.0, RW/A:Google_Kindred.12672.141.0, RW/B:Google_Kindred.12672.141.0). INFO: update_firmware: Loading current system firmware... INFO: load_system_firmware: flashrom -r <IMAGE> -p host Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed. New value is 0x8b. At least some flash regions are read protected. You have to use a flash layout and include only accessible regions. For write operations, you'll additionally need the --noverify-all switch. See manpage for more details. read_flash: cannot read inside Management Engine region (0x001000..0x3fffff). Read operation failed! ERROR: do_update: Cannot load system active firmware. ``` despite the appropriate flag being set within futility(1). BUG=b:266748702 TEST=cros fw updates. Change-Id: Ie04cd62020ca29775fc66a81d2fadd32a5aab5cd Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/72454 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index e4f218ecc..3e214163e 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -573,7 +573,7 @@ int read_flash(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigne
uint8_t *rbuf = buf + addr - start;
if (region.read_prot) {
- if (flash->flags.skip_unwritable_regions) {
+ if (flash->flags.skip_unreadable_regions) {
msg_gdbg("%s: cannot read inside %s region (%#08x..%#08x), "
"filling (%#08x..%#08x) with erased value instead.\n",
__func__, region.name, region.start, region.end - 1,