SVC: Difference between revisions
Update SVCs to reflect 15.0.0 |
|||
| (16 intermediate revisions by 5 users not shown) | |||
| Line 169: | Line 169: | ||
| 0x54 || Result || [[#QueryPhysicalAddress|QueryPhysicalAddress]] || arch::PhysicalMemoryInfo *out_info, uintptr_t address | | 0x54 || Result || [[#QueryPhysicalAddress|QueryPhysicalAddress]] || arch::PhysicalMemoryInfo *out_info, uintptr_t address | ||
|- | |- | ||
| 0x55 || Result || [[#QueryIoMapping|QueryIoMapping]] || uintptr_t *out_address, [10.0.0+] size_t *out_size, PhysicalAddress physical_address, size_t size | | [1.0.0-9.2.0] 0x55 || Result || [[#QueryIoMapping|QueryIoMapping]] || uintptr_t *out_address, PhysicalAddress physical_address, size_t size | ||
|- | |||
| [10.0.0+] 0x55 || Result || QueryMemoryMapping || uintptr_t *out_address, size_t *out_size, PhysicalAddress physical_address, size_t size | |||
|- | |- | ||
| 0x56 || Result || [[#CreateDeviceAddressSpace|CreateDeviceAddressSpace]] || Handle *out_handle, uint64_t das_address, uint64_t das_size | | 0x56 || Result || [[#CreateDeviceAddressSpace|CreateDeviceAddressSpace]] || Handle *out_handle, uint64_t das_address, uint64_t das_size | ||
| Line 252: | Line 254: | ||
|- | |- | ||
| 0x7F || void || [[#CallSecureMonitor|CallSecureMonitor]] || SecureMonitorArguments *args | | 0x7F || void || [[#CallSecureMonitor|CallSecureMonitor]] || SecureMonitorArguments *args | ||
|- | |||
| [S2] 0x80 || Result || SetMemoryAttribute2? || uintptr_t address, size_t size, uint32_t mask, uint32_t attr | |||
|- style="border-top: double" | |- style="border-top: double" | ||
| [15.0.0+] 0x90 || Result || | | [15.0.0+] 0x90 || Result || MapInsecurePhysicalMemory || uintptr_t address, size_t size | ||
|- | |- | ||
| [15.0.0+] 0x91 || Result || | | [15.0.0+] 0x91 || Result || UnmapInsecurePhysicalMemory || uintptr_t address, size_t size | ||
|- | |- | ||
|} | |} | ||
| Line 505: | Line 509: | ||
! Argument64 || Argument32 || Type || Name | ! Argument64 || Argument32 || Type || Name | ||
|- | |- | ||
| (In) X0 || R0, R1 || | | (In) X0 || R0, R1 || int64_t || Nanoseconds | ||
|} | |} | ||
</div> | </div> | ||
| Line 647: | Line 651: | ||
</div> | </div> | ||
Takes the given event out of the signaled state. | Takes the given event out of the signaled state, if it is signaled. | ||
=== Result codes === | === Result codes === | ||
| Line 653: | Line 657: | ||
'''0xE401:''' Invalid handle. The handle either does not exist, or is not a ReadableEvent nor a WritableEvent. | '''0xE401:''' Invalid handle. The handle either does not exist, or is not a ReadableEvent nor a WritableEvent. | ||
== MapSharedMemory == | == MapSharedMemory == | ||
| Line 742: | Line 744: | ||
</div> | </div> | ||
Resets the signal on the given handle, ensuring future calls to [[#WaitSynchronization]] on this handle will sleep until the handle is signaled again. If the handle is a ReadableEvent, this is | Resets the signal on the given handle, ensuring future calls to [[#WaitSynchronization]] on this handle will sleep until the handle is signaled again. If the handle is a ReadableEvent, this returns ResultInvalidState if the event is not signaled. | ||
If the handle is a Process, it will clear the signaled state (which is set when the process changes [[#ProcessState]]. Once the process enters the Exited state, calling ResetSignal on the process will no longer have an effect (the process is permanently signaled), and the syscall will return 0xFA01. | If the handle is a Process, it will clear the signaled state (which is set when the process changes [[#ProcessState]]. Once the process enters the Exited state, calling ResetSignal on the process will no longer have an effect (the process is permanently signaled), and the syscall will return 0xFA01. | ||
| Line 942: | Line 944: | ||
|} | |} | ||
</div> | </div> | ||
[S2] All errors returned by the SendSyncRequest* SVCs will automatically close the session (unknown whether handled by kernel/sysmodule). | |||
== SendSyncRequestWithUserBuffer == | == SendSyncRequestWithUserBuffer == | ||
| Line 2,662: | Line 2,666: | ||
|- | |- | ||
| Process || 26 || 0 || [14.0.0+] IsSvcPermitted | | Process || 26 || 0 || [14.0.0+] IsSvcPermitted | ||
|- | |||
| Process || 27 || 0 || [16.0.0+] IoRegionHint | |||
|- | |||
| Process || 28 || 0 || [18.0.0+] AliasRegionExtraSize | |||
|- | |||
| Process || 29 || 0 || [S2] Returns 0 in compatibility processes. | |||
|- | |||
| Process || 30 || 0 || [S2] Returns 0 in compatibility processes. | |||
|- | |||
| Process || 31 || 0 || [S2] | |||
|- | |||
| Process || 32 || 0 || [S2] | |||
|- | |||
| Process || 33 || 0 || [S2] ProcessPageSize | |||
|- | |||
| TransferMemory || 34 || 0 || [19.0.0+] TransferMemoryHint | |||
|} | |} | ||
| Line 2,995: | Line 3,015: | ||
|- | |- | ||
| 3 || Uncached || | | 3 || Uncached || | ||
|- | |||
| 4 || PermissionLocked || | |||
|- | |||
| 5-6 || [S2] ? || GPU/IOMMU related? | |||
|- | |||
|} | |} | ||
| Line 3,038: | Line 3,063: | ||
|- | |- | ||
| 25 || [4.0.0+] [[#CreateCodeMemory|FlagCanCodeMemory]] || | | 25 || [4.0.0+] [[#CreateCodeMemory|FlagCanCodeMemory]] || | ||
|- | |||
| 26 || [15.0.0+] FlagLinearMapped || | |||
|- | |||
| 27 || [17.0.0+] FlagCanPermissionLock || | |||
|} | |} | ||
| Line 3,109: | Line 3,138: | ||
|- | |- | ||
| 0x00002016 || [13.0.0+] Coverage || | | 0x00002016 || [13.0.0+] Coverage || | ||
|- | |||
| 0x05583817 || [15.0.0+] Insecure || | |||
|} | |} | ||
| Line 3,150: | Line 3,181: | ||
! Bit || Bitmask || Description | ! Bit || Bitmask || Description | ||
|- | |- | ||
| 0 || 1 || | | 0 || 1 || HandleException (note: doesn't need to be set in the same call than Resume) | ||
|- | |- | ||
| 1 || 2 || | | 1 || 2 || EnableExceptionEvent | ||
|- | |- | ||
| 2 || 4 || | | 2 || 4 || ContinueAll | ||
|- | |- | ||
| 3 || 8 || | | 3 || 8 || ContinueOthers | ||
|} | |} | ||
ContinueOthers is like ContinueAll but acts on all threads that aren't in the input list. The affected threads are resumed. | |||
Only one of of | Only one of of HandleException and EnableExceptionEvent can be set at a time. | ||
If the input number of threads is 0, this means "all threads". | If the input number of threads is 0, this means "all threads". | ||