exo2: implement smc cpu off

This commit is contained in:
Michael Scire
2020-05-25 22:32:54 -07:00
committed by SciresM
parent 8a4019151b
commit 8e401f4daa
10 changed files with 272 additions and 6 deletions

View File

@@ -248,7 +248,6 @@ namespace ams::secmon::smc {
return;
}
const int ind = current - LogMin;
const int ofs = (ind * sizeof(args)) % LogBufSize;
@@ -275,6 +274,16 @@ namespace ams::secmon::smc {
DebugLog(args);
}
if (args.r[0] == 0xC4000001) {
*(volatile u32 *)(MemoryRegionVirtualDebug.GetAddress()) = 0xFFFFFFFF;
*(volatile u32 *)(MemoryRegionVirtualDebug.GetAddress() + 0x10) = static_cast<u32>(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]);