Martin Roth (gaumless@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10683
-gerrit
commit fbc0a6598e81dac9410aa384f1a720034e4f41cd Author: Martin Roth gaumless@gmail.com Date: Sun Jun 28 14:12:29 2015 -0600
amd/.../hudson: Warn if HUDSON_FWM_POSITION is not inside CBFS
Display a warning if CONFIG_HUDSON_FWM_POSITION is not inside CBFS.
This can be extended to other Kconfig values for CBFS.
Change-Id: I2423f7b361dda8aac5dab409fa7b656de486f635 Signed-off-by: Martin Roth gaumless@gmail.com --- src/southbridge/amd/agesa/hudson/Makefile.inc | 5 +++++ src/southbridge/amd/pi/hudson/Makefile.inc | 4 ++++ 2 files changed, 9 insertions(+)
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc index 85e5596..3f46464 100644 --- a/src/southbridge/amd/agesa/hudson/Makefile.inc +++ b/src/southbridge/amd/agesa/hudson/Makefile.inc @@ -37,10 +37,15 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c smi_util.c
HUDSON_FWM_POS_CALC=$(shell let y="0xffffffff - ($(CONFIG_COREBOOT_ROMSIZE_KB) * 1024) + 1 + 0x20000" ; printf "%u\n" $$y) HUDSON_FWM_POSITION=$(shell printf %u $(CONFIG_HUDSON_FWM_POSITION)) +HUDSON_FWM_INSIDE_CBFS=$(shell let y="$(CBFS_BASE_ADDRESS) < $(HUDSON_FWM_POSITION)" ; printf "%u\n" $$y)
ifneq ($(HUDSON_FWM_POS_CALC), $(HUDSON_FWM_POSITION)) $(warning ##### WARNING: CONFIG_HUDSON_FWM_POSITION does not match calculated firmware position $(HUDSON_FWM_POS_CALC) != $(HUDSON_FWM_POSITION) ##### ) endif +ifneq ($(HUDSON_FWM_INSIDE_CBFS), 1) +$(warning ##### WARNING: CONFIG_HUDSON_FWM_POSITION ($(HUDSON_FWM_POSITION)) is outside of CBFS area ($(CBFS_BASE_ADDRESS) to 4294967295) ##### ) +endif + #assume the cbfs header is less than 128 bytes. ROMSIG_SIZE=16 ifeq ($(CONFIG_HUDSON_XHCI_FWM), y) diff --git a/src/southbridge/amd/pi/hudson/Makefile.inc b/src/southbridge/amd/pi/hudson/Makefile.inc index f56f3dc..106d72b 100644 --- a/src/southbridge/amd/pi/hudson/Makefile.inc +++ b/src/southbridge/amd/pi/hudson/Makefile.inc @@ -60,10 +60,14 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c smi_util.c
HUDSON_FWM_POS_CALC=$(shell let y="0xffffffff - ($(CONFIG_COREBOOT_ROMSIZE_KB) * 1024) + 1 + 0x20000" ; printf "%u\n" $$y) HUDSON_FWM_POSITION=$(shell printf %u $(CONFIG_HUDSON_FWM_POSITION)) +HUDSON_FWM_INSIDE_CBFS=$(shell let y="$(CBFS_BASE_ADDRESS) < $(HUDSON_FWM_POSITION)" ; printf "%u\n" $$y)
ifneq ($(HUDSON_FWM_POS_CALC), $(HUDSON_FWM_POSITION)) $(warning ##### WARNING: CONFIG_HUDSON_FWM_POSITION does not match calculated firmware position $(HUDSON_FWM_POS_CALC) != $(HUDSON_FWM_POSITION) ##### ) endif +ifneq ($(HUDSON_FWM_INSIDE_CBFS), 1) +$(warning ##### WARNING: CONFIG_HUDSON_FWM_POSITION ($(HUDSON_FWM_POSITION)) is outside of CBFS area ($(CBFS_BASE_ADDRESS) to 4294967295) ##### ) +endif CBFS_HEADER_SIZE=0x40
#assume the cbfs header is less than $(CBFS_HEADER_SIZE) bytes.