summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-08-16 17:42:57 -0600
committerRaul Rangel <rrangel@chromium.org>2022-10-26 16:00:54 +0000
commitd1130b7ec0c2e651317015d54b9dc726fb760924 (patch)
tree325266fce9ef881922adb2a9db9e7462c6f3e96e /src/soc/amd/common
parent0a0e7514bb2253e8c4ce2ba033517000c8078bd4 (diff)
soc/amd/mendocino: Add GSVCD range
Add region/range of SPI ROM to be verified by Google Security Chip (GSC). BUG=b:227809919 TEST=Build and boot to OS in Skyrim with CBFS verification enabled. Change-Id: If8a766d9a7ef26f94e3ab002a9384ba9d444dd1f Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66945 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/Makefile.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc
index c8e9d0df4a..63ee773ddd 100644
--- a/src/soc/amd/common/Makefile.inc
+++ b/src/soc/amd/common/Makefile.inc
@@ -28,6 +28,18 @@ endif # ifeq ($(CONFIG_RESET_VECTOR_IN_RAM),y)
ifeq ($(CONFIG_VBOOT_GSCVD),y)
build_complete:: $(AMDFWREAD)
+
+amdfwread-offset-size-cmd = $(AMDFWREAD) --ro-list $(obj)/coreboot.rom | \
+ awk --non-decimal-data '/$(1)/ {printf "%x:%x", $$3, $$4}'
+
+amdfwread-range-cmd = $(shell ( \
+ range=$$($(call amdfwread-offset-size-cmd,$(1))) ;\
+ if [ -n "$$range" ]; then \
+ printf $$range ;\
+ else \
+ printf "error" ;\
+ fi ;\
+))
endif # ifeq ($(CONFIG_VBOOT_GSCVD),y)
endif