diff options
-rw-r--r-- | Makefile.inc | 10 | ||||
-rw-r--r-- | src/drivers/vpd/Kconfig | 14 | ||||
-rw-r--r-- | util/cbfstool/default-x86.fmd | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc index bacddf2023..ae61c2ebf3 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -983,6 +983,15 @@ else FMAP_SPD_CACHE_ENTRY := endif +ifeq ($(CONFIG_VPD),y) +FMAP_VPD_BASE := $(call int-align, $(FMAP_CURRENT_BASE), 0x4000) +FMAP_VPD_SIZE := $(CONFIG_VPD_FMAP_SIZE) +FMAP_VPD_ENTRY := $(CONFIG_VPD_FMAP_NAME)@$(FMAP_VPD_BASE) $(FMAP_VPD_SIZE) +FMAP_CURRENT_BASE := $(call int-add, $(FMAP_VPD_BASE) $(FMAP_VPD_SIZE)) +else +FMAP_VPD_ENTRY := +endif + # # X86 FMAP region # @@ -1060,6 +1069,7 @@ $(obj)/fmap.fmd: $(top)/Makefile.inc $(DEFAULT_FLASHMAP) $(obj)/config.h -e "s,##MRC_CACHE_ENTRY##,$(FMAP_MRC_CACHE_ENTRY)," \ -e "s,##SMMSTORE_ENTRY##,$(FMAP_SMMSTORE_ENTRY)," \ -e "s,##SPD_CACHE_ENTRY##,$(FMAP_SPD_CACHE_ENTRY)," \ + -e "s,##VPD_ENTRY##,$(FMAP_VPD_ENTRY)," \ -e "s,##CBFS_BASE##,$(FMAP_CBFS_BASE)," \ -e "s,##CBFS_SIZE##,$(FMAP_CBFS_SIZE)," \ $(DEFAULT_FLASHMAP) > $@.tmp diff --git a/src/drivers/vpd/Kconfig b/src/drivers/vpd/Kconfig index eda9130dd4..0b16058006 100644 --- a/src/drivers/vpd/Kconfig +++ b/src/drivers/vpd/Kconfig @@ -5,3 +5,17 @@ config VPD default n help Enable support for flash based vital product data. + +config VPD_FMAP_NAME + string + depends on VPD + default "RO_VPD" + help + Name of the FMAP region created in the default FMAP to store VPD tables. + +config VPD_FMAP_SIZE + hex + depends on VPD + default 0x4000 + help + Size in bytes of the FMAP region created to store VPD tables. diff --git a/util/cbfstool/default-x86.fmd b/util/cbfstool/default-x86.fmd index 25c5096ae1..41be782046 100644 --- a/util/cbfstool/default-x86.fmd +++ b/util/cbfstool/default-x86.fmd @@ -13,6 +13,7 @@ FLASH@##ROM_BASE## ##ROM_SIZE## { ##MRC_CACHE_ENTRY## ##SMMSTORE_ENTRY## ##SPD_CACHE_ENTRY## + ##VPD_ENTRY## FMAP@##FMAP_BASE## ##FMAP_SIZE## COREBOOT(CBFS)@##CBFS_BASE## ##CBFS_SIZE## } |