summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/common/fsp/Makefile.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc
index 8a5cef5ffe..503d3bfc0e 100644
--- a/src/soc/amd/common/fsp/Makefile.inc
+++ b/src/soc/amd/common/fsp/Makefile.inc
@@ -6,4 +6,11 @@ ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c
subdirs-y += ./*
+ifeq ($(call int-gt,\
+ $(call file-size,$(call strip_quotes,$(CONFIG_FSP_M_FILE)))\
+ $(shell printf "%d" $(CONFIG_FSP_M_SIZE))),\
+ 1)
+$(error FSP-M binary larger than FSP_M_FILE.)
+endif
+
endif # CONFIG_PLATFORM_USES_FSP2_0