summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/southbridge/amd/agesa/hudson/Makefile.inc5
-rw-r--r--src/southbridge/amd/pi/hudson/Makefile.inc5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc
index ea86a329e9..425f095de3 100644
--- a/src/southbridge/amd/agesa/hudson/Makefile.inc
+++ b/src/southbridge/amd/agesa/hudson/Makefile.inc
@@ -34,8 +34,13 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c smi_util.c
# |0x55AA55AA |EC ROM Address |GEC ROM Address |USB3 ROM |
# +-----------+---------------+----------------+------------+
# EC ROM should be 64K aligned.
+
+HUDSON_FWM_POS_CALC=$(call int-add, $(call int-subtract, 0xffffffff $(call int-multiply, $(CONFIG_COREBOOT_ROMSIZE_KB) 1024)) 0x20000 1)
HUDSON_FWM_POSITION=$(shell printf %u $(CONFIG_HUDSON_FWM_POSITION))
+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
#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 235ce1e3ec..023e1b7daa 100644
--- a/src/southbridge/amd/pi/hudson/Makefile.inc
+++ b/src/southbridge/amd/pi/hudson/Makefile.inc
@@ -58,7 +58,12 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c smi_util.c
#
# EC ROM should be 64K aligned.
+HUDSON_FWM_POS_CALC=$(call int-add, $(call int-subtract, 0xffffffff $(call int-multiply, $(CONFIG_COREBOOT_ROMSIZE_KB) 1024)) 0x20000 1)
HUDSON_FWM_POSITION=$(shell printf %u $(CONFIG_HUDSON_FWM_POSITION))
+
+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
CBFS_HEADER_SIZE=0x40
#assume the cbfs header is less than $(CBFS_HEADER_SIZE) bytes.