From fff318fbce753e3148ae2d22f7518fb060d7a652 Mon Sep 17 00:00:00 2001 From: Jason Glenesk Date: Wed, 10 Mar 2021 02:47:05 -0800 Subject: soc/amd/cezanne: Update FADT to support S0i3 Set ACPI_FADT_LOW_PWR_IDLE_S0 flag in FADT. BUG=b:178728116 TEST=Dump FACP and confirm Flags bits match expected. Change-Id: I59ef762a18903135f9daa902ba8d1e40c451e96c Signed-off-by: Jason Glenesk Signed-off-by: Mathew King Reviewed-on: https://review.coreboot.org/c/coreboot/+/52035 Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson Reviewed-by: Karthik Ramasubramanian Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/amd/cezanne/acpi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/soc/amd/cezanne/acpi.c') diff --git a/src/soc/amd/cezanne/acpi.c b/src/soc/amd/cezanne/acpi.c index 30201f7b2c..b3931799b1 100644 --- a/src/soc/amd/cezanne/acpi.c +++ b/src/soc/amd/cezanne/acpi.c @@ -56,7 +56,7 @@ unsigned long acpi_fill_madt(unsigned long current) */ void acpi_fill_fadt(acpi_fadt_t *fadt) { - const struct soc_amd_common_config *cfg = soc_get_common_config(); + const struct soc_amd_cezanne_config *cfg = config_of_soc(); printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); @@ -87,7 +87,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) fadt->day_alrm = RTC_DATE_ALARM; fadt->mon_alrm = 0; fadt->century = RTC_ALT_CENTURY; - fadt->iapc_boot_arch = cfg->fadt_boot_arch; /* legacy free default */ + fadt->iapc_boot_arch = cfg->common_config.fadt_boot_arch; /* legacy free default */ fadt->flags |= ACPI_FADT_WBINVD | /* See table 5-34 ACPI 6.3 spec */ ACPI_FADT_C1_SUPPORTED | ACPI_FADT_S4_RTC_WAKE | @@ -96,7 +96,10 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) ACPI_FADT_PLATFORM_CLOCK | ACPI_FADT_S4_RTC_VALID | ACPI_FADT_REMOTE_POWER_ON; - fadt->flags |= cfg->fadt_flags; /* additional board-specific flags */ + if (cfg->s0ix_enable) + fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; + + fadt->flags |= cfg->common_config.fadt_flags; /* additional board-specific flags */ fadt->x_pm1a_evt_blk.space_id = ACPI_ADDRESS_SPACE_IO; fadt->x_pm1a_evt_blk.bit_width = 32; -- cgit v1.2.3