Add stubs for Nfp and Acc + SvcGetThreadCoreMask implementation (#133)
* Stubs for NFP * Stubs for ACC * Implement SvcGetThreadCoreMask * Fixup * Fixup 2 * Fixup 3 * Address Cyuubi's feedback
This commit is contained in:
parent
49fd76db0f
commit
7b7dbdcc6a
6 changed files with 145 additions and 2 deletions
|
@ -139,6 +139,28 @@ namespace Ryujinx.Core.OsHle.Kernel
|
|||
}
|
||||
}
|
||||
|
||||
private void SvcGetThreadCoreMask(AThreadState ThreadState)
|
||||
{
|
||||
int Handle = (int)ThreadState.X2;
|
||||
|
||||
Ns.Log.PrintDebug(LogClass.KernelSvc, "Handle = " + Handle.ToString("x8"));
|
||||
|
||||
KThread Thread = GetThread(ThreadState.Tpidr, Handle);
|
||||
|
||||
if (Thread != null)
|
||||
{
|
||||
ThreadState.X0 = 0;
|
||||
ThreadState.X1 = (ulong)Thread.IdealCore;
|
||||
ThreadState.X2 = (ulong)Thread.CoreMask;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ns.Log.PrintWarning(LogClass.KernelSvc, $"Invalid thread handle 0x{Handle:x8}!");
|
||||
|
||||
ThreadState.X0 = MakeError(ErrorModule.Kernel, KernelErr.InvalidHandle);
|
||||
}
|
||||
}
|
||||
|
||||
private void SvcSetThreadCoreMask(AThreadState ThreadState)
|
||||
{
|
||||
//FIXME: This is wrong, but the "correct" way to handle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue