Carly Zlabek has uploaded this change for review.
erasure_layout: Remove redundant `verify_range` call from `erase_write`
Previously, verification would be unconditionally completed at the end
of `erase_write` with the non-legacy erase path.
Verification is already handled when writing and erasing chip data; in
`flashrom_image_write` based on `flashctx` options, and in the erase
loop of `erase_write` via `check_erased_range` calls, respectively.
This unnecessary verification added a performance penalty that was not
present with the legacy implementation.
Now, this call to `verify_range` has been removed to improve performance
and more closely reflect the verification done with the legacy path.
This change was tested using the linux_spi programmer to erase and write
to an MT25QL512 chip.
Change-Id: I638835facd9311979c4991cc4ca41a4b9e174bd5
Signed-off-by: Carly Zlabek <carlyzlabek@gmail.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
M erasure_layout.c
1 file changed, 0 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/24/79324/1
diff --git a/erasure_layout.c b/erasure_layout.c
index 0c31911..febfde1 100644
--- a/erasure_layout.c
+++ b/erasure_layout.c
@@ -385,13 +385,6 @@
*all_skipped = false;
}
- // verify write
- ret = verify_range(flashctx, newcontents + region_start, region_start, region_end - region_start);
- if (ret) {
- msg_cerr("Verifying flash. Write failed for range %#"PRIx32" : %#"PRIx32", Abort.\n",
- region_start, region_end);
- goto _end;
- }
_end:
memcpy(newcontents + region_start, old_start_buf, old_start - region_start);
To view, visit change 79324. To unsubscribe, or for help writing mail filters, visit settings.