1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

flashrom: Use WP-based unlocking on opaque masters

Flashrom only tries to use WP-based unlocking if it detects that WP
operations are supported. However WP support was detected in a way that
ignored WP operations provided by opaque masters.

This stopped flashrom from automatically unlocking with some opaque
masters, particularly linux_mtd.

This commit also deletes part of a test that required the chip unlock
function to be called before read/write/erase operations because WP
unlocking is now used instead of chip unlocking.

BUG=b:280111380
BRANCH=none
TEST=Checked flashrom automatically unlocked flash on strongbad (MTD)

Change-Id: I1774ad64d82ae47cd085df6045e17e283855c01f
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/74930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
Nikolai Artemiev
2023-05-03 11:05:07 +10:00
committed by Anastasia Klimchuk
parent fc6a09ba1f
commit 00c9fac2a6
4 changed files with 3 additions and 42 deletions

View File

@ -348,7 +348,6 @@ enum blockprotect_func {
UNLOCK_LH28F008BJT,
UNLOCK_SST_FWHUB,
UNPROTECT_28SF040,
TEST_UNLOCK_INJECTOR, /* special case must come last. */
};
enum printlock_func {