If we take an exception before u-boot is relocated, there's a good
chance we will end up in an endless loop of exceptions because resume is
invalid until after relocation.
Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
#ifdef CONFIG_SMBIOS
ulong smbios_start; /* Start address of SMBIOS table */
#endif
+ struct resume_data *resume;
};
#include <asm-generic/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
-static struct resume_data *resume;
-
void set_resume(struct resume_data *data)
{
- resume = data;
+ gd->arch.resume = data;
}
static void show_efi_loaded_images(uintptr_t epc)
"Store/AMO page fault",
};
- if (resume) {
- resume->code = code;
- longjmp(resume->jump, 1);
+ if (gd->arch.resume) {
+ gd->arch.resume->code = code;
+ longjmp(gd->arch.resume->jump, 1);
}
if (code < ARRAY_SIZE(exception_code))