diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-05-26 00:10:52 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-05-26 19:15:43 +0200 |
commit | 920d17ca334e6e095798bebe7a092e1b6f01e12e (patch) | |
tree | d9fed78e0ea838986d822599570b7f15989787c7 | |
parent | 5fdb95e3df40b8ed201c0232481c4f1996f41deb (diff) |
AGESA: Halt on S3 resume failure
Change-Id: Ib6ac8ab3aca991fa623fedcd87a20470248d58e4
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/10298
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
-rw-r--r-- | src/cpu/amd/agesa/s3_resume.c | 18 |
1 files changed, 10 insertions, 8 deletions
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 <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); |