Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34369 )
Change subject: soc/amd/common: Avoid stage_cache if !HAVE_ACPI_TABLE ......................................................................
soc/amd/common: Avoid stage_cache if !HAVE_ACPI_TABLE
This patch skips stage cache function calls if HAVE_ACPI_TABLE not enable.
Change-Id: I620429d05f924b457d7d1b34fc242a621f273191 Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/common/block/s3/Makefile.inc 2 files changed, 21 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/34369/1
diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index a39e29f..2996290 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -312,12 +312,13 @@ Status = amd_dispatch(RtbParams); timestamp_add_now(TS_AGESA_INIT_RTB_DONE);
- if (save_s3_info(RtbParams->S3DataBlock.NvStorage, - RtbParams->S3DataBlock.NvStorageSize, - RtbParams->S3DataBlock.VolatileStorage, - RtbParams->S3DataBlock.VolatileStorageSize)) - printk(BIOS_ERR, "S3 data not saved, resuming impossible\n"); - + if (CONFIG(HAVE_ACPI_RESUME)) { + if (save_s3_info(RtbParams->S3DataBlock.NvStorage, + RtbParams->S3DataBlock.NvStorageSize, + RtbParams->S3DataBlock.VolatileStorage, + RtbParams->S3DataBlock.VolatileStorageSize)) + printk(BIOS_ERR, "S3 data not saved, resuming impossible\n"); + } return Status; }
@@ -326,8 +327,10 @@ AGESA_STATUS status; size_t nv_size;
- get_s3nv_info(&InitResumeParams->S3DataBlock.NvStorage, &nv_size); - InitResumeParams->S3DataBlock.NvStorageSize = nv_size; + if (CONFIG(HAVE_ACPI_RESUME)) { + get_s3nv_info(&InitResumeParams->S3DataBlock.NvStorage, &nv_size); + InitResumeParams->S3DataBlock.NvStorageSize = nv_size; + }
timestamp_add_now(TS_AGESA_INIT_RESUME_START); status = amd_dispatch(InitResumeParams); @@ -343,8 +346,10 @@
amd_initcpuio();
- get_s3vol_info(&S3LateParams->S3DataBlock.VolatileStorage, &vol_size); - S3LateParams->S3DataBlock.VolatileStorageSize = vol_size; + if (CONFIG(HAVE_ACPI_RESUME)) { + get_s3vol_info(&S3LateParams->S3DataBlock.VolatileStorage, &vol_size); + S3LateParams->S3DataBlock.VolatileStorageSize = vol_size; + }
timestamp_add_now(TS_AGESA_S3_LATE_START); Status = amd_dispatch(S3LateParams); @@ -358,8 +363,10 @@ AGESA_STATUS Status; size_t vol_size;
- get_s3vol_info(&S3FinalParams->S3DataBlock.VolatileStorage, &vol_size); - S3FinalParams->S3DataBlock.VolatileStorageSize = vol_size; + if (CONFIG(HAVE_ACPI_RESUME)) { + get_s3vol_info(&S3FinalParams->S3DataBlock.VolatileStorage, &vol_size); + S3FinalParams->S3DataBlock.VolatileStorageSize = vol_size; + }
timestamp_add_now(TS_AGESA_S3_FINAL_START); Status = amd_dispatch(S3FinalParams); diff --git a/src/soc/amd/common/block/s3/Makefile.inc b/src/soc/amd/common/block/s3/Makefile.inc index 9efc6bc..7d950b0 100644 --- a/src/soc/amd/common/block/s3/Makefile.inc +++ b/src/soc/amd/common/block/s3/Makefile.inc @@ -1,6 +1,6 @@ ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_S3),y)
-romstage-y += s3_resume.c -ramstage-y += s3_resume.c +romstage-$(CONFIG_HAVE_ACPI_RESUME) += s3_resume.c +ramstage-$(CONFIG_HAVE_ACPI_RESUME) += s3_resume.c
endif