Shuo Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86638?usp=email )
Change subject: Kconfig: Add OVERRIDE_CBFS_MMAP_WINDOW ......................................................................
Kconfig: Add OVERRIDE_CBFS_MMAP_WINDOW
cbfstool by default uses an mmap window of $CONFIG_ROM_SIZE-16M: 4G-16M:16M (flash-base:mmio-base:size), which only allows coreboot owned flash region size smaller than 16MB.
Select OVERRIDE_CBFS_MMAP_WINDOW if the default behavior needs to be changed, where cbfstool add commands will be used with extra options to specify a customized mmap window setting, by --mmap $(CONFIG_MMAP_FLASH_BASE):$(CONFIG_MMAP_MMIO_BASE): $(CONFIG_MMAP_SIZE)
The usages could be various, e.g. it helps if a mainboard target uses a coreboot owned flash region larger than 16MB.
Change-Id: I5f049ef62893c254cef274521324a3b90c6ff70d Signed-off-by: Shuo Liu shuo.liu@intel.com --- M Makefile.mk M src/Kconfig M src/arch/x86/Makefile.mk 3 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/86638/1
diff --git a/Makefile.mk b/Makefile.mk index 0542aef..d9ed443 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -983,6 +983,10 @@ cbfs-autogen-attributes=-g endif
+ifeq ($(CONFIG_OVERRIDE_CBFS_MMAP_WINDOW),y) + cbfs-mmap-win=--mmap $(CONFIG_MMAP_FLASH_BASE):$(CONFIG_MMAP_MMIO_BASE):$(CONFIG_MMAP_SIZE) +endif + # cbfs-add-cmd-for-region # $(call cbfs-add-cmd-for-region,file in extract_nth format,region name) # @@ -999,6 +1003,7 @@ extract_nth,3,$(1))),-t $(call extract_nth,3,$(1))) \ $(if $(call extract_nth,4,$(1)),-c $(call extract_nth,4,$(1))) \ $(cbfs-autogen-attributes) \ + $(cbfs-mmap-win) \ -r $(2) \ $(if $(call extract_nth,6,$(1)),-a $(call extract_nth,6,$(file)), \ $(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file)))) \ diff --git a/src/Kconfig b/src/Kconfig index 3914a38..3385fcf 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -1515,6 +1515,25 @@ (bootblock, romstage, verstage, ramstage, postcar) in src/arch/${ARCH}/Makefile.mk.
+config OVERRIDE_CBFS_MMAP_WINDOW + bool + default n + help + if set as y, all cbfs add commands will use overridden mmio window by + adding --mmap $CONFIG_CBFS_FLASH_BASE:$CONFIG_CBFS_MMIO_BASE:$CONFIG_CBFS_MMAP_SIZE + +config MMAP_FLASH_BASE + depends on OVERRIDE_CBFS_MMAP_WINDOW + hex + +config MMAP_MMIO_BASE + depends on OVERRIDE_CBFS_MMAP_WINDOW + hex + +config MMAP_SIZE + depends on OVERRIDE_CBFS_MMAP_WINDOW + hex + ############################################################################### # Set default values for symbols created before mainboards. This allows the # option to be displayed in the general menu, but the default to be loaded in diff --git a/src/arch/x86/Makefile.mk b/src/arch/x86/Makefile.mk index a455a09..4cd7309 100644 --- a/src/arch/x86/Makefile.mk +++ b/src/arch/x86/Makefile.mk @@ -85,7 +85,7 @@ add_bootblock = \ $(CBFSTOOL) $(1) add -f $(2) -n bootblock -t bootblock $(TXTIBB) \ -b -$(call file-size,$(2)) \ - $(cbfs-autogen-attributes) $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) + $(cbfs-autogen-attributes) $(cbfs-mmap-win) $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) endif
ifneq ($(CONFIG_CBFS_VERIFICATION),y)