From 4371bb96d4f5ce8000f1a10fd37c671e4cdd3705 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 13 Sep 2022 16:53:09 +0200 Subject: soc/amd/common/fsp: only check FSP_M size if ADD_FSP_BINARIES selected Only check if the FSP_M size is small enough to fit inside the memory region reserved for it if ADD_FSP_BINARIES selected. Signed-off-by: Felix Held Suggested-by: Nico Huber Change-Id: I6a115412c113eb0d02b8d4dfc2bb347305f97809 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57223 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/common/fsp/Makefile.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc index 251e4a7f83..827e4d1e7d 100644 --- a/src/soc/amd/common/fsp/Makefile.inc +++ b/src/soc/amd/common/fsp/Makefile.inc @@ -8,15 +8,13 @@ ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c subdirs-y += ./* -ifeq ($(CONFIG_FSP_M_FILE),) -$(info There's no FSP-M binary file specified. The resulting image won't boot successfully.) -else +ifeq ($(CONFIG_ADD_FSP_BINARIES),y) ifeq ($(call int-gt,\ $(call file-size,$(CONFIG_FSP_M_FILE))\ $(shell printf "%d" $(CONFIG_FSP_M_SIZE))),\ 1) $(error FSP-M binary larger than FSP_M_FILE.) endif -endif # CONFIG_FSP_M_FILE +endif # CONFIG_ADD_FSP_BINARIES endif # CONFIG_PLATFORM_USES_FSP2_0 -- cgit v1.2.3