[coreboot-gerrit] New patch to review for coreboot: AGESA S3 support: Fix excessive stack usage

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Sep 11 21:44:21 CET 2015


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11633

-gerrit

commit 63dcce1b58ae33c3ce6b9cd96fb343fe72e9d54b
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sat Sep 12 00:20:25 2015 +0300

    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 at gmail.com>
---
 src/northbridge/amd/agesa/oem_s3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/northbridge/amd/agesa/oem_s3.c b/src/northbridge/amd/agesa/oem_s3.c
index 5f02815..f9ce4a7 100644
--- a/src/northbridge/amd/agesa/oem_s3.c
+++ b/src/northbridge/amd/agesa/oem_s3.c
@@ -115,6 +115,8 @@ static int spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len)
 #endif
 }
 
+static u8 MTRRStorage[S3_DATA_MTRR_SIZE];
+
 AGESA_STATUS OemS3Save(void *vS3SaveParams)
 {
 #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_S3_PARAMS *dataBlock = &S3SaveParams->S3DataBlock;
 #endif
-	u8 MTRRStorage[S3_DATA_MTRR_SIZE];
 	u32 MTRRStorageSize = 0;
 	uintptr_t pos, size;
 



More information about the coreboot-gerrit mailing list