From e1835d9ba27bf685b2b1b71a325341b8ccf25254 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 7 Jun 2020 16:46:17 -0700 Subject: [PATCH] exo2: correct exception stack calc (fixes smc cpu off) --- exosphere2/program/source/secmon_start_virtual.s | 2 +- exosphere2/program/source/smc/secmon_smc_handler.cpp | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/exosphere2/program/source/secmon_start_virtual.s b/exosphere2/program/source/secmon_start_virtual.s index 9a7a03488..d8b135644 100644 --- a/exosphere2/program/source/secmon_start_virtual.s +++ b/exosphere2/program/source/secmon_start_virtual.s @@ -122,7 +122,7 @@ _ZN3ams6secmon28GetCoreExceptionStackVirtualEv: cmp x0, #2 b.eq 2f - cmp x1, #1 + cmp x0, #1 b.eq 1f /* cmp x0, #0 */ diff --git a/exosphere2/program/source/smc/secmon_smc_handler.cpp b/exosphere2/program/source/smc/secmon_smc_handler.cpp index bc044b021..644139b3c 100644 --- a/exosphere2/program/source/smc/secmon_smc_handler.cpp +++ b/exosphere2/program/source/smc/secmon_smc_handler.cpp @@ -274,16 +274,6 @@ namespace ams::secmon::smc { DebugLog(args); } - if (args.r[0] == 0xC4000001) { - *(volatile u32 *)(MemoryRegionVirtualDebug.GetAddress()) = 0xFFFFFFFF; - *(volatile u32 *)(MemoryRegionVirtualDebug.GetAddress() + 0x10) = static_cast(hw::GetCurrentCoreId()); - - *(volatile u32 *)(MemoryRegionVirtualDevicePmc.GetAddress() + 0x50) = 0x02; - *(volatile u32 *)(MemoryRegionVirtualDevicePmc.GetAddress() + 0x00) = 0x10; - - util::WaitMicroSeconds(1000); - } - /* Get the handler info. */ const auto &info = GetHandlerInfo(table, args.r[0]);