summaryrefslogtreecommitdiff
path: root/src/cpu/amd/agesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/amd/agesa')
-rw-r--r--src/cpu/amd/agesa/s3_resume.c18
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);