SVC: Difference between revisions
 Official svc names through 4.0.0  | 
				|||
| Line 91: | Line 91: | ||
| 0x2B || svcFlushDataCache || X0=addr, X1=size || W0=result  | | 0x2B || svcFlushDataCache || X0=addr, X1=size || W0=result  | ||
|-  | |-  | ||
| 0x2C || [3.0.0+] [[#  | | 0x2C || [3.0.0+] [[#svcMapPhysicalMemory]] || X0=addr, X1=size || W0=result  | ||
|-  | |-  | ||
| 0x2D || [3.0.0+]   | | 0x2D || [3.0.0+] svcUnmapPhysicalMemory || X0=addr, X1=size || W0=result  | ||
|-  | |-  | ||
| 0x2E || [5.0.0+] svcGetNextThreadInfo || X3=timeout || W0=result, bunch of crap  | | 0x2E || [5.0.0+] svcGetNextThreadInfo || X3=timeout || W0=result, bunch of crap  | ||
| Line 107: | Line 107: | ||
| 0x33 || svcGetThreadContext3 || W0=thread_handle, W1=[[#ThreadContext]]* || W0=result  | | 0x33 || svcGetThreadContext3 || W0=thread_handle, W1=[[#ThreadContext]]* || W0=result  | ||
|-  | |-  | ||
| 0x34 || [4.0.0+] || X0=ptr, W1=  | | 0x34 || [4.0.0+] svcWaitForAddress || X0=ptr, W1=ArbitrationType, X2=? X3=timeout ||  | ||
|-  | |-  | ||
| 0x35 || [4.0.0+] || X0=ptr, W1=  | | 0x35 || [4.0.0+] svcSignalToAddress || X0=ptr, W1=SignalType, X2=? W3=? ||  | ||
|- style="border-top: double"  | |- style="border-top: double"  | ||
| 0x3C || [[#svcDumpInfo]] || ||  | | 0x3C || [[#svcDumpInfo]] || ||  | ||
| Line 133: | Line 133: | ||
| 0x4A || [5.0.0+] svcSetUserHeapMemoryAllocationMax || X0=size || W0=result  | | 0x4A || [5.0.0+] svcSetUserHeapMemoryAllocationMax || X0=size || W0=result  | ||
|-  | |-  | ||
| 0x4B || [4.0.0+] [[#  | | 0x4B || [4.0.0+] [[#svcCreateCodeMemory]] || X1=addr, X2=size || W0=result, W1=jit_handle  | ||
|-  | |-  | ||
| 0x4C || [4.0.0+] [[#  | | 0x4C || [4.0.0+] [[#svcControlCodeMemory]] || W0=jit_handle, W1=[[#CodeMemoryOperation]], X2=dstaddr, X3=size, W4=perm || W0=result  | ||
|-  | |-  | ||
| 0x4D || svcSleepSystem || None || None  | | 0x4D || svcSleepSystem || None || None  | ||
| Line 786: | Line 786: | ||
|}  | |}  | ||
==   | == svcMapPhysicalMemory ==  | ||
This is like svcSetHeapSize except you can allocate heap at any address you'd like.  | This is like svcSetHeapSize except you can allocate heap at any address you'd like.  | ||
| Line 863: | Line 863: | ||
Same as [[#svcAllocateHeapMemory]] except it always uses pool partition 0.  | Same as [[#svcAllocateHeapMemory]] except it always uses pool partition 0.  | ||
==   | == svcCreateCodeMemory ==  | ||
Takes an address range with backing memory to create the JIT memory object.  | Takes an address range with backing memory to create the JIT memory object.  | ||
The memory is initially memset to 0xFF after being locked.  | The memory is initially memset to 0xFF after being locked.  | ||
==   | == svcControlMemory ==  | ||
Maps the backing memory for a   | Maps the backing memory for a Code memory object into the current process.  | ||
For [[#  | For [[#CodeMemoryOperation|CodeMemoryOperation_MapOwner]], memory permission must be RW-.  | ||
For [[#  | For [[#CodeMemoryOperation|CodeMemoryOperation_MapSlave]], memory permission must be R-- or R-X.  | ||
Operations [[#  | Operations [[#CodeMemoryOperation|CodeMemoryOperation_UnmapOwner/CodeMemoryOperation_UnmapSlave]] unmap memory that was previously mapped this way.  | ||
This allows one "secure JIT" process to map the memory as RW-, and the other "slave" process to map it R-X.  | This allows one "secure JIT" process to map the memory as RW-, and the other "slave" process to map it R-X.  | ||
| Line 1,697: | Line 1,697: | ||
| 0x00002013 || MemoryType_KernelStack || Mapped in kernel during [[#svcCreateThread]].  | | 0x00002013 || MemoryType_KernelStack || Mapped in kernel during [[#svcCreateThread]].  | ||
|-  | |-  | ||
| 0x00402214 || [4.0.0+]   | | 0x00402214 || [4.0.0+] MemoryType_CodeReadOnly || Mapped in kernel during [[#svcControlCodeMemory]].  | ||
|-  | |-  | ||
| 0x00402015 || [4.0.0+]   | | 0x00402015 || [4.0.0+] MemoryType_CodeWritable || Mapped in kernel during [[#svcControlCodeMemory]].  | ||
|}  | |}  | ||