I think the existing flag should be extended to skip verify for erase as well. As you observe, erase is basically a special case of write that writes the blank value to the chip. Since you can't do a combination of erase and write in a single invocation, there's no reason to make a new flag because there's no need to indicate which of multiple operations should be verified.

On Fri, Mar 1, 2024 at 8:39 PM Anastasia Klimchuk <aklm@chromium.org> wrote:
Hello everyone,

I want to bring into discussion a topic of verification of chip
content which is performed after write or erase operations.
Also for context prior discussion in this ticket:
https://ticket.coreboot.org/issues/520

Currently we have a flag `-n` or `dont_verify_it` which is false by
default. What the flag is doing is deciding whether verification needs
to be performed after writing. The flag is false by default, so by
default verification is happening after writing (which makes sense).

Now the flag is only controlling write operation, and has no effect on
erase operation. So for erase, the flag is ignored and verification is
performed always. Just for context, it has always been like this.

So for write operation we have a power option to say "ignore
verification", and since it's false by default, the idea is, if you
set it true then you know what you are doing.
There is no such option for erase which seems a bit unfair.

The two potential options to introduce equivalent option for erase are:

1) Add new flag `dont_verify_erase` (or some similar name)

As a support for this option, it does not affect any existing use
cases/scripts, and can be added any time.

2) Add coverage for erase operation under existing flag `-n` or `dont_verify_it`

As a support for this option, erase operation can be seen as a variant
of writing, since it does modify content of the chip, and so the fact
it's not covered by the existing flag can be treated as a bug.

What do people think about it?

--
Anastasia.
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-leave@flashrom.org