Line 13: |
Line 13: |
| | 0x5 || [[#svcUnmapMemory]] || X0=dstaddr, X1=srcaddr, X2=size || W0=result | | | 0x5 || [[#svcUnmapMemory]] || X0=dstaddr, X1=srcaddr, X2=size || W0=result |
| |- | | |- |
− | | 0x6 || svcQueryMemory || X0=meminfo_ptr, X2=addr || W0=result, W1=pageinfo | + | | 0x6 || [[#svcQueryMemory]] || X0=meminfo_ptr, X2=addr || W0=result, W1=pageinfo |
| |- | | |- |
− | | 0x7 || svcExitProcess || None || | + | | 0x7 || [[#svcExitProcess]] || None || |
| |- | | |- |
| | 0x8 || [[#svcCreateThread]] || X1=entry, X2=arg, X3=stacktop, W4=prio, W5=processor_id || W0=result, W1=handle | | | 0x8 || [[#svcCreateThread]] || X1=entry, X2=arg, X3=stacktop, W4=prio, W5=processor_id || W0=result, W1=handle |
Line 264: |
Line 264: |
| | | |
| The srcaddr/dstaddr must match what was given when the pages were originally mapped. | | The srcaddr/dstaddr must match what was given when the pages were originally mapped. |
| + | |
| + | == svcQueryMemory == |
| + | '''Description:''' Query information about an address. Will always fetch the lowest page-aligned mapping that contains the provided address. |
| + | |
| + | Outputs a [[#MemoryInfo]] struct. |
| + | |
| + | == svcExitProcess == |
| + | '''Description:''' Exits the current process. |
| | | |
| == svcCreateThread == | | == svcCreateThread == |
Line 543: |
Line 551: |
| |- | | |- |
| | 0x2C || 4 || | | | 0x2C || 4 || |
| + | |} |
| + | |
| + | == MemoryInfo == |
| + | {| class=wikitable |
| + | ! Offset || Length || Description |
| + | |- |
| + | | 0 || 8 || BaseAddress |
| + | |- |
| + | | 8 || 8 || Size |
| + | |- |
| + | | 0x10 || 4 || MemoryType: lower 8 bits of [[#MemoryState]] |
| + | |- |
| + | | 0x14 || 4 || [[#MemoryAttribute]] |
| + | |- |
| + | | 0x18 || 4 || Permission (bit0: R, bit1: W, bit2: X) |
| + | |- |
| + | | 0x1C || 4 || DeviceRefCount |
| + | |- |
| + | | 0x20 || 4 || IpcRefCount |
| |} | | |} |
| | | |