summaryrefslogtreecommitdiff
path: root/src/cpu/amd
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-03-29 15:55:23 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-04-04 02:24:00 +0200
commit42402772e52a6a0b8c797cb14e2c33f034d840b3 (patch)
tree335bfcac936f7640d2a5b8b27ed811e562552ea3 /src/cpu/amd
parent424c63950bedc76020a0861ee85c19bf26eb4c6a (diff)
AGESA: Adjust heap location for S3 resume path
Once we do CAR teardown between AmdInitResume() and AmdS3LateRestore() we attempt to find our heap from the temporary memory buffer instead of cache. S3 resume is essentially broken anyways and this is not yet a proper fix at all, but barely keeps system from halting on S3 resume. Offset that seems arbitrary was taken from hudson/agesawrapper.c. Change-Id: Idddf2ecde5a9d32d532071d6ba05032be730460c Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/19038 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r--src/cpu/amd/agesa/heapmanager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpu/amd/agesa/heapmanager.c b/src/cpu/amd/agesa/heapmanager.c
index 2a5141c62c..f131f9841e 100644
--- a/src/cpu/amd/agesa/heapmanager.c
+++ b/src/cpu/amd/agesa/heapmanager.c
@@ -47,8 +47,12 @@ void *GetHeapBase(void)
{
void *heap = (void *)BIOS_HEAP_START_ADDRESS;
- if (acpi_is_wakeup_s3())
+ if (acpi_is_wakeup_s3()) {
+ /* FIXME: For S3 resume path, buffer is in CBMEM
+ * with some arbitrary header. */
heap = cbmem_find(CBMEM_ID_RESUME_SCRATCH);
+ heap += 0x10;
+ }
return heap;
}