kern: fix race-crash on interrupt controller save, improve fatal output

This commit is contained in:
Michael Scire authored and SciresM committed 2020-12-02 06:43:37 -08:00
1 parent 783f1077be
commit 19a279ce45
2 files changed
+5 -3

No files matched your search

@@ -79,9 +79,6 @@ namespace ams::kern::arch::arm {
/* Setup all interrupt lines. */
SetupInterruptLines(core_id);
this->gicd = nullptr;
this->gicc = nullptr;
}
void KInterruptController::SaveCoreLocal(LocalState *state) const {
@@ -570,11 +570,16 @@ namespace ams::kern::board::nintendo::nx {
f_ctx->afsr0 = 0;
f_ctx->afsr1 = GetVersionIdentifier();
/* Set efsr/far. */
f_ctx->far = cpu::GetFarEl1();
f_ctx->esr = cpu::GetEsrEl1();
/* Copy registers. */
for (size_t i = 0; i < util::size(e_ctx->x); ++i) {
f_ctx->gprs[i] = e_ctx->x[i];
}
f_ctx->sp = e_ctx->sp;
f_ctx->pc = cpu::GetElrEl1();
/* Dump stack trace. */
{