Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76167?usp=email )
Change subject: Makefile.inc: relocate get_fmap_value() here from soc/intel/common/block/cse ......................................................................
Makefile.inc: relocate get_fmap_value() here from soc/intel/common/block/cse
Move this function to the root Makefile.inc since other Makefiles use the exact same function call. Will allow for deduplication in AMD SoC Makefiles in a follow-on commit.
Change-Id: I56a50e21b27a4cd6ce1a08a3aea338c63322a6b2 Signed-off-by: Matt DeVillier matt.devillier@amd.corp-partner.google.com --- M Makefile.inc M src/soc/intel/common/block/cse/Makefile.inc 2 files changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/76167/1
diff --git a/Makefile.inc b/Makefile.inc index ab57abd..9a34c61 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -146,6 +146,7 @@ # tolower: returns the value in all lowercase # toupper: returns the value in all uppercase # ws_to_under: returns the value with any whitespace changed to underscores +# get_fmap_value returns the value of a given FMAP field from fmap_config.h _toint=$(shell printf "%d" $1) _tohex=$(shell printf 0x"%x" $1) _int-add2=$(shell expr $(call _toint,$1) + $(call _toint,$2)) @@ -165,6 +166,7 @@ tolower=$(shell echo '$1' | tr '[:upper:]' '[:lower:]') toupper=$(shell echo '$1' | tr '[:lower:]' '[:upper:]') ws_to_under=$(shell echo '$1' | tr ' \t' '_') +get_fmap_value=$(shell awk '$$2 == "$1" {print $$3}' $(obj)/fmap_config.h)
####################################################################### # Helper functions for ramstage postprocess diff --git a/src/soc/intel/common/block/cse/Makefile.inc b/src/soc/intel/common/block/cse/Makefile.inc index 3e11279..ad15dc4 100644 --- a/src/soc/intel/common/block/cse/Makefile.inc +++ b/src/soc/intel/common/block/cse/Makefile.inc @@ -24,7 +24,6 @@ CSE_FPT_INPUT=$(call cse_input_path,$(CONFIG_CSE_FPT_FILE)) CSE_DATA_INPUT=$(call cse_input_path,$(CONFIG_CSE_DATA_FILE))
-get_fmap_value=$(shell awk '$$2 == "$1" {print $$3}' $(obj)/fmap_config.h) get_cse_region_offset=$(call int-subtract,$(call get_fmap_value,$(1)) $(CSE_LAYOUT_OFFSET))
CSE_LAYOUT_OFFSET=$(call get_fmap_value,FMAP_SECTION_CSE_LAYOUT_START)