From afc9a7671dd1385fbcc7d2bceb6b29b47c89d24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 26 Nov 2016 16:15:09 +0200 Subject: [PATCH] UPSTREAM: AGESA: Log if memory training result cannot be stored A problem around CAR teardown time may result with missing training results at the time we want to save them. Record this in the logs for debugging purposes, it will not be possible to use S3 suspend if this happens. BUG=none BRANCH=none TEST=none Change-Id: I1be67747db636b92ddc7c38d2d851ce81b7b359d Signed-off-by: Patrick Georgi Original-Commit-Id: 86690eb0a1b7eda1b0c3f69213a1949a9ef0a2c4 Original-Change-Id: Id2ba8facbd5d90fe3ed9c6900628309c226c2454 Original-Signed-off-by: Kysti Mlkki Original-Reviewed-on: https://review.coreboot.org/18534 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Marc Jones Reviewed-on: https://chromium-review.googlesource.com/452464 --- src/northbridge/amd/agesa/oem_s3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/northbridge/amd/agesa/oem_s3.c b/src/northbridge/amd/agesa/oem_s3.c index a9504acb05..8ffebc9640 100644 --- a/src/northbridge/amd/agesa/oem_s3.c +++ b/src/northbridge/amd/agesa/oem_s3.c @@ -126,6 +126,11 @@ AGESA_STATUS OemS3Save(AMD_S3SAVE_PARAMS *S3SaveParams) if (size && dataBlock->NvStorageSize) spi_SaveS3info(pos, size, dataBlock->NvStorage, dataBlock->NvStorageSize); + else + printk(BIOS_EMERG, + "Error: Cannot store memory training results in SPI.\n" + "Error: S3 resume will not be possible.\n" + ); /* To be consumed in AmdS3LateRestore. */ char *heap = cbmem_add(CBMEM_ID_RESUME_SCRATCH, HIGH_MEMORY_SCRATCH);