Project

General

Profile

Actions

Bug #520

open

Factor out verification from erase path

Added by Vincent Fazio 11 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Start date:
12/19/2023
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

Currently, flashrom_image_erase differs from flashrom_image_write in how it performs its verification.

When writes are completed, verification occurs afterwards per the verify flags specified in the flashctx argument.

    /* Verify only if we actually changed something. */
    if (verify && !all_skipped) {
        msg_cinfo("Verifying flash... ");

        /* Work around chips which need some time to calm down. */
        programmer_delay(flashctx, 1000*1000);

        if (verify_all)
            combine_image_by_layout(flashctx, newcontents, oldcontents);
        ret = verify_by_layout(flashctx, verify_layout, curcontents, newcontents);

For the erase path, there is no post-operation verification. Instead, check_erased_range is called regardless of verify flags, performing verification even if the user doesn't request it and imposing a performance penalty.

Actions

Also available in: Atom PDF