coreboot-kgpe-d16/util/ifdtool
Subrata Banik 2820d2a327 util/ifdtool: Refactor GPR0 Unlock Implemetation
This patch refactors GPR0 unlock function to add few important
logic as below
1. Perform GPR0 unlock if GPR0 is locked.
2. While unlocking dump the GPRD PCH strap details
3. Additionally, print the GPR start and end range if GPR0
   protection is enabled.

TEST=Able to test GPR0 protection on google/rex and google/yahiko.

Exp 1: Trying to unlock GPR0 protection for a locked image

> ifdtool  -p mtl -g image.bin -O image.bin_unlock
File image.bin is 33554432 bytes
Value at GPRD offset (64) is 0x83220004
--------- GPR0 Protected Range --------------
Start address = 0x00004000
End address = 0x00322fff
Writing new image to image.bin_unlock

Exp 2: Trying to unlock GPR0 protection for a unlocked image

> ifdtool  -p mtl -g image.bin_unlock -O image.bin_unlock

File image.bin_unlock is 33554432 bytes
GPR0 protection is already disabled

Change-Id: Id35ebdefe83182ad7a3e735bdd2998baa0ec3ed7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80216
Reviewed-by: YH Lin <yueherngl@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-01-27 06:43:57 +00:00
..
.gitignore
Makefile util: Rename Makefiles from .inc to .mk 2024-01-26 12:43:18 +00:00
Makefile.mk util: Rename Makefiles from .inc to .mk 2024-01-26 12:43:18 +00:00
description.md
ifdtool.c util/ifdtool: Refactor GPR0 Unlock Implemetation 2024-01-27 06:43:57 +00:00
ifdtool.h util/ifdtool: Add support for Intel 800 series chipset 2023-05-27 04:01:45 +00:00