mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-16 16:14:25 -04:00
exo: implement start of mariko fatal handler
This commit is contained in:
parent
123ed80dc7
commit
7bcd5c6e3b
28 changed files with 1138 additions and 24 deletions
|
@ -84,6 +84,26 @@ namespace ams::secmon {
|
|||
PerformPmcReboot();
|
||||
}
|
||||
|
||||
void PerformUserRebootToFatalError() {
|
||||
if (fuse::GetSocType() == fuse::SocType_Erista) {
|
||||
/* On Erista, we reboot to fatal error by jumping to fusee primary's handler. */
|
||||
return PerformUserRebootToPayload();
|
||||
} else /* if (fuse::GetSocType() == fuse::SocType_Mariko) */ {
|
||||
/* TODO: Send a SGI FIQ to the other CPUs, so that user code stops executing. */
|
||||
|
||||
/* TODO: On cores other than 3, halt/wfi. */
|
||||
|
||||
AMS_SECMON_LOG("%s\n", "Jumping to Mariko Fatal.");
|
||||
AMS_LOG_FLUSH();
|
||||
|
||||
/* Jump to the mariko fatal program. */
|
||||
reinterpret_cast<void (*)()>(secmon::MemoryRegionVirtualTzramMarikoProgram.GetAddress())();
|
||||
|
||||
/* The mariko fatal program never returns. */
|
||||
__builtin_unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
void PerformUserShutDown() {
|
||||
/* Load our reboot stub to iram. */
|
||||
LoadRebootStub(RebootStubAction_ShutDown);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue