The kernel's SVCs, from hos.svc, each with its registers in the 64-bit ABI and the 32-bit one (x / r: two registers for a value wider than one), as tools/svcgen lays them out: the inputs; the outputs, the return value first (an output by pointer in the declaration comes back in a register). The types. quiet: not in the crash report's ring of SVCs; nowarn: no warning for InvalidHandle.
| SVC | Name | In | Out | Handler |
|---|---|---|---|---|
| 0x01 | SetHeapSize | Size size: x1 / r1 | Result: x0 / r0 Address out_address: x1 / r1 | svc_SetHeapSize (svc.c) |
| 0x02 | SetMemoryPermission | Address address: x0 / r0 Size size: x1 / r1 MemoryPermission perm: x2 / r2 | Result: x0 / r0 | svc_SetMemoryPermission (svc.c) |
| 0x03 | SetMemoryAttribute | Address address: x0 / r0 Size size: x1 / r1 uint32_t mask: x2 / r2 uint32_t attr: x3 / r3 | Result: x0 / r0 | svc_SetMemoryAttribute (svc.c) |
| 0x04 | MapMemory | Address dst_address: x0 / r0 Address src_address: x1 / r1 Size size: x2 / r2 | Result: x0 / r0 | svc_MapMemory (svc.c) |
| 0x05 | UnmapMemory | Address dst_address: x0 / r0 Address src_address: x1 / r1 Size size: x2 / r2 | Result: x0 / r0 | svc_UnmapMemory (svc.c) |
| 0x06 | QueryMemory | Address out_memory_info: x0 / r0 Address address: x2 / r2 | Result: x0 / r0 PageInfo out_page_info: x1 / r1 | svc_QueryMemory (svc.c) |
| 0x07 | ExitProcess | svc_ExitProcess (svc.c) | ||
| 0x08 | CreateThread | ThreadFunc func: x1 / r1 Address arg: x2 / r2 Address stack_bottom: x3 / r3 int32_t priority: x4 / r0 int32_t core_id: x5 / r4 | Result: x0 / r0 Handle out_handle: x1 / r1 | svc_CreateThread (svc.c) |
| 0x09 | StartThread | Handle thread_handle: x0 / r0 | Result: x0 / r0 | svc_StartThread (svc.c) |
| 0x0A | ExitThread | svc_ExitThread (svc.c) | ||
| 0x0B | SleepThread | int64_t ns: x0 / r0+r1 | svc_SleepThread (svc.c) (quiet) | |
| 0x0C | GetThreadPriority | Handle thread_handle: x1 / r1 | Result: x0 / r0 int32_t out_priority: x1 / r1 | svc_GetThreadPriority (svc.c) |
| 0x0D | SetThreadPriority | Handle thread_handle: x0 / r0 int32_t priority: x1 / r1 | Result: x0 / r0 | svc_SetThreadPriority (svc.c) |
| 0x0E | GetThreadCoreMask | Handle thread_handle: x2 / r2 | Result: x0 / r0 int32_t out_core_id: x1 / r1 uint64_t out_affinity_mask: x2 / r2+r3 | svc_GetThreadCoreMask (svc.c) |
| 0x0F | SetThreadCoreMask | Handle thread_handle: x0 / r0 int32_t core_id: x1 / r1 uint64_t affinity_mask: x2 / r2+r3 | Result: x0 / r0 | svc_SetThreadCoreMask (svc.c) |
| 0x10 | GetCurrentProcessorNumber | int32_t: x0 / r0 | svc_GetCurrentProcessorNumber (svc.c) (quiet) | |
| 0x11 | SignalEvent | Handle event_handle: x0 / r0 | Result: x0 / r0 | svc_SignalEvent (svc.c) |
| 0x12 | ClearEvent | Handle event_handle: x0 / r0 | Result: x0 / r0 | svc_ClearEvent (svc.c) |
| 0x13 | MapSharedMemory | Handle shmem_handle: x0 / r0 Address address: x1 / r1 Size size: x2 / r2 MemoryPermission map_perm: x3 / r3 | Result: x0 / r0 | svc_MapSharedMemory (svc.c) |
| 0x14 | UnmapSharedMemory | Handle shmem_handle: x0 / r0 Address address: x1 / r1 Size size: x2 / r2 | Result: x0 / r0 | svc_UnmapSharedMemory (svc.c) |
| 0x15 | CreateTransferMemory | Address address: x1 / r1 Size size: x2 / r2 MemoryPermission map_perm: x3 / r3 | Result: x0 / r0 Handle out_handle: x1 / r1 | svc_CreateTransferMemory (svc.c) |
| 0x16 | CloseHandle | Handle handle: x0 / r0 | Result: x0 / r0 | svc_CloseHandle (svc.c) (nowarn) |
| 0x17 | ResetSignal | Handle handle: x0 / r0 | Result: x0 / r0 | svc_ResetSignal (svc.c) |
| 0x18 | WaitSynchronization | Address handles: x1 / r1 int32_t num_handles: x2 / r2 int64_t timeout_ns: x3 / r0+r3 | Result: x0 / r0 int32_t out_index: x1 / r1 | svc_WaitSynchronization (svc.c) |
| 0x19 | CancelSynchronization | Handle handle: x0 / r0 | Result: x0 / r0 | svc_CancelSynchronization (svc.c) |
| 0x1A | ArbitrateLock | Handle thread_handle: x0 / r0 Address address: x1 / r1 uint32_t tag: x2 / r2 | Result: x0 / r0 | svc_ArbitrateLock (svc.c) |
| 0x1B | ArbitrateUnlock | Address address: x0 / r0 | Result: x0 / r0 | svc_ArbitrateUnlock (svc.c) |
| 0x1C | WaitProcessWideKeyAtomic | Address address: x0 / r0 Address cv_key: x1 / r1 uint32_t tag: x2 / r2 int64_t timeout_ns: x3 / r3+r4 | Result: x0 / r0 | svc_WaitProcessWideKeyAtomic (svc.c) |
Made from ScarletNX's Sail at 166ad3910f80. The hooks' and the SVCs' declarations and their handlers are ScarletNX's (GPL-3.0-or-later); the SVCs' declarations are Eden's, as hos.svc says.