aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-12-09 15:03:35 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-12-18 00:27:29 +0000
commita018234400faf1b50b0628a7fa7ea3da26beacbb (patch)
tree7ef5da4f8cc261c81389929b9c3a98d75ba5c05e /include
parent6cb1bd6fe3e698d9dc9536f50910623df48ca7b9 (diff)
downloadflashrom-a018234400faf1b50b0628a7fa7ea3da26beacbb.tar.gz
flashrom-a018234400faf1b50b0628a7fa7ea3da26beacbb.tar.bz2
flashrom-a018234400faf1b50b0628a7fa7ea3da26beacbb.zip
libflashrom: Add flags to skip unreadable and unwritable regions
Add flags to allow libflashrom users to configure how operations that include unreadable or unwritable regions should be behave. If the flags are set to true, a read/write operation will just skip the inaccessible region and will still be executed in other regions. If the flags are set to false, the inaccessible region will cause the entire operation to fail. BUG=b:260440773 BRANCH=none TEST=builds Change-Id: I9b96fb04b863625d2c9f9a00b97c35b3ddb0871b CoAuthored-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Edward O'Callaghan <quasisec@google.com> Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/70128 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/flash.h2
-rw-r--r--include/libflashrom.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index aabc785e..2ea9c864 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -530,6 +530,8 @@ struct flashrom_flashctx {
bool force_boardmismatch;
bool verify_after_write;
bool verify_whole_chip;
+ bool skip_unreadable_regions;
+ bool skip_unwritable_regions;
} flags;
/* We cache the state of the extended address register (highest byte
* of a 4BA for 3BA instructions) and the state of the 4BA mode here.
diff --git a/include/libflashrom.h b/include/libflashrom.h
index bac76c2c..490ef03b 100644
--- a/include/libflashrom.h
+++ b/include/libflashrom.h
@@ -251,6 +251,8 @@ enum flashrom_flag {
FLASHROM_FLAG_FORCE_BOARDMISMATCH,
FLASHROM_FLAG_VERIFY_AFTER_WRITE,
FLASHROM_FLAG_VERIFY_WHOLE_CHIP,
+ FLASHROM_FLAG_SKIP_UNREADABLE_REGIONS,
+ FLASHROM_FLAG_SKIP_UNWRITABLE_REGIONS,
};
/**