soc/amd/common/fsp: Introduce SOC_AMD_COMMON_FSP_PRELOAD_FSPS

The function to start preloading the fsp-s is identical in cezanne and
newer socs, so move it to common with a new Kconfig option to enable it.

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Ia572c99928f4a60896b7a861ab6fb3f1257ac1cc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71844
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Fred Reitberger 2023-01-11 15:08:16 -05:00 committed by Felix Held
parent 672788d26b
commit 330a7b5c2c
3 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,9 @@ config SOC_AMD_COMMON_FSP_DMI_TABLES
config SOC_AMD_COMMON_FSP_CCX_CPPC_HOB config SOC_AMD_COMMON_FSP_CCX_CPPC_HOB
bool bool
config SOC_AMD_COMMON_FSP_PRELOAD_FSPS
bool
source "src/soc/amd/common/fsp/*/Kconfig" source "src/soc/amd/common/fsp/*/Kconfig"
endif # PLATFORM_USES_FSP2_0 endif # PLATFORM_USES_FSP2_0

View File

@ -6,6 +6,7 @@ ramstage-y += fsp_reset.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fsp-acpi.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fsp-acpi.c
ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_CCX_CPPC_HOB) += fsp_ccx_cppc_hob.c ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_CCX_CPPC_HOB) += fsp_ccx_cppc_hob.c
ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_DMI_TABLES) += dmi.c
ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_PRELOAD_FSPS) += preload_fsps.c
subdirs-y += ./* subdirs-y += ./*

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootstate.h>
#include <fsp/api.h>
static void start_fsps_preload(void *unused)
{
preload_fsps();
}
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, start_fsps_preload, NULL);