mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 07:34:23 -04:00
kern: implement new thread context/fpu semantics
This commit is contained in:
parent
79afa3b64c
commit
6e17317d5d
21 changed files with 1291 additions and 668 deletions
|
@ -214,16 +214,16 @@ namespace ams::kern::arch::arm64 {
|
|||
context->psr = 0x10;
|
||||
}
|
||||
|
||||
/* Set exception SVC permissions. */
|
||||
cur_process.CopyEnterExceptionSvcPermissionsTo(GetCurrentThread().GetStackParametersForExceptionSvcPermission());
|
||||
/* Process that we're entering a usermode exception on the current thread. */
|
||||
GetCurrentThread().OnEnterUsermodeException();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we should, clear the thread's state as single-step. */
|
||||
#if defined(MESOSPHERE_ENABLE_HARDWARE_SINGLE_STEP)
|
||||
if (AMS_UNLIKELY(GetCurrentThread().IsSingleStep())) {
|
||||
GetCurrentThread().ClearSingleStep();
|
||||
if (AMS_UNLIKELY(GetCurrentThread().IsHardwareSingleStep())) {
|
||||
GetCurrentThread().ClearHardwareSingleStep();
|
||||
cpu::MonitorDebugSystemControlRegisterAccessor().SetSoftwareStep(false).Store();
|
||||
cpu::InstructionMemoryBarrier();
|
||||
}
|
||||
|
@ -388,8 +388,8 @@ namespace ams::kern::arch::arm64 {
|
|||
|
||||
/* Try to leave the user exception. */
|
||||
if (cur_process.LeaveUserException()) {
|
||||
/* We left user exception. Alter our SVC permissions accordingly. */
|
||||
cur_process.CopyLeaveExceptionSvcPermissionsTo(cur_thread->GetStackParametersForExceptionSvcPermission());
|
||||
/* Process that we're leaving a usermode exception on the current thread. */
|
||||
GetCurrentThread().OnLeaveUsermodeException();
|
||||
|
||||
/* Copy the user context to the thread context. */
|
||||
if (is_aarch64) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue