SVC: Difference between revisions
No edit summary |
|||
Line 224: | Line 224: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W1 || u64 || | | (In) W1 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) X1 || u64 || | | (Out) X1 || u64 || OutAddr | ||
|} | |} | ||
</div> | </div> | ||
'''Description:''' Set the process heap to a given | '''Description:''' Set the process heap to a given Size. It can both extend and shrink the heap. | ||
Size must be a multiple of 0x2000000. | |||
On success, the heap base-address (which is fixed by kernel, aslr'd) is written to | On success, the heap base-address (which is fixed by kernel, aslr'd) is written to OutAddr. | ||
[2.0.0+] | [2.0.0+] Size must be less than 0x18000000. | ||
== svcSetMemoryPermission == | == svcSetMemoryPermission == | ||
Line 247: | Line 247: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || void* || | | (In) X0 || void* || Addr | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || Size | ||
|- | |- | ||
| (In) W2 || [[#Permission]] || | | (In) W2 || [[#Permission]] || Prot | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 270: | Line 270: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || void* || | | (In) X0 || void* || Addr | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || Size | ||
|- | |- | ||
| (In) W2 || u32 || | | (In) W2 || u32 || State0 | ||
|- | |- | ||
| (In) W3 || u32 || | | (In) W3 || u32 || State1 | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 305: | Line 305: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || void* || | | (In) X0 || void* || DstAddr | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || SrcAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 323: | Line 323: | ||
If dstaddr >= LowerTreshold, the dst-range is enforced to be within the process' "MapRegion". Code can get the range of this region from [[#svcGetInfo]] id0=2,3. | If dstaddr >= LowerTreshold, the dst-range is enforced to be within the process' "MapRegion". Code can get the range of this region from [[#svcGetInfo]] id0=2,3. | ||
In this case, the mapped memory will have state | In this case, the mapped memory will have state 0x5C3C0B. | ||
As long as (dstaddr+size) < LowerThreshold, then you can map anywhere but the mapped memory will have state | As long as (dstaddr+size) < LowerThreshold, then you can map anywhere but the mapped memory will have state 0x482907 instead. | ||
LowerTreshold is 0x80000000 for 36-bit address spaces, and 0x40000000 for 32-bit ones. | LowerTreshold is 0x80000000 for 36-bit address spaces, and 0x40000000 for 32-bit ones. | ||
[2.0.0+] Support for the | [2.0.0+] Support for the 0x482907 mappings outside the "MapRegion" were removed. | ||
== svcUnmapMemory == | == svcUnmapMemory == | ||
Line 338: | Line 338: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || void* || | | (In) X0 || void* || DstAddr | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || SrcAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 361: | Line 361: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || [[#MemoryInfo]]* || | | (In) X0 || [[#MemoryInfo]]* || MemInfo | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || Addr | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || PageInfo || | | (Out) W1 || PageInfo || PageInfo | ||
|} | |} | ||
</div> | </div> | ||
Line 397: | Line 397: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || void(*)(void*) || | | (In) X1 || void(*)(void*) || Entry | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || Arg | ||
|- | |- | ||
| (In) X3 || void* || | | (In) X3 || void* || StackTop | ||
|- | |- | ||
| (In) W4 || u32 || | | (In) W4 || u32 || Priority | ||
|- | |- | ||
| (In) W5 || u32 || | | (In) W5 || u32 || ProcessorId | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || Handle<Thread> || | | (Out) W1 || Handle<Thread> || Handle | ||
|} | |} | ||
</div> | </div> | ||
Line 424: | Line 424: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Thread> || | | (In) W0 || Handle<Thread> || Handle | ||
|- | |- | ||
| (Out) None || || | | (Out) None || || | ||
Line 454: | Line 454: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || Nano | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 471: | Line 471: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W1|| Handle<Thread> || | | (In) W1|| Handle<Thread> || Handle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || u64 || | | (Out) W1 || u64 || Priority | ||
|} | |} | ||
</div> | </div> | ||
Line 488: | Line 488: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0|| Handle<Thread> || | | (In) W0|| Handle<Thread> || Handle | ||
|- | |- | ||
| (In) W1|| u32 || | | (In) W1|| u32 || Priority | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 507: | Line 507: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W2 || Handle<Thread> || | | (In) W2 || Handle<Thread> || Handle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || u32 || | | (Out) W1 || u32 || Out0 | ||
|- | |- | ||
| (Out) X2 || u64 || | | (Out) X2 || u64 || Out1 | ||
|} | |} | ||
</div> | </div> | ||
Line 526: | Line 526: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Thread> || | | (In) W0 || Handle<Thread> || Handle | ||
|- | |- | ||
| (In) W1 || u32 || | | (In) W1 || u32 || In0 | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || In1 | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 547: | Line 547: | ||
| (In) None || || | | (In) None || || | ||
|- | |- | ||
| (Out) W0/X0 || u64 || | | (Out) W0/X0 || u64 || CpuId | ||
|} | |} | ||
</div> | </div> | ||
Line 562: | Line 562: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<SharedMemory> || | | (In) W0 || Handle<SharedMemory> || MemHandle | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || Addr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (In) W3 || [[#Permission]] || | | (In) W3 || [[#Permission]] || Permissions | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 585: | Line 585: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || Addr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (In) W3 || [[#Permission]] || | | (In) W3 || [[#Permission]] || Permissions | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || Handle<TransferMemory> || | | (Out) W1 || Handle<TransferMemory> || Handle | ||
|} | |} | ||
</div> | </div> | ||
Line 610: | Line 610: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || Handle* || | | (In) X1 || Handle* || HandlesPtr | ||
|- | |- | ||
| (In) W2 || u64 || | | (In) W2 || u64 || HandlesNum | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Timeout | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || u64 || | | (Out) W1 || u64 || HandleIndex | ||
|} | |} | ||
</div> | </div> | ||
Line 647: | Line 647: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || void* || | | (In) X0 || void* || CmdPtr | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || Size | ||
|- | |- | ||
| (In) W2 || Handle<Session> || | | (In) W2 || Handle<Session> || Handle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 670: | Line 670: | ||
| (In) X1 || u64 || | | (In) X1 || u64 || | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Info | ||
|- | |- | ||
| (Out) ? || ? || | | (Out) ? || ? || ? | ||
|} | |} | ||
</div> | </div> | ||
Line 685: | Line 685: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || InfoId | ||
|- | |- | ||
| (In) W2 || Handle || | | (In) W2 || Handle || Handle | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || InfoSubId | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) X1 || u64 || | | (Out) X1 || u64 || Out | ||
|} | |} | ||
</div> | </div> | ||
Line 759: | Line 759: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W1 || Handle<Port> || | | (In) W1 || Handle<Port> || Port | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Result | ||
|- | |- | ||
| (Out) W1 || Handle<ServerSession> || | | (Out) W1 || Handle<ServerSession> || Session | ||
|} | |} | ||
</div> | </div> | ||
Line 778: | Line 778: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W1 || *Handle<Port or ServerSession> || | | (In) W1 || *Handle<Port or ServerSession> || Handles | ||
|- | |- | ||
| (In) W2 || u32 || | | (In) W2 || u32 || NumHandles | ||
|- | |- | ||
| (In) W3 || Handle<ServerSession> || | | (In) W3 || Handle<ServerSession> || ReplyTarget | ||
|- | |- | ||
| (In) X4 || u64 (nanoseconds) || | | (In) X4 || u64 (nanoseconds) || Timeout | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Result | ||
|- | |- | ||
| (Out) W1 || u32 || | | (Out) W1 || u32 || HandleIndex | ||
|} | |} | ||
</div> | </div> | ||
If | If ReplyTarget is not zero, a reply from the TLS will be sent to that session. | ||
Then it will wait until either of the passed sessions has an incoming message, is closed, a passed port has an incoming connection, or the timeout expires. | Then it will wait until either of the passed sessions has an incoming message, is closed, a passed port has an incoming connection, or the timeout expires. | ||
If there is an incoming message, it is copied to the TLS. | If there is an incoming message, it is copied to the TLS. | ||
Line 800: | Line 800: | ||
=== Result codes === | === Result codes === | ||
'''0x0:''' Success. Either a session has an incoming message or a port has an incoming connection. | '''0x0:''' Success. Either a session has an incoming message or a port has an incoming connection. HandleIndex is set appropriately. | ||
'''0xea01:''' Timeout. No handles were signalled before the timeout expired. | '''0xea01:''' Timeout. No handles were signalled before the timeout expired. HandleIndex is not updated. | ||
'''0xf601:''' Port remote dead. One of the sessions has been closed. | '''0xf601:''' Port remote dead. One of the sessions has been closed. HandleIndex is set appropriately. | ||
== svcReadWriteRegister == | == svcReadWriteRegister == | ||
Line 813: | Line 813: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || RegAddr | ||
|- | |- | ||
| (In) W2 || u64 || | | (In) W2 || u64 || RwMask | ||
|- | |- | ||
| (In) W3 || u64 || | | (In) W3 || u64 || InValue | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1|| u64 || | | (Out) W1|| u64 || OutValue | ||
|} | |} | ||
</div> | </div> | ||
Line 834: | Line 834: | ||
The whitelist is: | The whitelist is: | ||
0x054, 0x090, 0x094, 0x098, 0x09c, 0x0a0, 0x0a4, 0x0a8, 0x0ac, 0x0b0, 0x0b4, 0x0b8, 0x0bc, 0x0c0, 0x0c4, 0x0c8, 0x0d0, 0x0d4, 0x0d8, 0x0dc, 0x0e0, 0x100, 0x108, 0x10c, 0x118, 0x11c, 0x124, 0x128, 0x12c, 0x130, 0x134, 0x138, 0x13c, 0x158, 0x15c, 0x164, 0x168, 0x16c, 0x170, 0x174, 0x178, 0x17c, 0x200, 0x204, 0x2e4, 0x2e8, 0x2ec, 0x2f4, 0x2f8, 0x310, 0x314, 0x320, 0x328, 0x344, 0x348, 0x370, 0x374, 0x37c, 0x380, 0x390, 0x394, 0x398, 0x3ac, 0x3b8, 0x3bc, 0x3c0, 0x3c4, 0x3d8, 0x3e8, 0x41c, 0x420, 0x424, 0x428, 0x42c, 0x430, 0x44c, 0x47c, 0x480, 0x484, 0x50c, 0x554, 0x558, 0x55c, 0x670, 0x674, 0x690, 0x694, 0x698, 0x69c, 0x6a0, 0x6a4, 0x6c0, 0x6c4, 0x6f0, 0x6f4, 0x960, 0x970, 0x974, 0xa20, 0xa24, 0xb88, 0xb8c, 0xbc4, 0xbc8, 0xbcc, 0xbd0, 0xbd4, 0xbd8, 0xbdc, 0xbe0, 0xbe4, 0xbe8, 0xbec, 0xc00, 0xc5c, 0xcac | 0x054, 0x090, 0x094, 0x098, 0x09c, 0x0a0, 0x0a4, 0x0a8, 0x0ac, 0x0b0, 0x0b4, 0x0b8, 0x0bc, 0x0c0, 0x0c4, 0x0c8, 0x0d0, 0x0d4, 0x0d8, 0x0dc, 0x0e0, 0x100, 0x108, 0x10c, 0x118, 0x11c, 0x124, 0x128, 0x12c, 0x130, 0x134, 0x138, 0x13c, 0x158, 0x15c, 0x164, 0x168, 0x16c, 0x170, 0x174, 0x178, 0x17c, 0x200, 0x204, 0x2e4, 0x2e8, 0x2ec, 0x2f4, 0x2f8, 0x310, 0x314, 0x320, 0x328, 0x344, 0x348, 0x370, 0x374, 0x37c, 0x380, 0x390, 0x394, 0x398, 0x3ac, 0x3b8, 0x3bc, 0x3c0, 0x3c4, 0x3d8, 0x3e8, 0x41c, 0x420, 0x424, 0x428, 0x42c, 0x430, 0x44c, 0x47c, 0x480, 0x484, 0x50c, 0x554, 0x558, 0x55c, 0x670, 0x674, 0x690, 0x694, 0x698, 0x69c, 0x6a0, 0x6a4, 0x6c0, 0x6c4, 0x6f0, 0x6f4, 0x960, 0x970, 0x974, 0xa20, 0xa24, 0xb88, 0xb8c, 0xbc4, 0xbc8, 0xbcc, 0xbd0, 0xbd4, 0xbd8, 0xbdc, 0xbe0, 0xbe4, 0xbe8, 0xbec, 0xc00, 0xc5c, 0xcac | ||
[2.0.0+] Whitelist was extended with | |||
[2.0.0+] Whitelist was extended with 0x4c4, 0x4c8, 0x4cc, 0x584, 0x588, 0x58c. | |||
[2.0.0+] The IO registers in range 0x7000E400 (PMC) size 0xC00 skip the whitelist, and do a TrustZone call using [[SMC]] Id1 0xC3000008(ReadWriteRegister). | [2.0.0+] The IO registers in range 0x7000E400 (PMC) size 0xC00 skip the whitelist, and do a TrustZone call using [[SMC]] Id1 0xC3000008(ReadWriteRegister). | ||
Here is the whitelist imposed by that SMC, relative to the start of the PMC registers: | Here is the whitelist imposed by that SMC, relative to the start of the PMC registers: | ||
0x000, 0x00c, 0x010, 0x014, 0x01c, 0x020, 0x02c, 0x030, 0x034, 0x038, 0x03c, 0x040, 0x044, 0x048, 0x0dc, 0x0e0, 0x0e4, 0x160, 0x164, 0x168, 0x170, 0x1a8, 0x1b8, 0x1bc, 0x1c0, 0x1c4, 0x1c8, 0x2b4, 0x2d4, 0x440, 0x4d8 | 0x000, 0x00c, 0x010, 0x014, 0x01c, 0x020, 0x02c, 0x030, 0x034, 0x038, 0x03c, 0x040, 0x044, 0x048, 0x0dc, 0x0e0, 0x0e4, 0x160, 0x164, 0x168, 0x170, 0x1a8, 0x1b8, 0x1bc, 0x1c0, 0x1c4, 0x1c8, 0x2b4, 0x2d4, 0x440, 0x4d8 | ||
== svcCreateSharedMemory == | == svcCreateSharedMemory == | ||
Line 854: | Line 854: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W1 || u64 || | | (In) W1 || u64 || Size | ||
|- | |- | ||
| (In) W2 || [[#Permission]] || | | (In) W2 || [[#Permission]] || LocalPerm | ||
|- | |- | ||
| (In) W3 || [[#Permission]] || | | (In) W3 || [[#Permission]] || RemotePerm | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || Handle<SharedMemory> || | | (Out) W1 || Handle<SharedMemory> || MemHandle | ||
|} | |} | ||
</div> | </div> | ||
Line 875: | Line 875: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || Handle<TransferMemory> || | | (In) X0 || Handle<TransferMemory> || MemHandle | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || Addr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (In) W3 || [[#Permission]] || | | (In) W3 || [[#Permission]] || Permissions | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 898: | Line 898: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || Handle<TransferMemory> || | | (In) X0 || Handle<TransferMemory> || MemHandle | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || Addr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 917: | Line 917: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || Addr | ||
|- | |- | ||
| (Out) W0 || [[#Result]]|| | | (Out) W0 || [[#Result]]|| Ret | ||
|- | |- | ||
| (Out) X1 || u64 || | | (Out) X1 || u64 || PhysAddr | ||
|- | |- | ||
| (Out) X2 || u64 || | | (Out) X2 || u64 || KernelAddr | ||
|- | |- | ||
| (Out) X3 || u64 || | | (Out) X3 || u64 || Size | ||
|} | |} | ||
</div> | </div> | ||
Line 936: | Line 936: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || PhysAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) X1 || void* || | | (Out) X1 || void* || VirtAddr | ||
|} | |} | ||
</div> | </div> | ||
Line 955: | Line 955: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || StartAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || EndAddr | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || Handle<DeviceAddressSpace> || | | (Out) W1 || Handle<DeviceAddressSpace> || AddressSpaceHandle | ||
|} | |} | ||
</div> | </div> | ||
Line 976: | Line 976: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || [[#DeviceName]] || | | (In) W0 || [[#DeviceName]] || DeviceId | ||
|- | |- | ||
| (In) X1 || Handle<DeviceAddressSpace> || | | (In) X1 || Handle<DeviceAddressSpace> || DeviceAsHandle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 993: | Line 993: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || [[#DeviceName]] || | | (In) W0 || [[#DeviceName]] || DeviceId | ||
|- | |- | ||
| (In) X1 || Handle<DeviceAddressSpace> || | | (In) X1 || Handle<DeviceAddressSpace> || DeviceAsHandle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,010: | Line 1,010: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<DeviceAddressSpace> || | | (In) W0 || Handle<DeviceAddressSpace> || DeviceAsHandle | ||
|- | |- | ||
| (In) W1 || Handle<Process> || | | (In) W1 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || SrcAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || DeviceAsSize | ||
|- | |- | ||
| (In) X4 || u64 || | | (In) X4 || u64 || DeviceAsAddr | ||
|- | |- | ||
| (In) W5 || [[#Permission]] || | | (In) W5 || [[#Permission]] || Permissions | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,039: | Line 1,039: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<DeviceAddressSpace> || | | (In) W0 || Handle<DeviceAddressSpace> || DeviceAsHandle | ||
|- | |- | ||
| (In) W1 || Handle<Process> || | | (In) W1 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || SrcAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || DeviceAsSize | ||
|- | |- | ||
| (In) X4 || u64 || | | (In) X4 || u64 || DeviceAsAddr | ||
|- | |- | ||
| (In) W5 || [[#Permission]] || | | (In) W5 || [[#Permission]] || Permissions | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,066: | Line 1,066: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<DeviceAddressSpace> || | | (In) W0 || Handle<DeviceAddressSpace> || DeviceAsHandle | ||
|- | |- | ||
| (In) W1 || Handle<Process> || | | (In) W1 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || SrcAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || DeviceAsSize | ||
|- | |- | ||
| (In) X4 || u64 || | | (In) X4 || u64 || DeviceAsAddr | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,089: | Line 1,089: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || u64 || | | (In) X0 || u64 || SrcAddr | ||
|- | |- | ||
| (In) W1 || u64 || | | (In) W1 || u64 || ProcessHandle | ||
|- | |- | ||
| (In) X2 || void* || | | (In) X2 || void* || DstAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,112: | Line 1,112: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Process> || | | (In) W0 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X1 || void* || | | (In) X1 || void* || DstAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || SrcAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,133: | Line 1,133: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X0 || [[#MemoryInfo]]* || | | (In) X0 || [[#MemoryInfo]]* || MemInfoPtr | ||
|- | |- | ||
| (In) W2 || Handle<Process> || | | (In) W2 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Addr | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || PageInfo || | | (Out) W1 || PageInfo || PageInfo | ||
|} | |} | ||
</div> | </div> | ||
Line 1,154: | Line 1,154: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Process> || | | (In) W0 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || DstAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || SrcAddr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,175: | Line 1,175: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Process> || | | (In) W0 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (In) X1 || u64 || | | (In) X1 || u64 || DstAddr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || Src Addr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || Size | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|} | |} | ||
</div> | </div> | ||
Line 1,196: | Line 1,196: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) X1 || [[#CreateProcessInfo]]* || | | (In) X1 || [[#CreateProcessInfo]]* || InfoPtr | ||
|- | |- | ||
| (In) X2 || u64 || | | (In) X2 || u64 || CapabilitiesPtr | ||
|- | |- | ||
| (In) X3 || u64 || | | (In) X3 || u64 || CapibilitiesNum | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || Handle<Process> || | | (Out) W1 || Handle<Process> || ProcessHandle | ||
|} | |} | ||
</div> | </div> | ||
Line 1,217: | Line 1,217: | ||
! Argument || Type || Name | ! Argument || Type || Name | ||
|- | |- | ||
| (In) W0 || Handle<Process> || | | (In) W0 || Handle<Process> || ProcessHandle | ||
|- | |- | ||
| (Out) W0 || [[#Result]] || | | (Out) W0 || [[#Result]] || Ret | ||
|- | |- | ||
| (Out) W1 || [[#ProcessState]] || | | (Out) W1 || [[#ProcessState]] || State | ||
|} | |} | ||
</div> | </div> | ||
Line 1,508: | Line 1,508: | ||
! Value || Type || Meaning | ! Value || Type || Meaning | ||
|- | |- | ||
| | | 0x00000000 || MemoryType_Unmapped || | ||
|- | |- | ||
| | | 0x00002001 || MemoryType_Io || Mapped by kernel capability parsing in [[#svcCreateProcess]]. | ||
|- | |- | ||
| | | 0x00042002 || MemoryType_Normal || Mapped by kernel capability parsing in [[#svcCreateProcess]]. | ||
|- | |- | ||
| | | 0x00DC7E03 || MemoryType_CodeStatic || Mapped during [[#svcCreateProcess]]. | ||
|- | |- | ||
| | | 0x01FEBD04 || MemoryType_CodeMutable || Transition from 0xDC7E03 performed by [[#svcSetProcessMemoryPermission]]. | ||
|- | |- | ||
| | | 0x017EBD05 || MemoryType_Heap || Mapped using [[#svcSetHeapSize]]. | ||
|- | |- | ||
| | | 0x00402006 || MemoryType_SharedMemory || Mapped using [[#svcMapSharedMemory]]. | ||
|- | |- | ||
| | | 0x00482907 || [1.0.0] MemoryType_WeirdSharedMemory || Mapped using [[#svcMapMemory]]. | ||
|- | |- | ||
| | | 0x00DD7E08 || MemoryType_ModuleCodeStatic || Mapped using [[#svcMapProcessCodeMemory]]. | ||
|- | |- | ||
| | | 0x01FFBD09 || MemoryType_ModuleCodeMutable || Transition from 0xDD7E08 performed by [[#svcSetProcessMemoryPermission]]. | ||
|- | |- | ||
| | | 0x005C3C0A || [[IPC_Marshalling|MemoryType_IpcBuffer0]] || IPC buffers with descriptor flags=0. | ||
|- | |- | ||
| | | 0x005C3C0B || MemoryType_MappedMemory || Mapped using [[#svcMapMemory]]. | ||
|- | |- | ||
| | | 0x0040200C || [[Thread Local Storage|MemoryType_ThreadLocal]] || Mapped during [[#svcCreateThread]]. | ||
|- | |- | ||
| | | 0x015C3C0D || MemoryType_TransferMemoryIsolated || Mapped using [[#svcMapTransferMemory]] when the owning process has perm=0. | ||
|- | |- | ||
| | | 0x005C380E || MemoryType_TransferMemory || Mapped using [[#svcMapTransferMemory]] when the owning process has perm!=0. | ||
|- | |- | ||
| | | 0x0040380F || MemoryType_ProcessMemory || Mapped using [[#svcMapProcessMemory]]. | ||
|- | |- | ||
| | | 0x00000010 || MemoryType_Reserved || | ||
|- | |- | ||
| | | 0x005C3811 || [[IPC_Marshalling|MemoryType_IpcBuffer1]] || IPC buffers with descriptor flags=1. | ||
|- | |- | ||
| | | 0x004C2812 || [[IPC_Marshalling|MemoryType_IpcBuffer3]] || IPC buffers with descriptor flags=3. | ||
|- | |- | ||
| | | 0x00002013 || MemoryType_KernelStack || Mapped in kernel during [[#svcCreateThread]]. | ||
|} | |} | ||