kern: implement SvcGetThreadContext3
This commit is contained in:
@@ -22,7 +22,8 @@ namespace ams::kern::arch::arm64 {
|
||||
u64 x[(30 - 0) + 1];
|
||||
u64 sp;
|
||||
u64 pc;
|
||||
u64 psr;
|
||||
u32 psr;
|
||||
u32 write;
|
||||
u64 tpidr;
|
||||
u64 reserved;
|
||||
};
|
||||
|
||||
@@ -74,7 +74,11 @@ namespace ams::kern::arch::arm64 {
|
||||
|
||||
void CloneFpuStatus();
|
||||
|
||||
const u128 *GetFpuRegisters() const { return this->fpu_registers; }
|
||||
|
||||
/* TODO: More methods (especially FPU management) */
|
||||
};
|
||||
|
||||
void GetUserContext(ams::svc::ThreadContext *out, const KThread *thread);
|
||||
|
||||
}
|
||||
@@ -270,6 +270,11 @@ namespace ams::kern {
|
||||
return this->GetStackParameters().is_in_exception_handler;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE bool IsCallingSvc() const {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
return this->GetStackParameters().is_calling_svc;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE void RegisterDpc(DpcFlag flag) {
|
||||
this->GetStackParameters().dpc_flags |= flag;
|
||||
}
|
||||
@@ -455,6 +460,7 @@ namespace ams::kern {
|
||||
void Continue();
|
||||
|
||||
Result SetActivity(ams::svc::ThreadActivity activity);
|
||||
Result GetThreadContext3(ams::svc::ThreadContext *out);
|
||||
|
||||
void ContinueIfHasKernelWaiters() {
|
||||
if (this->GetNumKernelWaiters() > 0) {
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
namespace ams::kern {
|
||||
using ams::kern::arch::arm64::KThreadContext;
|
||||
|
||||
using ams::kern::arch::arm64::GetUserContext;
|
||||
}
|
||||
#else
|
||||
#error "Unknown architecture for KThreadContext"
|
||||
|
||||
Reference in New Issue
Block a user