From 920d17ca334e6e095798bebe7a092e1b6f01e12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 26 May 2015 00:10:52 +0300 Subject: AGESA: Halt on S3 resume failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib6ac8ab3aca991fa623fedcd87a20470248d58e4 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/10298 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/cpu/amd/agesa/s3_resume.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/cpu/amd/agesa') diff --git a/src/cpu/amd/agesa/s3_resume.c b/src/cpu/amd/agesa/s3_resume.c index 7de2d66fd3..d882bdf252 100644 --- a/src/cpu/amd/agesa/s3_resume.c +++ b/src/cpu/amd/agesa/s3_resume.c @@ -26,21 +26,24 @@ #include #include #include +#include #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); -- cgit v1.2.3