Changes

Jump to navigation Jump to search
10,649 bytes added ,  19 January
→‎System calls: Use autogenerated table
= System calls =
{| class=wikitable
! Id || Return Type || Name|| Arguments
|-
| 0x1 0x01 || Result || [[#SetHeapSize|SetHeapSize]]|| uintptr_t *out_address, size_t size
|-
| 0x2 0x02 || Result || [[#SetMemoryPermission|SetMemoryPermission]]|| uintptr_t address, size_t size, MemoryPermission perm
|-
| 0x3 0x03 || Result || [[#SetMemoryAttribute|SetMemoryAttribute]]|| uintptr_t address, size_t size, uint32_t mask, uint32_t attr
|-
| 0x4 0x04 || Result || [[#MapMemory|MapMemory]]|| uintptr_t dst_address, uintptr_t src_address, size_t size
|-
| 0x5 0x05 || Result || [[#UnmapMemory|UnmapMemory]]|| uintptr_t dst_address, uintptr_t src_address, size_t size
|-
| 0x6 0x06 || Result || [[#QueryMemory|QueryMemory]]|| arch::MemoryInfo *out_memory_info, PageInfo *out_page_info, uintptr_t address
|-
| 0x7 0x07 || void || [[#ExitProcess|ExitProcess]]||
|-
| 0x8 0x08 || Result || [[#CreateThread|CreateThread]]|| Handle *out_handle, ThreadFunc func, uintptr_t arg, uintptr_t stack_bottom, int32_t priority, int32_t core_id
|-
| 0x9 0x09 || Result || [[#StartThread|StartThread]]|| Handle thread_handle
|-
| 0xA 0x0A || void || [[#ExitThread|ExitThread]]||
|-
| 0xB 0x0B || void || [[#SleepThread|SleepThread]]|| int64_t ns
|-
| 0xC 0x0C || Result || [[#GetThreadPriority|GetThreadPriority]]|| int32_t *out_priority, Handle thread_handle
|-
| 0xD 0x0D || Result || [[#SetThreadPriority|SetThreadPriority]]|| Handle thread_handle, int32_t priority
|-
| 0xE 0x0E || Result || [[#GetThreadCoreMask|GetThreadCoreMask]]|| int32_t *out_core_id, uint64_t *out_affinity_mask, Handle thread_handle
|-
| 0xF 0x0F || Result || [[#SetThreadCoreMask|SetThreadCoreMask]]|| Handle thread_handle, int32_t core_id, uint64_t affinity_mask
|-
| 0x10 || int32_t || [[#GetCurrentProcessorNumber|GetCurrentProcessorNumber]]||
|-
| 0x11 || Result || [[#SignalEvent|SignalEvent]]|| Handle event_handle
|-
| 0x12 || Result || [[#ClearEvent|ClearEvent]]|| Handle event_handle
|-
| 0x13 || Result || [[#MapSharedMemory|MapSharedMemory]]|| Handle shmem_handle, uintptr_t address, size_t size, MemoryPermission map_perm
|-
| 0x14 || Result || [[#UnmapSharedMemory|UnmapSharedMemory]]|| Handle shmem_handle, uintptr_t address, size_t size
|-
| 0x15 || Result || [[#CreateTransferMemory|CreateTransferMemory]]|| Handle *out_handle, uintptr_t address, size_t size, MemoryPermission map_perm
|-
| 0x16 || Result || [[#CloseHandle|CloseHandle]]|| Handle handle
|-
| 0x17 || Result || [[#ResetSignal|ResetSignal]]|| Handle handle
|-
| 0x18 || Result || [[#WaitSynchronization|WaitSynchronization]]|| int32_t *out_index, const Handle *handles, int32_t numHandles, int64_t timeout_ns
|-
| 0x19 || Result || [[#CancelSynchronization|CancelSynchronization]]|| Handle handle
|-
| 0x1A || Result || [[#ArbitrateLock|ArbitrateLock]]|| Handle thread_handle, uintptr_t address, uint32_t tag
|-
| 0x1B || Result || [[#ArbitrateUnlock|ArbitrateUnlock]]|| uintptr_t address
|-
| 0x1C || Result || [[#WaitProcessWideKeyAtomic|WaitProcessWideKeyAtomic]]|| uintptr_t address, uintptr_t cv_key, uint32_t tag, int64_t timeout_ns
|-
| 0x1D || void || [[#SignalProcessWideKey|SignalProcessWideKey]]|| uintptr_t cv_key, int32_t count
|-
| 0x1E || int64_t || [[#GetSystemTick|GetSystemTick]]||
|-
| 0x1F || Result || [[#ConnectToNamedPort|ConnectToNamedPort]]|| Handle *out_handle, const char *name
|-
| 0x20 || Result || [[#SendSyncRequestLight|SendSyncRequestLight]]|| Handle session_handle
|-
| 0x21 || Result || [[#SendSyncRequest|SendSyncRequest]]|| Handle session_handle
|-
| 0x22 || Result || [[#SendSyncRequestWithUserBuffer|SendSyncRequestWithUserBuffer]]|| uintptr_t message_buffer, size_t message_buffer_size, Handle session_handle
|-
| 0x23 || Result || [[#SendAsyncRequestWithUserBuffer|SendAsyncRequestWithUserBuffer]]|| Handle *out_event_handle, uintptr_t message_buffer, size_t message_buffer_size, Handle session_handle
|-
| 0x24 || Result || [[#GetProcessId|GetProcessId]]|| uint64_t *out_process_id, Handle process_handle
|-
| 0x25 || Result || [[#GetThreadId|GetThreadId]]|| uint64_t *out_thread_id, Handle thread_handle
|-
| 0x26 || void || [[#Break|Break]]|| BreakReason break_reason, uintptr_t arg, size_t size
|-
| 0x27 || Result || [[#OutputDebugString|OutputDebugString]]|| const char *debug_str, size_t len
|-
| 0x28 || void || [[#ReturnFromException|ReturnFromException]]|| Result result
|-
| 0x29 || Result || [[#GetInfo|GetInfo]]|| uint64_t *out, InfoType info_type, Handle handle, uint64_t info_subtype
|-
| 0x2A || void || [[#FlushEntireDataCache|FlushEntireDataCache]]||
|-
| 0x2B || Result || [[#FlushDataCache|FlushDataCache]]|| uintptr_t address, size_t size
|-
| 0x2C || [3.0.0+] 0x2C || Result || [[#MapPhysicalMemory|MapPhysicalMemory]]|| uintptr_t address, size_t size
|-
| 0x2D || [3.0.0+] 0x2D || Result || [[#UnmapPhysicalMemory|UnmapPhysicalMemory]]|| uintptr_t address, size_t size
|-
| 0x2E || [5.0.0+] 0x2E || Result || [[#GetFutureThreadInfoGetDebugFutureThreadInfo|GetDebugFutureThreadInfo]]|| arch::LastThreadContext *out_context, uint64_t *thread_id, Handle debug_handle, int64_t ns
|-
| 0x2F || Result || [[#GetLastThreadInfo|GetLastThreadInfo]]|| arch::LastThreadContext *out_context, uintptr_t *out_tls_address, uint32_t *out_flags
|-
| 0x30 || Result || [[#GetResourceLimitLimitValue|GetResourceLimitLimitValue]]|| int64_t *out_limit_value, Handle resource_limit_handle, LimitableResource which
|-
| 0x31 || Result || [[#GetResourceLimitCurrentValue|GetResourceLimitCurrentValue]]|| int64_t *out_current_value, Handle resource_limit_handle, LimitableResource which
|-
| 0x32 || Result || [[#SetThreadActivity|SetThreadActivity]]|| Handle thread_handle, ThreadActivity thread_activity
|-
| 0x33 || Result || [[#GetThreadContext3|GetThreadContext3]]|| ThreadContext *out_context, Handle thread_handle
|-
| 0x34 || [4.0.0+] 0x34 || Result || [[#WaitForAddress|WaitForAddress]]|| uintptr_t address, ArbitrationType arb_type, int32_t value, int64_t timeout_ns
|-
| 0x35 || [4.0.0+] 0x35 || Result || [[#SignalToAddress|SignalToAddress]]|| uintptr_t address, SignalType signal_type, int32_t value, int32_t count
|-
| 0x36 || [8.0.0+] 0x36 || void || [[#SynchronizePreemptionState|SynchronizePreemptionState]]||
|- style="border-top: double"
| 0x3C || [4.0.0+] [[#KernelDebug]] ([1.0.0-3.0.2] 0x3C || void || [[#DumpInfo|DumpInfo]])|| DumpInfoType dump_info_type, uint64_t arg
|-
| 0x3D [4.0.0+] 0x3C || void || [[#KernelDebug|KernelDebug]] || KernelDebugType kern_debug_type, uint64_t arg0, uint64_t arg1, uint64_t arg2|-| [4.0.0+] 0x3D || void || [[#ChangeKernelTraceState|ChangeKernelTraceState]]|| KernelTraceState kern_trace_state
|- style="border-top: double"
| 0x40 || Result || [[#CreateSession|CreateSession]]|| Handle *out_server_session_handle, Handle *out_client_session_handle, bool is_light, uintptr_t name
|-
| 0x41 || Result || [[#AcceptSession|AcceptSession]]|| Handle *out_handle, Handle port
|-
| 0x42 || Result || [[#ReplyAndReceiveLight|ReplyAndReceiveLight]]|| Handle handle
|-
| 0x43 || Result || [[#ReplyAndReceive|ReplyAndReceive]]|| int32_t *out_index, const Handle *handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns
|-
| 0x44 || Result || [[#ReplyAndReceiveWithUserBuffer|ReplyAndReceiveWithUserBuffer]]|| int32_t *out_index, uintptr_t message_buffer, size_t message_buffer_size, const Handle *handles, int32_t num_handles, Handle reply_target, int64_t timeout_ns
|-
| 0x45 || Result || [[#CreateEvent|CreateEvent]]|| Handle *out_write_handle, Handle *out_read_handle
|- style="border-top: double"
| 0x48 || [5.0.0+] 0x48 || Result || [[#MapPhysicalMemoryUnsafe|MapPhysicalMemoryUnsafe]]|| uintptr_t address, size_t size
|-
| 0x49 || [5.0.0+] 0x49 || Result || [[#UnmapPhysicalMemoryUnsafe|UnmapPhysicalMemoryUnsafe]]|| uintptr_t address, size_t size
|-
| 0x4A || [5.0.0+] 0x4A || Result || [[#SetUnsafeLimit|SetUnsafeLimit]]|| size_t limit
|-
| 0x4B || [4.0.0+] 0x4B || Result || [[#CreateCodeMemory|CreateCodeMemory]]|| Handle *out_handle, uintptr_t address, size_t size
|-
| 0x4C || [4.0.0+] 0x4C || Result || [[#ControlCodeMemory|ControlCodeMemory]]|| Handle code_memory_handle, CodeMemoryOperation operation, uint64_t address, uint64_t size, MemoryPermission perm
|-
| 0x4D || void || [[#SleepSystem|SleepSystem]]||
|-
| 0x4E || Result || [[#ReadWriteRegister|ReadWriteRegister]]|| uint32_t *out_value, PhysicalAddress address, uint32_t mask, uint32_t value
|-
| 0x4F || Result || [[#SetProcessActivity|SetProcessActivity]]|| Handle process_handle, ProcessActivity process_activity
|-
| 0x50 || Result || [[#CreateSharedMemory|CreateSharedMemory]]|| Handle *out_handle, size_t size, MemoryPermission owner_perm, MemoryPermission remote_perm
|-
| 0x51 || Result || [[#MapTransferMemory|MapTransferMemory]]|| Handle trmem_handle, uintptr_t address, size_t size, MemoryPermission owner_perm
|-
| 0x52 || Result || [[#UnmapTransferMemory|UnmapTransferMemory]]|| Handle trmem_handle, uintptr_t address, size_t size
|-
| 0x53 || Result || [[#CreateInterruptEvent|CreateInterruptEvent]]|| Handle *out_read_handle, int32_t interrupt_id, InterruptType interrupt_type
|-
| 0x54 || Result || [[#QueryPhysicalAddress|QueryPhysicalAddress]]|| arch::PhysicalMemoryInfo *out_info, uintptr_t address
|-
| 0x55 || Result || [[#QueryIoMapping|QueryIoMapping]]|| uintptr_t *out_address, PhysicalAddress physical_address, size_t size
|-
| 0x56 || Result || [[#CreateDeviceAddressSpace|CreateDeviceAddressSpace]]|| Handle *out_handle, uint64_t das_address, uint64_t das_size
|-
| 0x57 || Result || [[#AttachDeviceAddressSpace|AttachDeviceAddressSpace]]|| DeviceName device_name, Handle das_handle
|-
| 0x58 || Result || [[#DetachDeviceAddressSpace|DetachDeviceAddressSpace]]|| DeviceName device_name, Handle das_handle
|-
| 0x59 || Result || [[#MapDeviceAddressSpaceByForce|MapDeviceAddressSpaceByForce]]|| Handle das_handle, Handle process_handle, uint64_t process_address, size_t size, uint64_t device_address, MemoryPermission device_perm
|-
| 0x5A || Result || [[#MapDeviceAddressSpaceAligned|MapDeviceAddressSpaceAligned]]|| Handle das_handle, Handle process_handle, uint64_t process_address, size_t size, uint64_t device_address, MemoryPermission device_perm
|-
| 0x5B || Result || [[#MapDeviceAddressSpace|MapDeviceAddressSpace]]|| size_t *out_mapped_size, Handle das_handle, Handle process_handle, uint64_t process_address, size_t size, uint64_t device_address, MemoryPermission device_perm
|-
| 0x5C || Result || [[#UnmapDeviceAddressSpace|UnmapDeviceAddressSpace]]|| Handle das_handle, Handle process_handle, uint64_t process_address, size_t size, uint64_t device_address
|-
| 0x5D || Result || [[#InvalidateProcessDataCache|InvalidateProcessDataCache]]|| Handle process_handle, uint64_t address, uint64_t size
|-
| 0x5E || Result || [[#StoreProcessDataCache|StoreProcessDataCache]]|| Handle process_handle, uint64_t address, uint64_t size
|-
| 0x5F || Result || [[#FlushProcessDataCache|FlushProcessDataCache]]|| Handle process_handle, uint64_t address, uint64_t size
|-
| 0x60 || Result || [[#DebugActiveProcess|DebugActiveProcess]]|| Handle *out_handle, uint64_t process_id
|-
| 0x61 || Result || [[#BreakDebugProcess|BreakDebugProcess]]|| Handle debug_handle
|-
| 0x62 || Result || [[#TerminateDebugProcess|TerminateDebugProcess]]|| Handle debug_handle
|-
| 0x63 || Result || [[#GetDebugEvent|GetDebugEvent]]|| arch::DebugEventInfo *out_info, Handle debug_handle
|-
| 0x64 || Result || [[#ContinueDebugEvent|ContinueDebugEvent]]|| Handle debug_handle, uint32_t flags, const uint64_t *thread_ids, int32_t num_thread_ids
|-
| 0x65 || Result || [[#GetProcessList|GetProcessList]]|| int32_t *out_num_processes, uint64_t *out_process_ids, int32_t max_out_count
|-
| 0x66 || Result || [[#GetThreadList|GetThreadList]]|| int32_t *out_num_threads, uint64_t *out_thread_ids, int32_t max_out_count, Handle debug_handle
|-
| 0x67 || Result || [[#GetDebugThreadContext|GetDebugThreadContext]]|| ThreadContext *out_context, Handle debug_handle, uint64_t thread_id, uint32_t context_flags
|-
| 0x68 || Result || [[#SetDebugThreadContext|SetDebugThreadContext]]|| Handle debug_handle, uint64_t thread_id, const ThreadContext *context, uint32_t context_flags
|-
| 0x69 || Result || [[#QueryDebugProcessMemory|QueryDebugProcessMemory]]|| arch::MemoryInfo *out_memory_info, PageInfo *out_page_info, Handle process_handle, uintptr_t address
|-
| 0x6A || Result || [[#ReadDebugProcessMemory|ReadDebugProcessMemory]]|| uintptr_t buffer, Handle debug_handle, uintptr_t address, size_t size
|-
| 0x6B || Result || [[#WriteDebugProcessMemory|WriteDebugProcessMemory]]|| Handle debug_handle, uintptr_t buffer, uintptr_t address, size_t size
|-
| 0x6C || Result || [[#SetHardwareBreakPoint|SetHardwareBreakPoint]]|| HardwareBreakPointRegisterName name, uint64_t flags, uint64_t value
|-
| 0x6D || Result || [[#GetDebugThreadParam|GetDebugThreadParam]]|| uint64_t *out_64, uint32_t *out_32, Handle debug_handle, uint64_t thread_id, DebugThreadParam param
|- style="border-top: double"
| 0x6F || [5.0.0+] 0x6F || Result || [[#GetSystemInfo|GetSystemInfo]] || uint64_t *out, SystemInfoType info_type, Handle handle, uint64_t info_subtype|-| 0x70 || Result || [[#CreatePort|CreatePort]]|| Handle *out_server_handle, Handle *out_client_handle, int32_t max_sessions, bool is_light, uintptr_t name
|-
| 0x70 0x71 || Result || [[#CreatePortManageNamedPort|ManageNamedPort]]|| Handle *out_server_handle, const char *name, int32_t max_sessions
|-
| 0x71 0x72 || Result || [[#ManageNamedPortConnectToPort|ConnectToPort]]|| Handle *out_handle, Handle port
|-
| 0x72 0x73 || Result || [[#ConnectToPortSetProcessMemoryPermission|SetProcessMemoryPermission]]|| Handle process_handle, uint64_t address, uint64_t size, MemoryPermission perm
|-
| 0x73 0x74 || Result || [[#SetProcessMemoryPermissionMapProcessMemory|MapProcessMemory]]|| uintptr_t dst_address, Handle process_handle, uint64_t src_address, size_t size
|-
| 0x74 0x75 || Result || [[#MapProcessMemoryUnmapProcessMemory|UnmapProcessMemory]]|| uintptr_t dst_address, Handle process_handle, uint64_t src_address, size_t size
|-
| 0x75 0x76 || Result || [[#UnmapProcessMemoryQueryProcessMemory|QueryProcessMemory]]|| arch::MemoryInfo *out_memory_info, PageInfo *out_page_info, Handle process_handle, uint64_t address
|-
| 0x76 0x77 || Result || [[#QueryProcessMemoryMapProcessCodeMemory|MapProcessCodeMemory]]|| Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size
|-
| 0x77 0x78 || Result || [[#MapProcessCodeMemoryUnmapProcessCodeMemory|UnmapProcessCodeMemory]]|| Handle process_handle, uint64_t dst_address, uint64_t src_address, uint64_t size
|-
| 0x78 0x79 || Result || [[#UnmapProcessCodeMemoryCreateProcess|CreateProcess]]|| Handle *out_handle, const arch::CreateProcessParameter *parameters, const uint32_t *caps, int32_t num_caps
|-
| 0x79 0x7A || Result || [[#CreateProcessStartProcess|StartProcess]]|| Handle process_handle, int32_t priority, int32_t core_id, uint64_t main_thread_stack_size
|-
| 0x7A 0x7B || Result || [[#StartProcessTerminateProcess|TerminateProcess]]|| Handle process_handle
|-
| 0x7B 0x7C || Result || [[#TerminateProcessGetProcessInfo|GetProcessInfo]]|| int64_t *out_info, Handle process_handle, ProcessInfoType info_type
|-
| 0x7C 0x7D || Result || [[#GetProcessInfoCreateResourceLimit|CreateResourceLimit]]|| Handle *out_handle
|-
| 0x7D 0x7E || Result || [[#CreateResourceLimitSetResourceLimitLimitValue|SetResourceLimitLimitValue]]|| Handle resource_limit_handle, LimitableResource which, int64_t limit_value
|-
| 0x7E 0x7F || void || [[#SetResourceLimitLimitValueCallSecureMonitor|CallSecureMonitor]]|| SecureMonitorArguments *args
|-
| 0x7F || [[#CallSecureMonitor]]
|}
</div>
== GetFutureThreadInfo GetDebugFutureThreadInfo ==
<div style="display: inline-block;">
{| class="wikitable" border="1"

Navigation menu