diff options
| author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-08 01:22:00 +0200 |
|---|---|---|
| committer | Mary <thog@protonmail.com> | 2023-04-27 23:51:14 +0200 |
| commit | cee712105850ac3385cd0091a923438167433f9f (patch) | |
| tree | 4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.HLE/HOS/Services/Pm | |
| parent | cd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff) | |
Move solution and projects to src
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Pm')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs | 49 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs | 27 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs | 21 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Pm/ResultCode.cs | 17 |
5 files changed, 0 insertions, 122 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs deleted file mode 100644 index 45771db6..00000000 --- a/Ryujinx.HLE/HOS/Services/Pm/IBootModeInterface.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Pm -{ - [Service("pm:bm")] - class IBootModeInterface : IpcService - { - public IBootModeInterface(ServiceCtx context) { } - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs deleted file mode 100644 index cce2967a..00000000 --- a/Ryujinx.HLE/HOS/Services/Pm/IDebugMonitorInterface.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Ryujinx.HLE.HOS.Ipc; -using Ryujinx.HLE.HOS.Kernel; -using Ryujinx.HLE.HOS.Kernel.Process; -using Ryujinx.Horizon.Common; - -namespace Ryujinx.HLE.HOS.Services.Pm -{ - [Service("pm:dmnt")] - class IDebugMonitorInterface : IpcService - { - public IDebugMonitorInterface(ServiceCtx context) { } - - [CommandCmif(4)] - // GetProgramId() -> sf::Out<ncm::ProgramId> out_process_id - public ResultCode GetApplicationProcessId(ServiceCtx context) - { - // TODO: Not correct as it shouldn't be directly using kernel objects here - foreach (KProcess process in context.Device.System.KernelContext.Processes.Values) - { - if (process.IsApplication) - { - context.ResponseData.Write(process.Pid); - - return ResultCode.Success; - } - } - - return ResultCode.ProcessNotFound; - } - - [CommandCmif(65000)] - // AtmosphereGetProcessInfo(os::ProcessId process_id) -> sf::OutCopyHandle out_process_handle, sf::Out<ncm::ProgramLocation> out_loc, sf::Out<cfg::OverrideStatus> out_status - public ResultCode GetProcessInfo(ServiceCtx context) - { - ulong pid = context.RequestData.ReadUInt64(); - - KProcess process = KernelStatic.GetProcessByPid(pid); - - if (context.Process.HandleTable.GenerateHandle(process, out int processHandle) != Result.Success) - { - throw new System.Exception("Out of handles!"); - } - - context.Response.HandleDesc = IpcHandleDesc.MakeCopy(processHandle); - - return ResultCode.Success; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs deleted file mode 100644 index b3b5595f..00000000 --- a/Ryujinx.HLE/HOS/Services/Pm/IInformationInterface.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Ryujinx.HLE.HOS.Kernel.Process; - -namespace Ryujinx.HLE.HOS.Services.Pm -{ - [Service("pm:info")] - class IInformationInterface : IpcService - { - public IInformationInterface(ServiceCtx context) { } - - [CommandCmif(0)] - // GetProgramId(os::ProcessId process_id) -> sf::Out<ncm::ProgramId> out - public ResultCode GetProgramId(ServiceCtx context) - { - ulong pid = context.RequestData.ReadUInt64(); - - // TODO: Not correct as it shouldn't be directly using kernel objects here - if (context.Device.System.KernelContext.Processes.TryGetValue(pid, out KProcess process)) - { - context.ResponseData.Write(process.TitleId); - - return ResultCode.Success; - } - - return ResultCode.ProcessNotFound; - } - } -}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs deleted file mode 100644 index 96202326..00000000 --- a/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Pm -{ - [Service("pm:shell")] - class IShellInterface : IpcService - { - public IShellInterface(ServiceCtx context) { } - - [CommandCmif(6)] - // GetApplicationPid() -> u64 - public ResultCode GetApplicationPid(ServiceCtx context) - { - // FIXME: This is wrong but needed to make hb loader works - // TODO: Change this when we will have a way to process via a PM like interface. - ulong pid = context.Process.Pid; - - context.ResponseData.Write(pid); - - return ResultCode.Success; - } - } -} diff --git a/Ryujinx.HLE/HOS/Services/Pm/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Pm/ResultCode.cs deleted file mode 100644 index 92b5925e..00000000 --- a/Ryujinx.HLE/HOS/Services/Pm/ResultCode.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Ryujinx.HLE.HOS.Services.Pm -{ - enum ResultCode - { - ModuleId = 15, - ErrorCodeShift = 9, - - Success = 0, - - ProcessNotFound = (1 << ErrorCodeShift) | ModuleId, - AlreadyStarted = (2 << ErrorCodeShift) | ModuleId, - NotTerminated = (3 << ErrorCodeShift) | ModuleId, - DebugHookInUse = (4 << ErrorCodeShift) | ModuleId, - ApplicationRunning = (5 << ErrorCodeShift) | ModuleId, - InvalidSize = (6 << ErrorCodeShift) | ModuleId, - } -}
\ No newline at end of file |
