|
libnx
|
Wrappers for kernel syscalls. More...
#include "../types.h"Go to the source code of this file.
Data Structures | |
| struct | MemoryInfo |
| Memory information structure. More... | |
| struct | SecmonArgs |
| Secure monitor arguments. More... | |
Macros | |
| #define | CUR_PROCESS_HANDLE 0xFFFF8001 |
| Pseudo handle for the current process. | |
| #define | CUR_THREAD_HANDLE 0xFFFF8000 |
| Pseudo handle for the current thread. | |
Functions | |
Memory management | |
| Result | svcSetHeapSize (void **out_addr, u64 size) |
| Set the process heap to a given size. More... | |
| Result | svcSetMemoryPermission (void *addr, u64 size, u32 perm) |
| Set the memory permissions of a (page-aligned) range of memory. More... | |
| Result | svcSetMemoryAttribute (void *addr, u64 size, u32 val0, u32 val1) |
| Set the memory attributes of a (page-aligned) range of memory. More... | |
| Result | svcMapMemory (void *dst_addr, void *src_addr, u64 size) |
| Maps a memory range into a different range. More... | |
| Result | svcUnmapMemory (void *dst_addr, void *src_addr, u64 size) |
| Unmaps a region that was previously mapped with svcMapMemory. More... | |
| Result | svcQueryMemory (MemoryInfo *meminfo_ptr, u32 *pageinfo, u64 addr) |
| Query information about an address. More... | |
| Result | svcMapPhysicalMemory (void *address, u64 size) |
| Maps new heap memory at the desired address. More... | |
| Result | svcUnmapPhysicalMemory (void *address, u64 size) |
| Undoes the effects of svcMapPhysicalMemory. More... | |
| Result | svcMapPhysicalMemoryUnsafe (void *address, u64 size) |
| Maps unsafe memory (usable for GPU DMA) for a system module at the desired address. More... | |
| Result | svcUnmapPhysicalMemoryUnsafe (void *address, u64 size) |
| Undoes the effects of svcMapPhysicalMemoryUnsafe. More... | |
| Result | svcSetUnsafeLimit (u64 size) |
| Sets the system-wide limit for unsafe memory mappable using svcMapPhysicalMemoryUnsafe. More... | |
| Result | svcSetProcessMemoryPermission (Handle proc, u64 addr, u64 size, u32 perm) |
| Sets the memory permissions for the specified memory with the supplied process handle. More... | |
| Result | svcMapProcessMemory (void *dst, Handle proc, u64 src, u64 size) |
| Maps the src address from the supplied process handle into the current process. More... | |
| Result | svcUnmapProcessMemory (void *dst, Handle proc, u64 src, u64 size) |
| Undoes the effects of svcMapProcessMemory. More... | |
| Result | svcMapProcessCodeMemory (Handle proc, u64 dst, u64 src, u64 size) |
| Maps normal heap in a certain process as executable code (used when loading NROs). More... | |
| Result | svcUnmapProcessCodeMemory (Handle proc, u64 dst, u64 src, u64 size) |
| Undoes the effects of svcMapProcessCodeMemory. More... | |
Process and thread management | |
| void | svcExitProcess (void) |
| Exits the current process. More... | |
| Result | svcCreateThread (Handle *out, void *entry, void *arg, void *stack_top, int prio, int cpuid) |
| Creates a thread. More... | |
| Result | svcStartThread (Handle handle) |
| Starts a freshly created thread. More... | |
| void | svcExitThread (void) |
| Exits the current thread. More... | |
| Result | svcSleepThread (u64 nano) |
| Sleeps the current thread for the specified amount of time. More... | |
| Result | svcGetThreadPriority (u32 *priority, Handle handle) |
| Gets a thread's priority. More... | |
| Result | svcSetThreadPriority (Handle handle, u32 priority) |
| Sets a thread's priority. More... | |
| u32 | svcGetCurrentProcessorNumber (void) |
| Gets the current processor's number. More... | |
| Result | svcGetProcessId (u64 *processID, Handle handle) |
| Gets the PID associated with a process. More... | |
| Result | svcGetThreadId (u64 *threadID, Handle handle) |
| Gets the TID associated with a process. More... | |
| Result | svcSetThreadActivity (Handle thread, bool paused) |
| Configures the pause/unpause status of a thread. More... | |
| Result | svcGetProcessList (u32 *num_out, u64 *pids_out, u32 max_pids) |
| Retrieves a list of all running processes. More... | |
| Result | svcCreateProcess (Handle *out, void *proc_info, u32 *caps, u64 cap_num) |
| Creates a new process. More... | |
| Result | svcStartProcess (Handle proc, s32 main_prio, s32 default_cpu, u32 stack_size) |
| Starts executing a freshly created process. More... | |
| Result | svcTerminateProcess (Handle proc) |
| Terminates a running process. More... | |
| Result | svcGetProcessInfo (u64 *out, Handle proc, ProcessInfoType which) |
| Gets a ProcessInfoType for a process. More... | |
Synchronization | |
| Result | svcSignalEvent (Handle handle) |
| Sets an event's signalled status. More... | |
| Result | svcClearEvent (Handle handle) |
| Clears an event's signalled status. More... | |
| Result | svcResetSignal (Handle handle) |
| Resets a signal. More... | |
| Result | svcWaitSynchronization (s32 *index, const Handle *handles, s32 handleCount, u64 timeout) |
| Waits on one or more synchronization objects, optionally with a timeout. More... | |
| static Result | svcWaitSynchronizationSingle (Handle handle, u64 timeout) |
| Waits on a single synchronization object, optionally with a timeout. More... | |
| Result | svcCancelSynchronization (Handle thread) |
| Waits a svcWaitSynchronization operation being done on a synchronization object in another thread. More... | |
| Result | svcArbitrateLock (u32 wait_tag, u32 *tag_location, u32 self_tag) |
| Arbitrates a mutex lock operation in userspace. More... | |
| Result | svcArbitrateUnlock (u32 *tag_location) |
| Arbitrates a mutex unlock operation in userspace. More... | |
| Result | svcWaitProcessWideKeyAtomic (u32 *key, u32 *tag_location, u32 self_tag, u64 timeout) |
| Performs a condition variable wait operation in userspace. More... | |
| Result | svcSignalProcessWideKey (u32 *key, s32 num) |
| Performs a condition variable wake-up operation in userspace. More... | |
| Result | svcCreateEvent (Handle *server_handle, Handle *client_handle) |
| Creates a system event. More... | |
Inter-process memory sharing | |
| Result | svcMapSharedMemory (Handle handle, void *addr, size_t size, u32 perm) |
| Maps a block of shared memory. More... | |
| Result | svcUnmapSharedMemory (Handle handle, void *addr, size_t size) |
| Unmaps a block of shared memory. More... | |
| Result | svcCreateTransferMemory (Handle *out, void *addr, size_t size, u32 perm) |
| Creates a block of transfer memory. More... | |
| Result | svcCreateSharedMemory (Handle *out, size_t size, u32 local_perm, u32 other_perm) |
| Creates a block of shared memory. More... | |
| Result | svcMapTransferMemory (Handle tmem_handle, void *addr, size_t size, u32 perm) |
| Maps a block of transfer memory. More... | |
| Result | svcUnmapTransferMemory (Handle tmem_handle, void *addr, size_t size) |
| Unmaps a block of transfer memory. More... | |
Miscellaneous | |
| Result | svcCloseHandle (Handle handle) |
| Closes a handle, decrementing the reference count of the corresponding kernel object. More... | |
| u64 | svcGetSystemTick (void) |
| Gets the current system tick. More... | |
| Result | svcBreak (u32 breakReason, u64 inval1, u64 inval2) |
| Breaks execution. More... | |
| Result | svcGetInfo (u64 *out, u64 id0, Handle handle, u64 id1) |
| Retrieves information about the system, or a certain kernel object. More... | |
| Result | svcGetSystemInfo (u64 *out, u64 id0, Handle handle, u64 id1) |
| Retrieves privileged information about the system, or a certain kernel object. More... | |
Inter-process communication (IPC) | |
| Result | svcConnectToNamedPort (Handle *session, const char *name) |
| Connects to a registered named port. More... | |
| Result | svcSendSyncRequest (Handle session) |
| Sends an IPC synchronization request to a session. More... | |
| Result | svcSendSyncRequestWithUserBuffer (void *usrBuffer, u64 size, Handle session) |
| Sends an IPC synchronization request to a session from an user allocated buffer. More... | |
| Result | svcSendAsyncRequestWithUserBuffer (Handle *handle, void *usrBuffer, u64 size, Handle session) |
| Sends an IPC synchronization request to a session from an user allocated buffer (asynchronous version). More... | |
| Result | svcCreateSession (Handle *server_handle, Handle *client_handle, u32 unk0, u64 unk1) |
| Creates an IPC session. More... | |
| Result | svcAcceptSession (Handle *session_handle, Handle port_handle) |
| Accepts an IPC session. More... | |
| Result | svcReplyAndReceive (s32 *index, const Handle *handles, s32 handleCount, Handle replyTarget, u64 timeout) |
| Performs IPC input/output. More... | |
| Result | svcReplyAndReceiveWithUserBuffer (s32 *index, void *usrBuffer, u64 size, const Handle *handles, s32 handleCount, Handle replyTarget, u64 timeout) |
| Performs IPC input/output from an user allocated buffer. More... | |
| Result | svcCreatePort (Handle *portServer, Handle *portClient, s32 max_sessions, bool is_light, const char *name) |
| Creates a port. More... | |
| Result | svcManageNamedPort (Handle *portServer, const char *name, s32 maxSessions) |
| Manages a named port. More... | |
| Result | svcConnectToPort (Handle *session, Handle port) |
| Manages a named port. More... | |
Debugging | |
| Result | svcOutputDebugString (const char *str, u64 size) |
| Outputs debug text, if used during debugging. More... | |
| Result | svcDebugActiveProcess (Handle *debug, u64 processID) |
| Debugs an active process. More... | |
| Result | svcBreakDebugProcess (Handle debug) |
| Breaks an active debugging session. More... | |
| Result | svcGetDebugEvent (u8 *event_out, Handle *debug) |
| Gets an incoming debug event from a debugging session. More... | |
| Result | svcContinueDebugEvent (Handle debug, u32 flags, u64 unk) |
| Continues a debugging session. More... | |
| Result | svcGetDebugThreadContext (u8 *out, Handle debug, u64 threadID, u32 flags) |
| Gets the context of a thread in a debugging session. More... | |
| Result | svcQueryDebugProcessMemory (MemoryInfo *meminfo_ptr, u32 *pageinfo, Handle debug, u64 addr) |
| Queries memory information from a process that is being debugged. More... | |
| Result | svcReadDebugProcessMemory (void *buffer, Handle debug, u64 addr, u64 size) |
| Reads memory from a process that is being debugged. More... | |
| Result | svcWriteDebugProcessMemory (Handle debug, void *buffer, u64 addr, u64 size) |
| Writes to memory in a process that is being debugged. More... | |
Resource Limit Management | |
| Result | svcGetResourceLimitLimitValue (u64 *out, Handle reslimit_h, LimitableResource which) |
| Gets the maximum value a LimitableResource can have, for a Resource Limit handle. More... | |
| Result | svcGetResourceLimitCurrentValue (u64 *out, Handle reslimit_h, LimitableResource which) |
| Gets the maximum value a LimitableResource can have, for a Resource Limit handle. More... | |
| Result | svcCreateResourceLimit (Handle *out) |
| Creates a new Resource Limit handle. More... | |
| Result | svcSetResourceLimitLimitValue (Handle reslimit, LimitableResource which, u64 value) |
| Sets the value for a LimitableResource for a Resource Limit handle. More... | |
Just-in-time (JIT) compilation support | |
| Result | svcCreateJitMemory (Handle *jit_handle, void *src_addr, u64 size) |
| Creates JIT memory in the caller's address space [4.0.0+]. More... | |
| Result | svcMapJitMemory (Handle jit_handle, JitMapOperation op, void *dst_addr, u64 size, u64 perm) |
| Maps JIT memory in the caller's address space [4.0.0+]. More... | |
Device memory-mapped I/O (MMIO) | |
| Result | svcReadWriteRegister (u32 *outVal, u64 regAddr, u32 rwMask, u32 inVal) |
| Reads/writes a protected MMIO register. More... | |
| Result | svcCreateInterruptEvent (Handle *handle, u64 irqNum, u32 flag) |
| Creates an event and binds it to a specific hardware interrupt. More... | |
| Result | svcQueryPhysicalAddress (u64 out[3], u64 virtaddr) |
| Queries information about a certain virtual address, including its physical address. More... | |
| Result | svcQueryIoMapping (u64 *virtaddr, u64 physaddr, u64 size) |
| Returns a virtual address mapped to a given IO range. More... | |
I/O memory management unit (IOMMU) | |
| Result | svcCreateDeviceAddressSpace (Handle *handle, u64 dev_addr, u64 dev_size) |
| Creates a virtual address space for binding device address spaces. More... | |
| Result | svcAttachDeviceAddressSpace (u64 device, Handle handle) |
| Attaches a device address space to a device. More... | |
| Result | svcDetachDeviceAddressSpace (u64 device, Handle handle) |
| Detaches a device address space from a device. More... | |
| Result | svcMapDeviceAddressSpaceByForce (Handle handle, Handle proc_handle, u64 map_addr, u64 dev_size, u64 dev_addr, u32 perm) |
| Maps an attached device address space to an userspace address. More... | |
| Result | svcMapDeviceAddressSpaceAligned (Handle handle, Handle proc_handle, u64 map_addr, u64 dev_size, u64 dev_addr, u32 perm) |
| Maps an attached device address space to an userspace address. More... | |
| Result | svcUnmapDeviceAddressSpace (Handle handle, Handle proc_handle, u64 map_addr, u64 map_size, u64 dev_addr) |
| Unmaps an attached device address space from an userspace address. More... | |
( ͡° ͜ʖ ͡°) | |
| u64 | svcCallSecureMonitor (SecmonArgs *regs) |
| Calls a secure monitor function (TrustZone, EL3). More... | |
Wrappers for kernel syscalls.
| enum JitMapOperation |
| enum LimitableResource |
Limitable Resources.
| enum MemoryAttribute |
| enum MemoryState |
Memory state bitmasks.
| Enumerator | |
|---|---|
| MemState_Type |
Type field (see MemoryType). |
| MemState_PermChangeAllowed |
Permission change allowed. |
| MemState_ForceRwByDebugSyscalls |
Force read/writable by debug syscalls. |
| MemState_IpcSendAllowed_Type0 |
IPC type 0 send allowed. |
| MemState_IpcSendAllowed_Type3 |
IPC type 3 send allowed. |
| MemState_IpcSendAllowed_Type1 |
IPC type 1 send allowed. |
| MemState_ProcessPermChangeAllowed |
Process permission change allowed. |
| MemState_MapAllowed |
Map allowed. |
| MemState_UnmapProcessCodeMemAllowed |
Unmap process code memory allowed. |
| MemState_TransferMemAllowed |
Transfer memory allowed. |
| MemState_QueryPAddrAllowed |
Query physical address allowed. |
| MemState_MapDeviceAllowed |
Map device allowed (svcMapDeviceAddressSpace and svcMapDeviceAddressSpaceByForce). |
| MemState_MapDeviceAlignedAllowed |
Map device aligned allowed. |
| MemState_IpcBufferAllowed |
IPC buffer allowed. |
| MemState_IsPoolAllocated |
Is pool allocated. |
| MemState_IsRefCounted |
Alias for MemState_IsPoolAllocated. |
| MemState_MapProcessAllowed |
Map process allowed. |
| MemState_AttrChangeAllowed |
Attribute change allowed. |
| MemState_JitMemAllowed |
JIT memory allowed. |
| enum MemoryType |
Memory type enumeration (lower 8 bits of MemoryState)
| Enumerator | |
|---|---|
| MemType_Unmapped |
Unmapped memory. |
| MemType_Io |
Mapped by kernel capability parsing in svcCreateProcess. |
| MemType_Normal |
Mapped by kernel capability parsing in svcCreateProcess. |
| MemType_CodeStatic |
Mapped during svcCreateProcess. |
| MemType_CodeMutable |
Transition from MemType_CodeStatic performed by svcSetProcessMemoryPermission. |
| MemType_Heap |
Mapped using svcSetHeapSize. |
| MemType_SharedMem |
Mapped using svcMapSharedMemory. |
| MemType_WeirdMappedMem |
Mapped using svcMapMemory. |
| MemType_ModuleCodeStatic |
Mapped using svcMapProcessCodeMemory. |
| MemType_ModuleCodeMutable |
Transition from MemType_ModuleCodeStatic performed by svcSetProcessMemoryPermission. |
| MemType_IpcBuffer0 |
IPC buffers with descriptor flags=0. |
| MemType_MappedMemory |
Mapped using svcMapMemory. |
| MemType_ThreadLocal |
Mapped during svcCreateThread. |
| MemType_TransferMemIsolated |
Mapped using svcMapTransferMemory when the owning process has perm=0. |
| MemType_TransferMem |
Mapped using svcMapTransferMemory when the owning process has perm!=0. |
| MemType_ProcessMem |
Mapped using svcMapProcessMemory. |
| MemType_Reserved |
Reserved. |
| MemType_IpcBuffer1 |
IPC buffers with descriptor flags=1. |
| MemType_IpcBuffer3 |
IPC buffers with descriptor flags=3. |
| MemType_KernelStack |
Mapped in kernel during svcCreateThread. |
| MemType_JitReadOnly |
Mapped in kernel during svcMapJitMemory. |
| MemType_JitWritable |
Mapped in kernel during svcMapJitMemory. |
| enum Permission |
| enum ProcessInfoType |
| enum ProcessState |
Process States.
Accepts an IPC session.
Arbitrates a mutex lock operation in userspace.
Arbitrates a mutex unlock operation in userspace.
Attaches a device address space to a device.
Breaks execution.
Panic.
| [in] | breakReason | Break reason. |
| [in] | inval1 | First break parameter. |
| [in] | inval2 | Second break parameter. |
Breaks an active debugging session.
| u64 svcCallSecureMonitor | ( | SecmonArgs * | regs | ) |
Calls a secure monitor function (TrustZone, EL3).
| regs | Arguments to pass to the secure monitor. |
Waits a svcWaitSynchronization operation being done on a synchronization object in another thread.
Clears an event's signalled status.
Closes a handle, decrementing the reference count of the corresponding kernel object.
This might result in the kernel freeing the object.
| handle | Handle to close. |
Connects to a registered named port.
Manages a named port.
Continues a debugging session.
Creates a virtual address space for binding device address spaces.
Creates a system event.
Creates an event and binds it to a specific hardware interrupt.
Creates JIT memory in the caller's address space [4.0.0+].
| Result svcCreatePort | ( | Handle * | portServer, |
| Handle * | portClient, | ||
| s32 | max_sessions, | ||
| bool | is_light, | ||
| const char * | name | ||
| ) |
Creates a port.
Creates a new process.
Creates a new Resource Limit handle.
Creates an IPC session.
Creates a block of shared memory.
| Result svcCreateThread | ( | Handle * | out, |
| void * | entry, | ||
| void * | arg, | ||
| void * | stack_top, | ||
| int | prio, | ||
| int | cpuid | ||
| ) |
Creates a thread.
Creates a block of transfer memory.
Debugs an active process.
Detaches a device address space from a device.
| void svcExitProcess | ( | void | ) |
Exits the current process.
| void svcExitThread | ( | void | ) |
Exits the current thread.
| u32 svcGetCurrentProcessorNumber | ( | void | ) |
Gets the current processor's number.
Gets an incoming debug event from a debugging session.
Gets the context of a thread in a debugging session.
Retrieves information about the system, or a certain kernel object.
| [out] | out | Variable to which store the information. |
| [in] | id0 | First ID of the property to retrieve. |
| [in] | handle | Handle of the object to retrieve information from, or INVALID_HANDLE to retrieve information about the system. |
| [in] | id1 | Second ID of the property to retrieve. |
Gets the PID associated with a process.
| Result svcGetProcessInfo | ( | u64 * | out, |
| Handle | proc, | ||
| ProcessInfoType | which | ||
| ) |
Gets a ProcessInfoType for a process.
Retrieves a list of all running processes.
| Result svcGetResourceLimitCurrentValue | ( | u64 * | out, |
| Handle | reslimit_h, | ||
| LimitableResource | which | ||
| ) |
Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
| Result svcGetResourceLimitLimitValue | ( | u64 * | out, |
| Handle | reslimit_h, | ||
| LimitableResource | which | ||
| ) |
Gets the maximum value a LimitableResource can have, for a Resource Limit handle.
Retrieves privileged information about the system, or a certain kernel object.
| [out] | out | Variable to which store the information. |
| [in] | id0 | First ID of the property to retrieve. |
| [in] | handle | Handle of the object to retrieve information from, or INVALID_HANDLE to retrieve information about the system. |
| [in] | id1 | Second ID of the property to retrieve. |
| u64 svcGetSystemTick | ( | void | ) |
Gets the current system tick.
Gets the TID associated with a process.
Gets a thread's priority.
Manages a named port.
| Result svcMapDeviceAddressSpaceAligned | ( | Handle | handle, |
| Handle | proc_handle, | ||
| u64 | map_addr, | ||
| u64 | dev_size, | ||
| u64 | dev_addr, | ||
| u32 | perm | ||
| ) |
Maps an attached device address space to an userspace address.
| Result svcMapDeviceAddressSpaceByForce | ( | Handle | handle, |
| Handle | proc_handle, | ||
| u64 | map_addr, | ||
| u64 | dev_size, | ||
| u64 | dev_addr, | ||
| u32 | perm | ||
| ) |
Maps an attached device address space to an userspace address.
| Result svcMapJitMemory | ( | Handle | jit_handle, |
| JitMapOperation | op, | ||
| void * | dst_addr, | ||
| u64 | size, | ||
| u64 | perm | ||
| ) |
Maps JIT memory in the caller's address space [4.0.0+].
Maps a memory range into a different range.
Mainly used for adding guard pages around stack. Source range gets reprotected to Perm_None (it can no longer be accessed), and MemAttr_IsBorrowed is set in the source MemoryAttribute.
| [in] | dst_addr | Destination address. |
| [in] | src_addr | Source address. |
| [in] | size | Size of the range. |
Maps new heap memory at the desired address.
[3.0.0+]
Maps unsafe memory (usable for GPU DMA) for a system module at the desired address.
[5.0.0+]
Maps normal heap in a certain process as executable code (used when loading NROs).
| [in] | proc | Process handle (cannot be CUR_PROCESS_HANDLE). |
| [in] | dst | Destination mapping address. |
| [in] | src | Source mapping address. |
| [in] | size | Size of the mapping. |
Maps the src address from the supplied process handle into the current process.
| [in] | dst | Address to which map the memory in the current process. |
| [in] | proc | Process handle. |
| [in] | src | Source mapping address. |
| [in] | size | Size of the memory. |
Maps a block of shared memory.
Maps a block of transfer memory.
Outputs debug text, if used during debugging.
| [in] | str | Text to output. |
| [in] | size | Size of the text in bytes. |
| Result svcQueryDebugProcessMemory | ( | MemoryInfo * | meminfo_ptr, |
| u32 * | pageinfo, | ||
| Handle | debug, | ||
| u64 | addr | ||
| ) |
Queries memory information from a process that is being debugged.
Returns a virtual address mapped to a given IO range.
| Result svcQueryMemory | ( | MemoryInfo * | meminfo_ptr, |
| u32 * | pageinfo, | ||
| u64 | addr | ||
| ) |
Query information about an address.
Will always fetch the lowest page-aligned mapping that contains the provided address.
| [out] | meminfo_ptr | MemoryInfo structure which will be filled in. |
| [out] | page_info | Page information which will be filled in. |
| [in] | addr | Address to query. |
Queries information about a certain virtual address, including its physical address.
Reads memory from a process that is being debugged.
Reads/writes a protected MMIO register.
| Result svcReplyAndReceive | ( | s32 * | index, |
| const Handle * | handles, | ||
| s32 | handleCount, | ||
| Handle | replyTarget, | ||
| u64 | timeout | ||
| ) |
Performs IPC input/output.
| Result svcReplyAndReceiveWithUserBuffer | ( | s32 * | index, |
| void * | usrBuffer, | ||
| u64 | size, | ||
| const Handle * | handles, | ||
| s32 | handleCount, | ||
| Handle | replyTarget, | ||
| u64 | timeout | ||
| ) |
Performs IPC input/output from an user allocated buffer.
Resets a signal.
| Result svcSendAsyncRequestWithUserBuffer | ( | Handle * | handle, |
| void * | usrBuffer, | ||
| u64 | size, | ||
| Handle | session | ||
| ) |
Sends an IPC synchronization request to a session from an user allocated buffer (asynchronous version).
Sends an IPC synchronization request to a session.
Sends an IPC synchronization request to a session from an user allocated buffer.
Set the process heap to a given size.
It can both extend and shrink the heap.
| [out] | out_addr | Variable to which write the address of the heap (which is randomized and fixed by the kernel) |
| [in] | size | Size of the heap, must be a multiple of 0x2000000 and [2.0.0+] less than 0x18000000. |
Set the memory attributes of a (page-aligned) range of memory.
| [in] | addr | Start address of the range. |
| [in] | size | Size of the range, in bytes. |
| [in] | val0 | State0 |
| [in] | val1 | State1 |
Set the memory permissions of a (page-aligned) range of memory.
| [in] | addr | Start address of the range. |
| [in] | size | Size of the range, in bytes. |
| [in] | perm | Permissions (see Permission). |
Sets the memory permissions for the specified memory with the supplied process handle.
| [in] | proc | Process handle. |
| [in] | addr | Address of the memory. |
| [in] | size | Size of the memory. |
| [in] | perm | Permissions (see Permission). |
perm is >0x5, hence -WX and RWX are not allowed. | Result svcSetResourceLimitLimitValue | ( | Handle | reslimit, |
| LimitableResource | which, | ||
| u64 | value | ||
| ) |
Sets the value for a LimitableResource for a Resource Limit handle.
Configures the pause/unpause status of a thread.
Sets a thread's priority.
Sets the system-wide limit for unsafe memory mappable using svcMapPhysicalMemoryUnsafe.
[5.0.0+]
Sets an event's signalled status.
Performs a condition variable wake-up operation in userspace.
Sleeps the current thread for the specified amount of time.
Starts executing a freshly created process.
Starts a freshly created thread.
Terminates a running process.
| Result svcUnmapDeviceAddressSpace | ( | Handle | handle, |
| Handle | proc_handle, | ||
| u64 | map_addr, | ||
| u64 | map_size, | ||
| u64 | dev_addr | ||
| ) |
Unmaps an attached device address space from an userspace address.
Unmaps a region that was previously mapped with svcMapMemory.
| [in] | dst_addr | Destination address. |
| [in] | src_addr | Source address. |
| [in] | size | Size of the range. |
Undoes the effects of svcMapPhysicalMemoryUnsafe.
[5.0.0+]
Undoes the effects of svcMapProcessCodeMemory.
| [in] | proc | Process handle (cannot be CUR_PROCESS_HANDLE). |
| [in] | dst | Destination mapping address. |
| [in] | src | Source mapping address. |
| [in] | size | Size of the mapping. |
Undoes the effects of svcMapProcessMemory.
| [in] | dst | Destination mapping address |
| [in] | proc | Process handle. |
| [in] | src | Address of the memory in the process. |
| [in] | size | Size of the memory. |
Unmaps a block of shared memory.
Unmaps a block of transfer memory.
Performs a condition variable wait operation in userspace.
Waits on one or more synchronization objects, optionally with a timeout.
Waits on a single synchronization object, optionally with a timeout.
Writes to memory in a process that is being debugged.
1.8.11