Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10298
-gerrit
commit 4e4786219e3dbd768f608d52234e9c1b9ae5d7fd Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Tue May 26 00:10:52 2015 +0300
AGESA: Halt on S3 resume failure
Change-Id: Ib6ac8ab3aca991fa623fedcd87a20470248d58e4 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/cpu/amd/agesa/s3_resume.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/cpu/amd/agesa/s3_resume.c b/src/cpu/amd/agesa/s3_resume.c index 7de2d66..d882bdf 100644 --- a/src/cpu/amd/agesa/s3_resume.c +++ b/src/cpu/amd/agesa/s3_resume.c @@ -26,21 +26,24 @@ #include <cbmem.h> #include <string.h> #include <northbridge/amd/agesa/BiosCallOuts.h> +#include <halt.h> #include "s3_resume.h"
static void *backup_resume(void) { void *resume_backup_memory;
- if (cbmem_recovery(1)) - return NULL; + printk(BIOS_DEBUG, "Find resume memory location\n"); + + if (cbmem_recovery(1)) { + printk(BIOS_EMERG, "Unable to recover CBMEM\n"); + halt(); + }
resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); - if (((u32) resume_backup_memory == 0) - || ((u32) resume_backup_memory == -1)) { - printk(BIOS_ERR, "Error: resume_backup_memory: %x\n", - (u32) resume_backup_memory); - for (;;) ; + if (resume_backup_memory == NULL) { + printk(BIOS_EMERG, "No storage for low-memory backup\n"); + halt(); }
return resume_backup_memory; @@ -87,7 +90,6 @@ static void set_resume_cache(void)
void prepare_for_resume(void) { - printk(BIOS_DEBUG, "Find resume memory location\n"); void *resume_backup_memory = backup_resume();
post_code(0x62);