mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 10:32:15 +02:00
Implement svcGetSystemInfo, optimize svcCreatePort.
This commit is contained in:
parent
35ac78053b
commit
18d3a30864
@ -671,6 +671,24 @@ Result svcWriteDebugProcessMemory(Handle debug, void* buffer, u64 addr, u64 size
|
||||
|
||||
///@}
|
||||
|
||||
///@name Miscellaneous
|
||||
///@{
|
||||
|
||||
/**
|
||||
* @brief Retrieves privileged information about the system, or a certain kernel object.
|
||||
* @param[out] out Variable to which store the information.
|
||||
* @param[in] id0 First ID of the property to retrieve.
|
||||
* @param[in] handle Handle of the object to retrieve information from, or \ref INVALID_HANDLE to retrieve information about the system.
|
||||
* @param[in] id1 Second ID of the property to retrieve.
|
||||
* @return Result code.
|
||||
* @remark The full list of property IDs can be found on the <a href="http://switchbrew.org/index.php?title=SVC#svcGetSystemInfo">switchbrew.org wiki</a>.
|
||||
* @note Syscall number 0x6F.
|
||||
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||
*/
|
||||
Result svcGetSystemInfo(u64* out, u64 id0, Handle handle, u64 id1);
|
||||
|
||||
///@}
|
||||
|
||||
///@name Inter-process communication (IPC)
|
||||
///@{
|
||||
|
||||
|
@ -345,14 +345,20 @@ SVC_BEGIN svcWriteDebugProcessMemory
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcGetSystemInfo
|
||||
str x0, [sp, #-16]!
|
||||
svc 0x6F
|
||||
ldr x2, [sp], #16
|
||||
str x1, [x2]
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcCreatePort
|
||||
stp x0, x1, [sp, #-16]!
|
||||
svc 0x70
|
||||
ldr x3, [sp]
|
||||
ldp x3, x4, [sp], #16
|
||||
str w1, [x3]
|
||||
ldr x3, [sp, #8]
|
||||
str w2, [x3]
|
||||
add sp, sp, #16
|
||||
str w2, [x4]
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user