diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-05-26 11:25:13 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-05-27 12:52:07 +0200 |
commit | b1fcbf364f0d81b8d28755055ae9558af2f4b712 (patch) | |
tree | 3cb520bf43ac71083ac8071891800c9097e18803 /src/northbridge/amd/agesa/oem_s3.c | |
parent | f7284089e3657c66efeeb180a1f101a60d832901 (diff) |
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/amd/agesa/oem_s3.c')
-rw-r--r-- | src/northbridge/amd/agesa/oem_s3.c | 14 |
1 files changed, 8 insertions, 6 deletions
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; } |