summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTyler Wang <tyler.wang@quanta.corp-partner.google.com>2024-04-16 14:43:53 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-04-25 15:37:37 +0000
commit559ad55a94d28e7178836d0d7e15f0153e93891b (patch)
tree8a35ef31d7a0498447a5899d74deaffc5af491b8 /tests
parent8d37942483f62f75f95956deee9af23bab9c645d (diff)
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 GPR0 settings. It 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) > ifdtool -p mtl -E image-unlocked.bin -O image-lock.bin ... Value at GPRD offset (64) is 0x83220004 --------- GPR0 Protected Range -------------- Start address = 0x00004000 End address = 0x00322fff ... GPR0 protection is now enabled (2) > ifdtool -p mtl -c image-unlocked.bin GPR0 status: Disabled Value at GPRD offset (64) is 0x00000000 --------- GPR0 Protected Range -------------- Start address = 0x00000000 End address = 0x00000fff (3) > ifdtool -p mtl -c image-lock.bin GPR0 status: Enabled Value at GPRD offset (64) is 0x83220004 --------- GPR0 Protected Range -------------- Start address = 0x00004000 End address = 0x00322fff Change-Id: I6b3af973be784200b965a68e5f6b7737cba03ed7 Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81928 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Reka Norman <rekanorman@chromium.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions