summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-26 11:25:13 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-27 12:52:07 +0200
commitb1fcbf364f0d81b8d28755055ae9558af2f4b712 (patch)
tree3cb520bf43ac71083ac8071891800c9097e18803 /src/northbridge
parentf7284089e3657c66efeeb180a1f101a60d832901 (diff)
downloadcoreboot-b1fcbf364f0d81b8d28755055ae9558af2f4b712.tar.xz
AGESA: Separate HeapManager declarations from BiosCallOuts
Change-Id: I168db92b10d5abc05be2dc374df3f892003d5255 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/10317 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
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;
}