summaryrefslogtreecommitdiff
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
authorGravatar Liam2023-02-19 14:42:12 -0500
committerGravatar Liam2023-03-01 10:39:49 -0500
commit65be230fdda302b25447f2f09b06e3238bd09e79 (patch)
tree68250d7bc8151041b236dcd79483df98938952cd /src/core/hle/service/pm
parentsm:: remove unused member (diff)
downloadyuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.gz
yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.xz
yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.zip
service: move hle_ipc from kernel
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 02a4ca13b..ea249c26f 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -2,9 +2,9 @@
2// SPDX-License-Identifier: GPL-2.0-or-later 2// SPDX-License-Identifier: GPL-2.0-or-later
3 3
4#include "core/core.h" 4#include "core/core.h"
5#include "core/hle/ipc_helpers.h"
6#include "core/hle/kernel/k_process.h" 5#include "core/hle/kernel/k_process.h"
7#include "core/hle/kernel/kernel.h" 6#include "core/hle/kernel/kernel.h"
7#include "core/hle/service/ipc_helpers.h"
8#include "core/hle/service/pm/pm.h" 8#include "core/hle/service/pm/pm.h"
9#include "core/hle/service/server_manager.h" 9#include "core/hle/service/server_manager.h"
10#include "core/hle/service/service.h" 10#include "core/hle/service/service.h"
@@ -34,7 +34,7 @@ std::optional<Kernel::KProcess*> SearchProcessList(
34 return *iter; 34 return *iter;
35} 35}
36 36
37void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx, 37void GetApplicationPidGeneric(HLERequestContext& ctx,
38 const std::vector<Kernel::KProcess*>& process_list) { 38 const std::vector<Kernel::KProcess*>& process_list) {
39 const auto process = SearchProcessList(process_list, [](const auto& proc) { 39 const auto process = SearchProcessList(process_list, [](const auto& proc) {
40 return proc->GetProcessID() == Kernel::KProcess::ProcessIDMin; 40 return proc->GetProcessID() == Kernel::KProcess::ProcessIDMin;
@@ -58,7 +58,7 @@ public:
58 } 58 }
59 59
60private: 60private:
61 void GetBootMode(Kernel::HLERequestContext& ctx) { 61 void GetBootMode(HLERequestContext& ctx) {
62 LOG_DEBUG(Service_PM, "called"); 62 LOG_DEBUG(Service_PM, "called");
63 63
64 IPC::ResponseBuilder rb{ctx, 3}; 64 IPC::ResponseBuilder rb{ctx, 3};
@@ -66,7 +66,7 @@ private:
66 rb.PushEnum(boot_mode); 66 rb.PushEnum(boot_mode);
67 } 67 }
68 68
69 void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) { 69 void SetMaintenanceBoot(HLERequestContext& ctx) {
70 LOG_DEBUG(Service_PM, "called"); 70 LOG_DEBUG(Service_PM, "called");
71 71
72 boot_mode = SystemBootMode::Maintenance; 72 boot_mode = SystemBootMode::Maintenance;
@@ -100,7 +100,7 @@ public:
100 } 100 }
101 101
102private: 102private:
103 void GetProcessId(Kernel::HLERequestContext& ctx) { 103 void GetProcessId(HLERequestContext& ctx) {
104 IPC::RequestParser rp{ctx}; 104 IPC::RequestParser rp{ctx};
105 const auto program_id = rp.PopRaw<u64>(); 105 const auto program_id = rp.PopRaw<u64>();
106 106
@@ -122,12 +122,12 @@ private:
122 rb.Push((*process)->GetProcessID()); 122 rb.Push((*process)->GetProcessID());
123 } 123 }
124 124
125 void GetApplicationProcessId(Kernel::HLERequestContext& ctx) { 125 void GetApplicationProcessId(HLERequestContext& ctx) {
126 LOG_DEBUG(Service_PM, "called"); 126 LOG_DEBUG(Service_PM, "called");
127 GetApplicationPidGeneric(ctx, kernel.GetProcessList()); 127 GetApplicationPidGeneric(ctx, kernel.GetProcessList());
128 } 128 }
129 129
130 void AtmosphereGetProcessInfo(Kernel::HLERequestContext& ctx) { 130 void AtmosphereGetProcessInfo(HLERequestContext& ctx) {
131 // https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/pm/source/impl/pm_process_manager.cpp#L614 131 // https://github.com/Atmosphere-NX/Atmosphere/blob/master/stratosphere/pm/source/impl/pm_process_manager.cpp#L614
132 // This implementation is incomplete; only a handle to the process is returned. 132 // This implementation is incomplete; only a handle to the process is returned.
133 IPC::RequestParser rp{ctx}; 133 IPC::RequestParser rp{ctx};
@@ -187,7 +187,7 @@ public:
187 } 187 }
188 188
189private: 189private:
190 void GetProgramId(Kernel::HLERequestContext& ctx) { 190 void GetProgramId(HLERequestContext& ctx) {
191 IPC::RequestParser rp{ctx}; 191 IPC::RequestParser rp{ctx};
192 const auto process_id = rp.PopRaw<u64>(); 192 const auto process_id = rp.PopRaw<u64>();
193 193
@@ -208,7 +208,7 @@ private:
208 rb.Push((*process)->GetProgramID()); 208 rb.Push((*process)->GetProgramID());
209 } 209 }
210 210
211 void AtmosphereGetProcessId(Kernel::HLERequestContext& ctx) { 211 void AtmosphereGetProcessId(HLERequestContext& ctx) {
212 IPC::RequestParser rp{ctx}; 212 IPC::RequestParser rp{ctx};
213 const auto program_id = rp.PopRaw<u64>(); 213 const auto program_id = rp.PopRaw<u64>();
214 214
@@ -255,7 +255,7 @@ public:
255 } 255 }
256 256
257private: 257private:
258 void GetApplicationProcessIdForShell(Kernel::HLERequestContext& ctx) { 258 void GetApplicationProcessIdForShell(HLERequestContext& ctx) {
259 LOG_DEBUG(Service_PM, "called"); 259 LOG_DEBUG(Service_PM, "called");
260 GetApplicationPidGeneric(ctx, kernel.GetProcessList()); 260 GetApplicationPidGeneric(ctx, kernel.GetProcessList());
261 } 261 }