soc/amd,intel: Drop s3_resume parameter on FSP-S functions

ACPI S3 is a global state and it is no longer needed to
pass it as a parameter.

Change-Id: Id0639a47ea65c210b9a79e6ca89cee819e7769b1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Kyösti Mälkki 2021-01-09 22:53:52 +02:00 committed by Patrick Georgi
parent 4949a3dd62
commit cc93c6e474
25 changed files with 29 additions and 48 deletions

View file

@ -8,7 +8,6 @@
/* Perform Intel silicon init. */ /* Perform Intel silicon init. */
void intel_silicon_init(void); void intel_silicon_init(void);
void fsp_run_silicon_init(FSP_INFO_HEADER *fsp_info_header, int is_s3_wakeup);
/* Called after the silicon init code has run. */ /* Called after the silicon init code has run. */
void soc_after_silicon_init(void); void soc_after_silicon_init(void);
/* Initialize UPD data before SiliconInit call. */ /* Initialize UPD data before SiliconInit call. */

View file

@ -51,7 +51,7 @@ static void display_hob_info(FSP_INFO_HEADER *fsp_info_header)
} }
} }
void fsp_run_silicon_init(FSP_INFO_HEADER *fsp_info_header, int is_s3_wakeup) static void fsp_run_silicon_init(FSP_INFO_HEADER *fsp_info_header)
{ {
FSP_SILICON_INIT fsp_silicon_init; FSP_SILICON_INIT fsp_silicon_init;
SILICON_INIT_UPD *original_params; SILICON_INIT_UPD *original_params;
@ -179,7 +179,7 @@ static void fsp_load(void)
void intel_silicon_init(void) void intel_silicon_init(void)
{ {
fsp_load(); fsp_load();
fsp_run_silicon_init(fsp_get_fih(), acpi_is_wakeup_s3()); fsp_run_silicon_init(fsp_get_fih());
} }
/* Initialize the UPD parameters for SiliconInit */ /* Initialize the UPD parameters for SiliconInit */

View file

@ -33,7 +33,7 @@ enum fsp_notify_phase {
/* Main FSP stages */ /* Main FSP stages */
void fsp_memory_init(bool s3wake); void fsp_memory_init(bool s3wake);
void fsp_silicon_init(bool s3wake); void fsp_silicon_init(void);
void fsp_temp_ram_exit(void); void fsp_temp_ram_exit(void);
/* /*
@ -41,7 +41,7 @@ void fsp_temp_ram_exit(void);
* separately from calling silicon init. It might be required in cases where * separately from calling silicon init. It might be required in cases where
* stage cache is no longer available by the point SoC calls into silicon init. * stage cache is no longer available by the point SoC calls into silicon init.
*/ */
void fsps_load(bool s3wake); void fsps_load(void);
/* Callbacks for updating stage-specific parameters */ /* Callbacks for updating stage-specific parameters */
void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version); void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version);

View file

@ -191,7 +191,7 @@ static int fsps_get_dest(const struct fsp_load_descriptor *fspld, void **dest,
return 0; return 0;
} }
void fsps_load(bool s3wake) void fsps_load(void)
{ {
struct fsp_load_descriptor fspld = { struct fsp_load_descriptor fspld = {
.fsp_prog = PROG_INIT(PROG_REFCODE, CONFIG_FSP_S_CBFS), .fsp_prog = PROG_INIT(PROG_REFCODE, CONFIG_FSP_S_CBFS),
@ -220,9 +220,9 @@ void fsps_load(bool s3wake)
load_done = 1; load_done = 1;
} }
void fsp_silicon_init(bool s3wake) void fsp_silicon_init(void)
{ {
fsps_load(s3wake); fsps_load();
do_silicon_init(&fsps_hdr); do_silicon_init(&fsps_hdr);
} }

View file

@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <device/device.h> #include <device/device.h>
#include <fsp/api.h> #include <fsp/api.h>
#include <soc/southbridge.h> #include <soc/southbridge.h>
@ -27,7 +26,7 @@ static void enable_dev(struct device *dev)
static void soc_init(void *chip_info) static void soc_init(void *chip_info)
{ {
fsp_silicon_init(acpi_is_wakeup_s3()); fsp_silicon_init();
fch_init(chip_info); fch_init(chip_info);
} }

View file

@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <console/console.h> #include <console/console.h>
#include <device/device.h> #include <device/device.h>
#include <device/pci.h> #include <device/pci.h>
@ -102,7 +101,7 @@ static void soc_init(void *chip_info)
{ {
default_dev_ops_root.write_acpi_tables = agesa_write_acpi_tables; default_dev_ops_root.write_acpi_tables = agesa_write_acpi_tables;
fsp_silicon_init(acpi_is_wakeup_s3()); fsp_silicon_init();
data_fabric_set_mmio_np(); data_fabric_set_mmio_np();
fch_init(chip_info); fch_init(chip_info);

View file

@ -10,7 +10,6 @@
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pcie_rp.h> #include <intelblocks/pcie_rp.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/itss.h> #include <soc/itss.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -134,7 +133,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -19,7 +19,6 @@
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -27,7 +26,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -23,7 +23,6 @@
#include <intelblocks/gpio.h> #include <intelblocks/gpio.h>
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pmclib.h> #include <intelblocks/pmclib.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/heci.h> #include <soc/heci.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
@ -302,7 +301,7 @@ static void soc_init(void *data)
*/ */
gpi_clear_int_cfg(); gpi_clear_int_cfg();
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Restore GPIO IRQ polarities back to previous settings. */ /* Restore GPIO IRQ polarities back to previous settings. */
itss_restore_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_restore_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);

View file

@ -24,7 +24,6 @@
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <intelblocks/sgx.h> #include <intelblocks/sgx.h>
#include <reg_script.h> #include <reg_script.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/iomap.h> #include <soc/iomap.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -140,7 +139,7 @@ static struct smm_relocation_attrs relo_attrs;
static void pre_mp_init(void) static void pre_mp_init(void)
{ {
if (CONFIG(SOC_INTEL_COMMON_BLOCK_CPU_MPINIT)) { if (CONFIG(SOC_INTEL_COMMON_BLOCK_CPU_MPINIT)) {
fsps_load(romstage_handoff_is_resume()); fsps_load();
return; return;
} }
x86_setup_mtrrs_with_detect(); x86_setup_mtrrs_with_detect();

View file

@ -10,7 +10,6 @@
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pcie_rp.h> #include <intelblocks/pcie_rp.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/gpio.h> #include <soc/gpio.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -171,7 +170,7 @@ void cnl_configure_pads(const struct pad_config *cfg, size_t num_pads)
void soc_init_pre_device(void *chip_info) void soc_init_pre_device(void *chip_info)
{ {
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -10,7 +10,6 @@
#include <cpu/intel/turbo.h> #include <cpu/intel/turbo.h>
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -23,7 +22,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -43,7 +43,7 @@ static void soc_enable_dev(struct device *dev)
static void soc_init(void *data) static void soc_init(void *data)
{ {
fsp_silicon_init(false); fsp_silicon_init();
soc_save_dimm_info(); soc_save_dimm_info();
} }

View file

@ -10,7 +10,6 @@
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pcie_rp.h> #include <intelblocks/pcie_rp.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/itss.h> #include <soc/itss.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -122,7 +121,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -13,7 +13,6 @@
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -21,7 +20,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -9,7 +9,6 @@
#include <intelblocks/gpio.h> #include <intelblocks/gpio.h>
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/itss.h> #include <soc/itss.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -112,7 +111,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -13,7 +13,6 @@
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -21,7 +20,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -10,7 +10,6 @@
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pcie_rp.h> #include <intelblocks/pcie_rp.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/itss.h> #include <soc/itss.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -128,7 +127,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -13,7 +13,6 @@
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -21,7 +20,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -2,7 +2,6 @@
#include <assert.h> #include <assert.h>
#include <device/device.h> #include <device/device.h>
#include <romstage_handoff.h>
#include <soc/ramstage.h> #include <soc/ramstage.h>
#include <soc/reg_access.h> #include <soc/reg_access.h>
@ -103,7 +102,7 @@ static void chip_init(void *chip_info)
| TS_LOCK_AUX_TRIP_PT_REGS_ENABLE)); | TS_LOCK_AUX_TRIP_PT_REGS_ENABLE));
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
} }
static struct device_operations pci_domain_ops = { static struct device_operations pci_domain_ops = {

View file

@ -18,7 +18,6 @@
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <intelblocks/p2sb.h> #include <intelblocks/p2sb.h>
#include <intelpch/lockdown.h> #include <intelpch/lockdown.h>
#include <romstage_handoff.h>
#include <soc/acpi.h> #include <soc/acpi.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/interrupt.h> #include <soc/interrupt.h>
@ -56,7 +55,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* /*
* Keep the P2SB device visible so it and the other devices are * Keep the P2SB device visible so it and the other devices are
@ -77,7 +76,7 @@ void soc_init_pre_device(void *chip_info)
void soc_fsp_load(void) void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static struct device_operations pci_domain_ops = { static struct device_operations pci_domain_ops = {

View file

@ -11,7 +11,6 @@
#include <intelblocks/itss.h> #include <intelblocks/itss.h>
#include <intelblocks/pcie_rp.h> #include <intelblocks/pcie_rp.h>
#include <intelblocks/xdci.h> #include <intelblocks/xdci.h>
#include <romstage_handoff.h>
#include <soc/intel/common/vbt.h> #include <soc/intel/common/vbt.h>
#include <soc/itss.h> #include <soc/itss.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -134,7 +133,7 @@ void soc_init_pre_device(void *chip_info)
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END); itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
/* Perform silicon specific init. */ /* Perform silicon specific init. */
fsp_silicon_init(romstage_handoff_is_resume()); fsp_silicon_init();
/* Display FIRMWARE_VERSION_INFO_HOB */ /* Display FIRMWARE_VERSION_INFO_HOB */
fsp_display_fvi_version_hob(); fsp_display_fvi_version_hob();

View file

@ -19,7 +19,6 @@
#include <intelblocks/cpulib.h> #include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h> #include <intelblocks/mp_init.h>
#include <intelblocks/msr.h> #include <intelblocks/msr.h>
#include <romstage_handoff.h>
#include <soc/cpu.h> #include <soc/cpu.h>
#include <soc/msr.h> #include <soc/msr.h>
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
@ -27,7 +26,7 @@
static void soc_fsp_load(void) static void soc_fsp_load(void)
{ {
fsps_load(romstage_handoff_is_resume()); fsps_load();
} }
static void configure_misc(void) static void configure_misc(void)

View file

@ -91,7 +91,7 @@ static void chip_final(void *data)
static void chip_init(void *data) static void chip_init(void *data)
{ {
printk(BIOS_DEBUG, "coreboot: calling fsp_silicon_init\n"); printk(BIOS_DEBUG, "coreboot: calling fsp_silicon_init\n");
fsp_silicon_init(false); fsp_silicon_init();
override_hpet_ioapic_bdf(); override_hpet_ioapic_bdf();
pch_enable_ioapic(); pch_enable_ioapic();
pch_lock_dmictl(); pch_lock_dmictl();

View file

@ -59,7 +59,7 @@ static void soc_enable_dev(struct device *dev)
static void soc_init(void *data) static void soc_init(void *data)
{ {
printk(BIOS_DEBUG, "coreboot: calling fsp_silicon_init\n"); printk(BIOS_DEBUG, "coreboot: calling fsp_silicon_init\n");
fsp_silicon_init(false); fsp_silicon_init();
override_hpet_ioapic_bdf(); override_hpet_ioapic_bdf();
pch_lock_dmictl(); pch_lock_dmictl();
} }