mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-31 09:37:11 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
|
@ -0,0 +1,10 @@
|
|||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
enum CodeMemoryOperation : uint
|
||||
{
|
||||
Map,
|
||||
MapToOwner,
|
||||
Unmap,
|
||||
UnmapFromOwner
|
||||
};
|
||||
}
|
34
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/InfoType.cs
Normal file
34
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/InfoType.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
enum InfoType : uint
|
||||
{
|
||||
CoreMask,
|
||||
PriorityMask,
|
||||
AliasRegionAddress,
|
||||
AliasRegionSize,
|
||||
HeapRegionAddress,
|
||||
HeapRegionSize,
|
||||
TotalMemorySize,
|
||||
UsedMemorySize,
|
||||
DebuggerAttached,
|
||||
ResourceLimit,
|
||||
IdleTickCount,
|
||||
RandomEntropy,
|
||||
AslrRegionAddress,
|
||||
AslrRegionSize,
|
||||
StackRegionAddress,
|
||||
StackRegionSize,
|
||||
SystemResourceSizeTotal,
|
||||
SystemResourceSizeUsed,
|
||||
ProgramId,
|
||||
// NOTE: Added in 4.0.0, removed in 5.0.0.
|
||||
InitialProcessIdRange,
|
||||
UserExceptionContextAddress,
|
||||
TotalNonSystemMemorySize,
|
||||
UsedNonSystemMemorySize,
|
||||
IsApplication,
|
||||
FreeThreadCount,
|
||||
ThreadTickCount,
|
||||
MesosphereCurrentProcess = 65001
|
||||
}
|
||||
}
|
37
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/MemoryInfo.cs
Normal file
37
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/MemoryInfo.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using Ryujinx.HLE.HOS.Kernel.Memory;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
struct MemoryInfo
|
||||
{
|
||||
public ulong Address;
|
||||
public ulong Size;
|
||||
public MemoryState State;
|
||||
public MemoryAttribute Attribute;
|
||||
public KMemoryPermission Permission;
|
||||
public int IpcRefCount;
|
||||
public int DeviceRefCount;
|
||||
#pragma warning disable CS0414
|
||||
private int _padding;
|
||||
#pragma warning restore CS0414
|
||||
|
||||
public MemoryInfo(
|
||||
ulong address,
|
||||
ulong size,
|
||||
MemoryState state,
|
||||
MemoryAttribute attribute,
|
||||
KMemoryPermission permission,
|
||||
int ipcRefCount,
|
||||
int deviceRefCount)
|
||||
{
|
||||
Address = address;
|
||||
Size = size;
|
||||
State = state;
|
||||
Attribute = attribute;
|
||||
Permission = permission;
|
||||
IpcRefCount = ipcRefCount;
|
||||
DeviceRefCount = deviceRefCount;
|
||||
_padding = 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
|
||||
class PointerSizedAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
15
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcAttribute.cs
Normal file
15
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcAttribute.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
||||
class SvcAttribute : Attribute
|
||||
{
|
||||
public int Id { get; }
|
||||
|
||||
public SvcAttribute(int id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
|
||||
class SvcImplAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
3010
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
Normal file
3010
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs
Normal file
File diff suppressed because it is too large
Load diff
44
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs
Normal file
44
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using Ryujinx.Cpu;
|
||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
partial class SyscallHandler
|
||||
{
|
||||
private readonly KernelContext _context;
|
||||
|
||||
public SyscallHandler(KernelContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public void SvcCall(IExecutionContext context, ulong address, int id)
|
||||
{
|
||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||
|
||||
if (currentThread.Owner != null &&
|
||||
currentThread.GetUserDisableCount() != 0 &&
|
||||
currentThread.Owner.PinnedThreads[currentThread.CurrentCore] == null)
|
||||
{
|
||||
_context.CriticalSection.Enter();
|
||||
|
||||
currentThread.Owner.PinThread(currentThread);
|
||||
|
||||
currentThread.SetUserInterruptFlag();
|
||||
|
||||
_context.CriticalSection.Leave();
|
||||
}
|
||||
|
||||
if (context.IsAarch32)
|
||||
{
|
||||
SyscallDispatch.Dispatch32(_context.Syscall, context, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
SyscallDispatch.Dispatch64(_context.Syscall, context, id);
|
||||
}
|
||||
|
||||
currentThread.HandlePostSyscall();
|
||||
}
|
||||
}
|
||||
}
|
22
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/ThreadContext.cs
Normal file
22
src/Ryujinx.HLE/HOS/Kernel/SupervisorCall/ThreadContext.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using ARMeilleure.State;
|
||||
using Ryujinx.Common.Memory;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||
{
|
||||
struct ThreadContext
|
||||
{
|
||||
public Array29<ulong> Registers;
|
||||
public ulong Fp;
|
||||
public ulong Lr;
|
||||
public ulong Sp;
|
||||
public ulong Pc;
|
||||
public uint Pstate;
|
||||
#pragma warning disable CS0169
|
||||
private uint _padding;
|
||||
#pragma warning restore CS0169
|
||||
public Array32<V128> FpuRegisters;
|
||||
public uint Fpcr;
|
||||
public uint Fpsr;
|
||||
public ulong Tpidr;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue