aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/amd/persimmon/agesawrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/amd/persimmon/agesawrapper.c')
-rw-r--r--src/mainboard/amd/persimmon/agesawrapper.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mainboard/amd/persimmon/agesawrapper.c b/src/mainboard/amd/persimmon/agesawrapper.c
index 6bba7ca15a..e60673ec9b 100644
--- a/src/mainboard/amd/persimmon/agesawrapper.c
+++ b/src/mainboard/amd/persimmon/agesawrapper.c
@@ -40,6 +40,7 @@
#include <arch/io.h>
#include <cpu/amd/agesa/s3_resume.h>
#include <cbmem.h>
+#include <arch/acpi.h>
#define FILECODE UNASSIGNED_FILE_FILECODE
@@ -250,11 +251,15 @@ UINT32 GetHeapBase(
AMD_CONFIG_PARAMS *StdHeader
)
{
- UINT32 high_heap;
+ UINT32 heap;
- high_heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* base + high_stack_size */
+ /* Both romstage and ramstage has this S3 detect. */
+ if (acpi_get_sleep_type() == 3)
+ heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */
+ else
+ heap = BIOS_HEAP_START_ADDRESS; /* low mem */
- return high_heap;
+ return heap;
}
UINT32