AGESA S3 support: Fix excessive stack usage

Commit 300caced9 introduced stack overflow when HAVE_ACPI_RESUME
is selected as the temporary storage for MTRRs is 4KiB.

Change-Id: I993df6abc04436fb135822729c4931c5c7496e5a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/11633
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki 2015-09-12 00:20:25 +03:00
parent 113d821696
commit 98e0ac00b9
1 changed files with 2 additions and 1 deletions

View File

@ -115,6 +115,8 @@ static int spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len)
#endif #endif
} }
static u8 MTRRStorage[S3_DATA_MTRR_SIZE];
AGESA_STATUS OemS3Save(void *vS3SaveParams) AGESA_STATUS OemS3Save(void *vS3SaveParams)
{ {
#if IS_ENABLED(CONFIG_CPU_AMD_PI_00660F01) #if IS_ENABLED(CONFIG_CPU_AMD_PI_00660F01)
@ -124,7 +126,6 @@ AGESA_STATUS OemS3Save(void *vS3SaveParams)
AMD_S3SAVE_PARAMS *S3SaveParams = (AMD_S3SAVE_PARAMS *)vS3SaveParams; AMD_S3SAVE_PARAMS *S3SaveParams = (AMD_S3SAVE_PARAMS *)vS3SaveParams;
AMD_S3_PARAMS *dataBlock = &S3SaveParams->S3DataBlock; AMD_S3_PARAMS *dataBlock = &S3SaveParams->S3DataBlock;
#endif #endif
u8 MTRRStorage[S3_DATA_MTRR_SIZE];
u32 MTRRStorageSize = 0; u32 MTRRStorageSize = 0;
uintptr_t pos, size; uintptr_t pos, size;