summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
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