summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-06-12 10:31:34 -0600
committerJack Rosenthal <jrosenth@chromium.org>2020-06-16 03:48:04 +0000
commitf67e376c045cd5abac54c7c858c88971ec9b2aa5 (patch)
treed7857c60f36254b124a85935910aedd0193b5b89 /host
parent7f6c50e7cc531784f29ef4018b34924083fc902c (diff)
downloadvboot-f67e376c045cd5abac54c7c858c88971ec9b2aa5.tar.gz
host/lib/flashrom: enable --fast-verify for write operations
We caused a boot-speed regression as we are currently verifying the entire flash chip after any write. Flashrom has an option --fast-verify which verifies only the region written, which is significantly faster. It also looks like this is the way mosys used to handle flashrom writes, so we can align with the old behavior this way. BUG=chromium:1091903 BRANCH=none TEST=unit tests, and boot speed regression went away (on octopus) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: If8d2288cb0c08e8644b6e05f7b174c3c21542f94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2242738 Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/flashrom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/host/lib/flashrom.c b/host/lib/flashrom.c
index 061c5b84..10a5fa8c 100644
--- a/host/lib/flashrom.c
+++ b/host/lib/flashrom.c
@@ -145,6 +145,7 @@ vb2_error_t flashrom_write(const char *programmer, const char *region,
FLASHROM_EXEC_NAME,
"-p",
programmer,
+ "--fast-verify",
"-w",
region ? "-i" : tmpfile,
region ? region_param : NULL,