Attention is currently required from: Aarya, Alexander Goncharov, Sam McNally.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/77747?usp=email )
Change subject: erasure_layout: Fix double invocation of erasers ......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2:
Yes that condition wouldn't be called, because iirc the erase addresses are extend d to match the bl […]
Yes, the block was erased twice, each block was erased twice. I discovered this because the test in CB:67535 is recording each invocation. I had a hypothesis that is because line #342 (in the base patch) is invoking `erasefn(flashctx, start_addr, block_len)` but the loop above already processed the area of memory from start_addr and up to start_addr+block_len.
So I tried to fix this and made this patch, with this patch erasers started being invoked only once.
When I say condition never invoked I mean condition on line #345 in patchset3.
But now I want to make sure I haven't missed anything, maybe there is some corner case? I added a test case with very irregular layout regions, but it still works :)