UPSTREAM: erasure_layout: Fix unaligned region end offset by 1
In the case when layout region is not aligned with eraseblock,
end region boundary is extended to match the eraseblock. There is
a special handling of this extended area (between original end of
region and extended one). Fix the offset of this extended area by +1
so that it covers the extended area and not the original region.
Before the patch, the last byte of the original region was failed to
write since it was treated as if an extended area, while it was the
last byte of the normal layout region.
(cherry picked from commit 48b9ece5ad011573eddadc09d6854fc1b82c5cd0)
Original-Ticket: https://ticket.coreboot.org/issues/494
Original-Change-Id: I7f78a0090065cd2a952cba1a5d28179483ba4c55
Original-Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/78984
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Peter Marheine <pmarheine@chromium.org>
GitOrigin-RevId: 48b9ece5ad011573eddadc09d6854fc1b82c5cd0
Change-Id: Iec04acc4aa479d7d8ab2cc34fb081533c0f370d3
Signed-off-by: chromeos-ci-prod <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/5198246
Commit-Queue: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
1 file changed