Attention is currently required from: David Wu, Krishna P Bhat D, Reka Norman, Stefan Reinauer, Subrata Banik, Tyler Wang.

Tyler Wang uploaded patch set #8 to this change.

View Change

The following approvals got outdated and were removed: Verified+1 by build bot (Jenkins)

util/ifdtool: Add support for checking GPR0 status

This patch adds support for the new command-line option `-c` to
the ifdtool, which is able to check GPR0(Global Protected Range) status.

This patch also add helper function get_enabled_gprd() to get enabled
settings. It's used in enable_gpr0() and is_gpr0_protected().

Developers can use ifdtool with '-c' option to check whether GPR0 is set to
enabled or disabled in the binary file.

BUG=none
TEST=(1) Run `ifdtool -p mtl -c image.bin` on a locked image:
GPR0 status: Enabled

(2) Run `ifdtool -p mtl -c unlock_image.bin` on a unlocked image:
GPR0 status: Disabled

(3) Run `ifdtool -p mtl -E image-unlocked.bin -O image_lock.bin`

Change-Id: I6b3af973be784200b965a68e5f6b7737cba03ed7
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
---
M util/ifdtool/ifdtool.c
1 file changed, 58 insertions(+), 16 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/81928/8

To view, visit change 81928. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I6b3af973be784200b965a68e5f6b7737cba03ed7
Gerrit-Change-Number: 81928
Gerrit-PatchSet: 8
Gerrit-Owner: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Gerrit-Reviewer: David Wu <david_wu@quanta.corp-partner.google.com>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Gerrit-Reviewer: Reka Norman <rekanorman@google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: Subrata Banik <subratabanik@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Reka Norman <rekanorman@chromium.org>
Gerrit-Attention: Reka Norman <rekanorman@google.com>
Gerrit-Attention: David Wu <david_wu@quanta.corp-partner.google.com>
Gerrit-Attention: Subrata Banik <subratabanik@google.com>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Attention: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Gerrit-Attention: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Gerrit-MessageType: newpatchset