ams: improve fatal error context

This commit is contained in:
Michael Scire committed 2019-04-26 07:25:38 -07:00
1 parent 3207c38a44
commit 7fef83885f
4 files changed
+22 -9

No files matched your search

@@ -101,11 +101,6 @@ Result BpcRebootManager::PerformReboot() {
}
void BpcRebootManager::RebootForFatalError(AtmosphereFatalErrorContext *ctx) {
/* If we don't actually have a payload loaded, just go to RCM. */
if (!g_payload_loaded) {
RebootToRcm();
}
/* Ensure clean IRAM state. */
ClearIram();
@@ -118,5 +113,10 @@ void BpcRebootManager::RebootForFatalError(AtmosphereFatalErrorContext *ctx) {
memcpy(g_work_page, ctx, sizeof(*ctx));
CopyToIram(IRAM_PAYLOAD_BASE + IRAM_PAYLOAD_MAX_SIZE, g_work_page, sizeof(g_work_page));
/* If we don't actually have a payload loaded, just go to RCM. */
if (!g_payload_loaded) {
RebootToRcm();
}
RebootToIramPayload();
}