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 <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: I6a115412c113eb0d02b8d4dfc2bb347305f97809
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Felix Held 2022-09-13 16:53:09 +02:00
parent 275a9a3d7e
commit 4371bb96d4
1 changed files with 2 additions and 4 deletions

View File

@ -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