MCPcopy Create free account
hub / github.com/Atmosphere-NX/Atmosphere / GetEntryContext

Function GetEntryContext

exosphere/program/source/secmon_cpu_context.cpp:108–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 void GetEntryContext(EntryContext *out) {
109 auto &ctx = g_core_contexts[hw::GetCurrentCoreId()];
110
111 const auto pc = ctx.entry_context.pc;
112 const auto x0 = ctx.entry_context.x0;
113
114 if (pc == 0 || ctx.is_on) {
115 SetError(pkg1::ErrorInfo_InvalidCoreContext);
116 AMS_ABORT("Invalid core context");
117 }
118
119 ctx.entry_context = {};
120 ctx.is_on = true;
121
122 out->pc = pc;
123 out->x0 = x0;
124 }
125
126 void SaveDebugRegisters() {
127 auto &ctx = g_core_contexts[hw::GetCurrentCoreId()];

Callers

nothing calls this directly

Calls 2

SetErrorFunction · 0.85
GetCurrentCoreIdFunction · 0.50

Tested by

no test coverage detected