From 0f4b2b643916ab865ce0a7ab7079ab38bdeeaa17 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 8 Mar 2023 20:21:48 -0700 Subject: [PATCH] soc/amd/mendocino: MP2 firmware isn't needed in the RO image The MP2 firmware doesn't do anything useful when booting into recovery mode, so don't include it in the RO image if vboot is enabled. Signed-off-by: Martin Roth Change-Id: I5afbf7e9e730e6951c416f3a3ca75f69a22099cf Reviewed-on: https://review.coreboot.org/c/coreboot/+/73660 Reviewed-by: Fred Reitberger Tested-by: build bot (Jenkins) --- src/soc/amd/mendocino/Makefile.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/soc/amd/mendocino/Makefile.inc b/src/soc/amd/mendocino/Makefile.inc index 23a5c34e70..65a49b0603 100644 --- a/src/soc/amd/mendocino/Makefile.inc +++ b/src/soc/amd/mendocino/Makefile.inc @@ -1,7 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# TODO: Check if this is still correct - ifeq ($(CONFIG_SOC_AMD_MENDOCINO),y) subdirs-$(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK) += psp_verstage @@ -231,7 +229,6 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ $(OPT_PSP_BIOSBIN_DEST) \ $(OPT_PSP_BIOSBIN_SIZE) \ $(OPT_PSP_SOFTFUSE) \ - $(OPT_PSP_LOAD_MP2_FW) \ --use-pspsecureos \ --load-s0i3 \ $(OPT_TOKEN_UNLOCK) \ @@ -245,6 +242,12 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ --flashsize $(CONFIG_ROM_SIZE) \ $(OPT_RECOVERY_AB_SINGLE_COPY) +# If vBOOT is not enabled, we want the MP2 firmware in the common AMDFW +ifeq ($(CONFIG_VBOOT),) +AMDFW_COMMON_ARGS += $(OPT_PSP_LOAD_MP2_FW) +OPT_PSP_LOAD_MP2_FW = +endif + $(obj)/amdfw.rom: $(call strip_quotes, $(PSP_BIOSBIN_FILE)) \ $(PSP_VERSTAGE_FILE) \ $(PSP_VERSTAGE_SIG_FILE) \ @@ -287,6 +290,7 @@ $(obj)/amdfw_a.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_A_POSITION) \ $(OPT_SIGNED_AMDFW_A_FILE) \ + $(OPT_PSP_LOAD_MP2_FW) \ --location $(shell printf "%#x" $(MENDOCINO_FW_A_POSITION)) \ --body-location $(shell printf "%#x" $$(($(MENDOCINO_FW_A_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ --anywhere \ @@ -302,6 +306,7 @@ $(obj)/amdfw_b.rom: $(obj)/amdfw.rom $(OPT_SPL_RW_AB_TABLE_FILE) \ $(OPT_SIGNED_AMDFW_B_POSITION) \ $(OPT_SIGNED_AMDFW_B_FILE) \ + $(OPT_PSP_LOAD_MP2_FW) \ --location $(shell printf "%#x" $(MENDOCINO_FW_B_POSITION)) \ --body-location $(shell printf "%#x" $$(($(MENDOCINO_FW_B_POSITION) + $(MENDOCINO_FW_BODY_OFFSET)))) \ --anywhere \