svc.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #include <map>
  5. #include "common/string_util.h"
  6. #include "common/symbols.h"
  7. #include "core/mem_map.h"
  8. #include "core/hle/kernel/address_arbiter.h"
  9. #include "core/hle/kernel/event.h"
  10. #include "core/hle/kernel/mutex.h"
  11. #include "core/hle/kernel/semaphore.h"
  12. #include "core/hle/kernel/shared_memory.h"
  13. #include "core/hle/kernel/thread.h"
  14. #include "core/hle/function_wrappers.h"
  15. #include "core/hle/result.h"
  16. #include "core/hle/service/service.h"
  17. ////////////////////////////////////////////////////////////////////////////////////////////////////
  18. // Namespace SVC
  19. namespace SVC {
  20. enum ControlMemoryOperation {
  21. MEMORY_OPERATION_HEAP = 0x00000003,
  22. MEMORY_OPERATION_GSP_HEAP = 0x00010003,
  23. };
  24. /// Map application or GSP heap memory
  25. static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) {
  26. LOG_TRACE(Kernel_SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X",
  27. operation, addr0, addr1, size, permissions);
  28. switch (operation) {
  29. // Map normal heap memory
  30. case MEMORY_OPERATION_HEAP:
  31. *out_addr = Memory::MapBlock_Heap(size, operation, permissions);
  32. break;
  33. // Map GSP heap memory
  34. case MEMORY_OPERATION_GSP_HEAP:
  35. *out_addr = Memory::MapBlock_HeapLinear(size, operation, permissions);
  36. break;
  37. // Unknown ControlMemory operation
  38. default:
  39. LOG_ERROR(Kernel_SVC, "unknown operation=0x%08X", operation);
  40. }
  41. return 0;
  42. }
  43. /// Maps a memory block to specified address
  44. static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
  45. LOG_TRACE(Kernel_SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d",
  46. handle, addr, permissions, other_permissions);
  47. Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions);
  48. switch (permissions_type) {
  49. case Kernel::MemoryPermission::Read:
  50. case Kernel::MemoryPermission::Write:
  51. case Kernel::MemoryPermission::ReadWrite:
  52. case Kernel::MemoryPermission::Execute:
  53. case Kernel::MemoryPermission::ReadExecute:
  54. case Kernel::MemoryPermission::WriteExecute:
  55. case Kernel::MemoryPermission::ReadWriteExecute:
  56. case Kernel::MemoryPermission::DontCare:
  57. Kernel::MapSharedMemory(handle, addr, permissions_type,
  58. static_cast<Kernel::MemoryPermission>(other_permissions));
  59. break;
  60. default:
  61. LOG_ERROR(Kernel_SVC, "unknown permissions=0x%08X", permissions);
  62. }
  63. return 0;
  64. }
  65. /// Connect to an OS service given the port name, returns the handle to the port to out
  66. static Result ConnectToPort(Handle* out, const char* port_name) {
  67. Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
  68. LOG_TRACE(Kernel_SVC, "called port_name=%s", port_name);
  69. _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!");
  70. *out = service->GetHandle();
  71. return 0;
  72. }
  73. /// Synchronize to an OS service
  74. static Result SendSyncRequest(Handle handle) {
  75. Kernel::Session* session = Kernel::g_object_pool.Get<Kernel::Session>(handle);
  76. if (session == nullptr) {
  77. return InvalidHandle(ErrorModule::Kernel).raw;
  78. }
  79. LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, session->GetName().c_str());
  80. ResultVal<bool> wait = session->SyncRequest();
  81. if (wait.Succeeded() && *wait) {
  82. Kernel::WaitCurrentThread(WAITTYPE_SYNCH); // TODO(bunnei): Is this correct?
  83. }
  84. return wait.Code().raw;
  85. }
  86. /// Close a handle
  87. static Result CloseHandle(Handle handle) {
  88. // ImplementMe
  89. LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle);
  90. return 0;
  91. }
  92. /// Wait for a handle to synchronize, timeout after the specified nanoseconds
  93. static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
  94. // TODO(bunnei): Do something with nano_seconds, currently ignoring this
  95. bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
  96. if (!Kernel::g_object_pool.IsValid(handle)) {
  97. return InvalidHandle(ErrorModule::Kernel).raw;
  98. }
  99. Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
  100. _dbg_assert_(Kernel, object != nullptr);
  101. LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(),
  102. object->GetName().c_str(), nano_seconds);
  103. ResultVal<bool> wait = object->WaitSynchronization();
  104. // Check for next thread to schedule
  105. if (wait.Succeeded() && *wait) {
  106. HLE::Reschedule(__func__);
  107. }
  108. return wait.Code().raw;
  109. }
  110. /// Wait for the given handles to synchronize, timeout after the specified nanoseconds
  111. static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, bool wait_all,
  112. s64 nano_seconds) {
  113. // TODO(bunnei): Do something with nano_seconds, currently ignoring this
  114. bool unlock_all = true;
  115. bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
  116. LOG_TRACE(Kernel_SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld",
  117. handle_count, (wait_all ? "true" : "false"), nano_seconds);
  118. // Iterate through each handle, synchronize kernel object
  119. for (s32 i = 0; i < handle_count; i++) {
  120. if (!Kernel::g_object_pool.IsValid(handles[i])) {
  121. return InvalidHandle(ErrorModule::Kernel).raw;
  122. }
  123. Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]);
  124. LOG_TRACE(Kernel_SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(),
  125. object->GetName().c_str());
  126. // TODO(yuriks): Verify how the real function behaves when an error happens here
  127. ResultVal<bool> wait_result = object->WaitSynchronization();
  128. bool wait = wait_result.Succeeded() && *wait_result;
  129. if (!wait && !wait_all) {
  130. *out = i;
  131. return RESULT_SUCCESS.raw;
  132. } else {
  133. unlock_all = false;
  134. }
  135. }
  136. if (wait_all && unlock_all) {
  137. *out = handle_count;
  138. return RESULT_SUCCESS.raw;
  139. }
  140. // Check for next thread to schedule
  141. HLE::Reschedule(__func__);
  142. return RESULT_SUCCESS.raw;
  143. }
  144. /// Create an address arbiter (to allocate access to shared resources)
  145. static Result CreateAddressArbiter(u32* arbiter) {
  146. LOG_TRACE(Kernel_SVC, "called");
  147. Handle handle = Kernel::CreateAddressArbiter();
  148. *arbiter = handle;
  149. return 0;
  150. }
  151. /// Arbitrate address
  152. static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) {
  153. LOG_TRACE(Kernel_SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter,
  154. address, type, value);
  155. return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type),
  156. address, value).raw;
  157. }
  158. /// Used to output a message on a debug hardware unit - does nothing on a retail unit
  159. static void OutputDebugString(const char* string) {
  160. LOG_DEBUG(Debug_Emulated, "%s", string);
  161. }
  162. /// Get resource limit
  163. static Result GetResourceLimit(Handle* resource_limit, Handle process) {
  164. // With regards to proceess values:
  165. // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for
  166. // the current KThread.
  167. *resource_limit = 0xDEADBEEF;
  168. LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called process=0x%08X", process);
  169. return 0;
  170. }
  171. /// Get resource limit current values
  172. static Result GetResourceLimitCurrentValues(s64* values, Handle resource_limit, void* names,
  173. s32 name_count) {
  174. LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d",
  175. resource_limit, names, name_count);
  176. Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now
  177. return 0;
  178. }
  179. /// Creates a new thread
  180. static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top, u32 processor_id) {
  181. std::string name;
  182. if (Symbols::HasSymbol(entry_point)) {
  183. TSymbol symbol = Symbols::GetSymbol(entry_point);
  184. name = symbol.name;
  185. } else {
  186. name = Common::StringFromFormat("unknown-%08x", entry_point);
  187. }
  188. Handle thread = Kernel::CreateThread(name.c_str(), entry_point, priority, arg, processor_id,
  189. stack_top);
  190. Core::g_app_core->SetReg(1, thread);
  191. LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
  192. "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point,
  193. name.c_str(), arg, stack_top, priority, processor_id, thread);
  194. return 0;
  195. }
  196. /// Called when a thread exits
  197. static u32 ExitThread() {
  198. Handle thread = Kernel::GetCurrentThreadHandle();
  199. LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); // PC = 0x0010545C
  200. Kernel::StopThread(thread, __func__);
  201. HLE::Reschedule(__func__);
  202. return 0;
  203. }
  204. /// Gets the priority for the specified thread
  205. static Result GetThreadPriority(s32* priority, Handle handle) {
  206. ResultVal<u32> priority_result = Kernel::GetThreadPriority(handle);
  207. if (priority_result.Succeeded()) {
  208. *priority = *priority_result;
  209. }
  210. return priority_result.Code().raw;
  211. }
  212. /// Sets the priority for the specified thread
  213. static Result SetThreadPriority(Handle handle, s32 priority) {
  214. return Kernel::SetThreadPriority(handle, priority).raw;
  215. }
  216. /// Create a mutex
  217. static Result CreateMutex(Handle* mutex, u32 initial_locked) {
  218. *mutex = Kernel::CreateMutex((initial_locked != 0));
  219. LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X",
  220. initial_locked ? "true" : "false", *mutex);
  221. return 0;
  222. }
  223. /// Release a mutex
  224. static Result ReleaseMutex(Handle handle) {
  225. LOG_TRACE(Kernel_SVC, "called handle=0x%08X", handle);
  226. ResultCode res = Kernel::ReleaseMutex(handle);
  227. return res.raw;
  228. }
  229. /// Get the ID for the specified thread.
  230. static Result GetThreadId(u32* thread_id, Handle handle) {
  231. LOG_TRACE(Kernel_SVC, "called thread=0x%08X", handle);
  232. ResultCode result = Kernel::GetThreadId(thread_id, handle);
  233. return result.raw;
  234. }
  235. /// Creates a semaphore
  236. static Result CreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count) {
  237. ResultCode res = Kernel::CreateSemaphore(semaphore, initial_count, max_count);
  238. LOG_TRACE(Kernel_SVC, "called initial_count=%d, max_count=%d, created handle=0x%08X",
  239. initial_count, max_count, *semaphore);
  240. return res.raw;
  241. }
  242. /// Releases a certain number of slots in a semaphore
  243. static Result ReleaseSemaphore(s32* count, Handle semaphore, s32 release_count) {
  244. LOG_TRACE(Kernel_SVC, "called release_count=%d, handle=0x%08X", release_count, semaphore);
  245. ResultCode res = Kernel::ReleaseSemaphore(count, semaphore, release_count);
  246. return res.raw;
  247. }
  248. /// Query memory
  249. static Result QueryMemory(void* info, void* out, u32 addr) {
  250. LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr);
  251. return 0;
  252. }
  253. /// Create an event
  254. static Result CreateEvent(Handle* evt, u32 reset_type) {
  255. *evt = Kernel::CreateEvent((ResetType)reset_type);
  256. LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X",
  257. reset_type, *evt);
  258. return 0;
  259. }
  260. /// Duplicates a kernel handle
  261. static Result DuplicateHandle(Handle* out, Handle handle) {
  262. LOG_WARNING(Kernel_SVC, "(STUBBED) called handle=0x%08X", handle);
  263. // Translate kernel handles -> real handles
  264. if (handle == Kernel::CurrentThread) {
  265. handle = Kernel::GetCurrentThreadHandle();
  266. }
  267. _assert_msg_(KERNEL, (handle != Kernel::CurrentProcess),
  268. "(UNIMPLEMENTED) process handle duplication!");
  269. // TODO(bunnei): FixMe - This is a hack to return the handle that we were asked to duplicate.
  270. *out = handle;
  271. return 0;
  272. }
  273. /// Signals an event
  274. static Result SignalEvent(Handle evt) {
  275. LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt);
  276. return Kernel::SignalEvent(evt).raw;
  277. }
  278. /// Clears an event
  279. static Result ClearEvent(Handle evt) {
  280. LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt);
  281. return Kernel::ClearEvent(evt).raw;
  282. }
  283. /// Sleep the current thread
  284. static void SleepThread(s64 nanoseconds) {
  285. LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds);
  286. // Check for next thread to schedule
  287. HLE::Reschedule(__func__);
  288. }
  289. /// This returns the total CPU ticks elapsed since the CPU was powered-on
  290. static s64 GetSystemTick() {
  291. return (s64)Core::g_app_core->GetTicks();
  292. }
  293. const HLE::FunctionDef SVC_Table[] = {
  294. {0x00, nullptr, "Unknown"},
  295. {0x01, HLE::Wrap<ControlMemory>, "ControlMemory"},
  296. {0x02, HLE::Wrap<QueryMemory>, "QueryMemory"},
  297. {0x03, nullptr, "ExitProcess"},
  298. {0x04, nullptr, "GetProcessAffinityMask"},
  299. {0x05, nullptr, "SetProcessAffinityMask"},
  300. {0x06, nullptr, "GetProcessIdealProcessor"},
  301. {0x07, nullptr, "SetProcessIdealProcessor"},
  302. {0x08, HLE::Wrap<CreateThread>, "CreateThread"},
  303. {0x09, HLE::Wrap<ExitThread>, "ExitThread"},
  304. {0x0A, HLE::Wrap<SleepThread>, "SleepThread"},
  305. {0x0B, HLE::Wrap<GetThreadPriority>, "GetThreadPriority"},
  306. {0x0C, HLE::Wrap<SetThreadPriority>, "SetThreadPriority"},
  307. {0x0D, nullptr, "GetThreadAffinityMask"},
  308. {0x0E, nullptr, "SetThreadAffinityMask"},
  309. {0x0F, nullptr, "GetThreadIdealProcessor"},
  310. {0x10, nullptr, "SetThreadIdealProcessor"},
  311. {0x11, nullptr, "GetCurrentProcessorNumber"},
  312. {0x12, nullptr, "Run"},
  313. {0x13, HLE::Wrap<CreateMutex>, "CreateMutex"},
  314. {0x14, HLE::Wrap<ReleaseMutex>, "ReleaseMutex"},
  315. {0x15, HLE::Wrap<CreateSemaphore>, "CreateSemaphore"},
  316. {0x16, HLE::Wrap<ReleaseSemaphore>, "ReleaseSemaphore"},
  317. {0x17, HLE::Wrap<CreateEvent>, "CreateEvent"},
  318. {0x18, HLE::Wrap<SignalEvent>, "SignalEvent"},
  319. {0x19, HLE::Wrap<ClearEvent>, "ClearEvent"},
  320. {0x1A, nullptr, "CreateTimer"},
  321. {0x1B, nullptr, "SetTimer"},
  322. {0x1C, nullptr, "CancelTimer"},
  323. {0x1D, nullptr, "ClearTimer"},
  324. {0x1E, nullptr, "CreateMemoryBlock"},
  325. {0x1F, HLE::Wrap<MapMemoryBlock>, "MapMemoryBlock"},
  326. {0x20, nullptr, "UnmapMemoryBlock"},
  327. {0x21, HLE::Wrap<CreateAddressArbiter>, "CreateAddressArbiter"},
  328. {0x22, HLE::Wrap<ArbitrateAddress>, "ArbitrateAddress"},
  329. {0x23, HLE::Wrap<CloseHandle>, "CloseHandle"},
  330. {0x24, HLE::Wrap<WaitSynchronization1>, "WaitSynchronization1"},
  331. {0x25, HLE::Wrap<WaitSynchronizationN>, "WaitSynchronizationN"},
  332. {0x26, nullptr, "SignalAndWait"},
  333. {0x27, HLE::Wrap<DuplicateHandle>, "DuplicateHandle"},
  334. {0x28, HLE::Wrap<GetSystemTick>, "GetSystemTick"},
  335. {0x29, nullptr, "GetHandleInfo"},
  336. {0x2A, nullptr, "GetSystemInfo"},
  337. {0x2B, nullptr, "GetProcessInfo"},
  338. {0x2C, nullptr, "GetThreadInfo"},
  339. {0x2D, HLE::Wrap<ConnectToPort>, "ConnectToPort"},
  340. {0x2E, nullptr, "SendSyncRequest1"},
  341. {0x2F, nullptr, "SendSyncRequest2"},
  342. {0x30, nullptr, "SendSyncRequest3"},
  343. {0x31, nullptr, "SendSyncRequest4"},
  344. {0x32, HLE::Wrap<SendSyncRequest>, "SendSyncRequest"},
  345. {0x33, nullptr, "OpenProcess"},
  346. {0x34, nullptr, "OpenThread"},
  347. {0x35, nullptr, "GetProcessId"},
  348. {0x36, nullptr, "GetProcessIdOfThread"},
  349. {0x37, HLE::Wrap<GetThreadId>, "GetThreadId"},
  350. {0x38, HLE::Wrap<GetResourceLimit>, "GetResourceLimit"},
  351. {0x39, nullptr, "GetResourceLimitLimitValues"},
  352. {0x3A, HLE::Wrap<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"},
  353. {0x3B, nullptr, "GetThreadContext"},
  354. {0x3C, nullptr, "Break"},
  355. {0x3D, HLE::Wrap<OutputDebugString>, "OutputDebugString"},
  356. {0x3E, nullptr, "ControlPerformanceCounter"},
  357. {0x3F, nullptr, "Unknown"},
  358. {0x40, nullptr, "Unknown"},
  359. {0x41, nullptr, "Unknown"},
  360. {0x42, nullptr, "Unknown"},
  361. {0x43, nullptr, "Unknown"},
  362. {0x44, nullptr, "Unknown"},
  363. {0x45, nullptr, "Unknown"},
  364. {0x46, nullptr, "Unknown"},
  365. {0x47, nullptr, "CreatePort"},
  366. {0x48, nullptr, "CreateSessionToPort"},
  367. {0x49, nullptr, "CreateSession"},
  368. {0x4A, nullptr, "AcceptSession"},
  369. {0x4B, nullptr, "ReplyAndReceive1"},
  370. {0x4C, nullptr, "ReplyAndReceive2"},
  371. {0x4D, nullptr, "ReplyAndReceive3"},
  372. {0x4E, nullptr, "ReplyAndReceive4"},
  373. {0x4F, nullptr, "ReplyAndReceive"},
  374. {0x50, nullptr, "BindInterrupt"},
  375. {0x51, nullptr, "UnbindInterrupt"},
  376. {0x52, nullptr, "InvalidateProcessDataCache"},
  377. {0x53, nullptr, "StoreProcessDataCache"},
  378. {0x54, nullptr, "FlushProcessDataCache"},
  379. {0x55, nullptr, "StartInterProcessDma"},
  380. {0x56, nullptr, "StopDma"},
  381. {0x57, nullptr, "GetDmaState"},
  382. {0x58, nullptr, "RestartDma"},
  383. {0x59, nullptr, "Unknown"},
  384. {0x5A, nullptr, "Unknown"},
  385. {0x5B, nullptr, "Unknown"},
  386. {0x5C, nullptr, "Unknown"},
  387. {0x5D, nullptr, "Unknown"},
  388. {0x5E, nullptr, "Unknown"},
  389. {0x5F, nullptr, "Unknown"},
  390. {0x60, nullptr, "DebugActiveProcess"},
  391. {0x61, nullptr, "BreakDebugProcess"},
  392. {0x62, nullptr, "TerminateDebugProcess"},
  393. {0x63, nullptr, "GetProcessDebugEvent"},
  394. {0x64, nullptr, "ContinueDebugEvent"},
  395. {0x65, nullptr, "GetProcessList"},
  396. {0x66, nullptr, "GetThreadList"},
  397. {0x67, nullptr, "GetDebugThreadContext"},
  398. {0x68, nullptr, "SetDebugThreadContext"},
  399. {0x69, nullptr, "QueryDebugProcessMemory"},
  400. {0x6A, nullptr, "ReadProcessMemory"},
  401. {0x6B, nullptr, "WriteProcessMemory"},
  402. {0x6C, nullptr, "SetHardwareBreakPoint"},
  403. {0x6D, nullptr, "GetDebugThreadParam"},
  404. {0x6E, nullptr, "Unknown"},
  405. {0x6F, nullptr, "Unknown"},
  406. {0x70, nullptr, "ControlProcessMemory"},
  407. {0x71, nullptr, "MapProcessMemory"},
  408. {0x72, nullptr, "UnmapProcessMemory"},
  409. {0x73, nullptr, "Unknown"},
  410. {0x74, nullptr, "Unknown"},
  411. {0x75, nullptr, "Unknown"},
  412. {0x76, nullptr, "TerminateProcess"},
  413. {0x77, nullptr, "Unknown"},
  414. {0x78, nullptr, "CreateResourceLimit"},
  415. {0x79, nullptr, "Unknown"},
  416. {0x7A, nullptr, "Unknown"},
  417. {0x7B, nullptr, "Unknown"},
  418. {0x7C, nullptr, "KernelSetState"},
  419. {0x7D, nullptr, "QueryProcessMemory"},
  420. };
  421. void Register() {
  422. HLE::RegisterModule("SVC_Table", ARRAY_SIZE(SVC_Table), SVC_Table);
  423. }
  424. } // namespace