summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorFred Reitberger <reitbergerfred@gmail.com>2023-01-11 15:08:16 -0500
committerFelix Held <felix-coreboot@felixheld.de>2023-01-12 20:38:53 +0000
commit330a7b5c2c6edc5c76760b491957cf5b17a804f0 (patch)
tree33d24910f7107e796d91ff54961b1ce5536c786c /src/soc/amd/common
parent672788d26b250c6bc2add8f56187bd1ed658621e (diff)
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>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/fsp/Kconfig3
-rw-r--r--src/soc/amd/common/fsp/Makefile.inc1
-rw-r--r--src/soc/amd/common/fsp/preload_fsps.c11
3 files changed, 15 insertions, 0 deletions
diff --git a/src/soc/amd/common/fsp/Kconfig b/src/soc/amd/common/fsp/Kconfig
index 885e250fc6..9331011bc8 100644
--- a/src/soc/amd/common/fsp/Kconfig
+++ b/src/soc/amd/common/fsp/Kconfig
@@ -6,6 +6,9 @@ config SOC_AMD_COMMON_FSP_DMI_TABLES
config SOC_AMD_COMMON_FSP_CCX_CPPC_HOB
bool
+config SOC_AMD_COMMON_FSP_PRELOAD_FSPS
+ bool
+
source "src/soc/amd/common/fsp/*/Kconfig"
endif # PLATFORM_USES_FSP2_0
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc
index 78e0e4fa3a..ab9a7ab507 100644
--- a/src/soc/amd/common/fsp/Makefile.inc
+++ b/src/soc/amd/common/fsp/Makefile.inc
@@ -6,6 +6,7 @@ ramstage-y += fsp_reset.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_DMI_TABLES) += dmi.c
+ramstage-$(CONFIG_SOC_AMD_COMMON_FSP_PRELOAD_FSPS) += preload_fsps.c
subdirs-y += ./*
diff --git a/src/soc/amd/common/fsp/preload_fsps.c b/src/soc/amd/common/fsp/preload_fsps.c
new file mode 100644
index 0000000000..d8b08912ad
--- /dev/null
+++ b/src/soc/amd/common/fsp/preload_fsps.c
@@ -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);