summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/agesa/BiosCallOuts.h18
-rw-r--r--src/northbridge/amd/agesa/agesawrapper.c1
-rw-r--r--src/northbridge/amd/agesa/oem_s3.c14
3 files changed, 9 insertions, 24 deletions
diff --git a/src/northbridge/amd/agesa/BiosCallOuts.h b/src/northbridge/amd/agesa/BiosCallOuts.h
index cfe1852fd4..e763b8c9a0 100644
--- a/src/northbridge/amd/agesa/BiosCallOuts.h
+++ b/src/northbridge/amd/agesa/BiosCallOuts.h
@@ -24,24 +24,6 @@
#include "Porting.h"
#include "AGESA.h"
-#if IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN) || \
- IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_RL) || \
- IS_ENABLED(CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY16_KB)
-
-#define BIOS_HEAP_START_ADDRESS 0x010000000
-#define BIOS_HEAP_SIZE 0x30000
-
-#else
-
-#define BIOS_HEAP_START_ADDRESS 0x10000 /* HEAP during cold boot */
-#define BIOS_HEAP_SIZE 0x20000
-
-#endif
-
-
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
-void EmptyHeap(void);
-
AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
diff --git a/src/northbridge/amd/agesa/agesawrapper.c b/src/northbridge/amd/agesa/agesawrapper.c
index 8ad36c7df2..bfad605d9c 100644
--- a/src/northbridge/amd/agesa/agesawrapper.c
+++ b/src/northbridge/amd/agesa/agesawrapper.c
@@ -23,6 +23,7 @@
#include <northbridge/amd/agesa/agesawrapper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include "amdlib.h"
+#include <cpu/amd/agesa/s3_resume.h>
#include "heapManager.h"
diff --git a/src/northbridge/amd/agesa/oem_s3.c b/src/northbridge/amd/agesa/oem_s3.c
index 779e28b553..16426bc518 100644
--- a/src/northbridge/amd/agesa/oem_s3.c
+++ b/src/northbridge/amd/agesa/oem_s3.c
@@ -22,7 +22,6 @@
#include <string.h>
#include <cbmem.h>
#include <cpu/amd/agesa/s3_resume.h>
-#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <northbridge/amd/agesa/agesawrapper.h>
#include <AGESA.h>
@@ -85,18 +84,21 @@ AGESA_STATUS OemInitResume(AMD_RESUME_PARAMS *ResumeParams)
AGESA_STATUS OemS3LateRestore(AMD_S3LATE_PARAMS *S3LateParams)
{
AMD_S3_PARAMS *dataBlock = &S3LateParams->S3DataBlock;
- AMD_CONFIG_PARAMS StdHeader;
u32 pos, size;
+ void *dst;
+ size_t len;
+ /* TODO: Named volatile, do we need to save it over S3? */
get_s3nv_data(S3DataTypeVolatile, &pos, &size);
-
- u32 len = *(UINT32 *) pos;
void *src = (void *) (pos + sizeof(UINT32));
- void *dst = (void *) GetHeapBase(&StdHeader);
- memcpy(dst, src, len);
+ ResumeHeap(&dst, &len);
dataBlock->VolatileStorageSize = len;
dataBlock->VolatileStorage = dst;
+
+ len = *(UINT32 *) pos;
+ memcpy(dst, src, len);
+
return AGESA_SUCCESS;
}