SVC: Difference between revisions
Fix broken table |
fix non-updated refs |
||
Line 230: | Line 230: | ||
Setting write-only is not allowed either (bit1). | Setting write-only is not allowed either (bit1). | ||
== | == svcSetMemoryAttribute == | ||
{| class=wikitable | {| class=wikitable | ||
! State0 || State1 || Action | ! State0 || State1 || Action | ||
|- | |- | ||
| 0 || 0 || Clear bit35 in [[# | | 0 || 0 || Clear bit35 in [[#MemoryAttribute]]. | ||
|- | |- | ||
| 8 || 0 || Clear bit35 in [[# | | 8 || 0 || Clear bit35 in [[#MemoryAttribute]]. | ||
|- | |- | ||
| 8 || 8 || Set bit35 in [[# | | 8 || 8 || Set bit35 in [[#MemoryAttribute]]. | ||
|} | |} | ||
This might used for switching between cached and non-cached mappings. | This might used for switching between cached and non-cached mappings. | ||
== | == svcMapMemory == | ||
Memory is only allowed to be mapped into a special region. | Memory is only allowed to be mapped into a special region. | ||
Code can get the range of this region from [[#svcGetInfo]]. | Code can get the range of this region from [[#svcGetInfo]]. | ||
The source region gets reprotected to ---, and sets bit32 is set in [[# | The source region gets reprotected to ---, and sets bit32 is set in [[#MemoryAttribute]]. | ||
== svcCreateThread == | == svcCreateThread == | ||
Line 256: | Line 256: | ||
Setting nano=0 means "yield thread". | Setting nano=0 means "yield thread". | ||
== | == svcCreateTransferMemory == | ||
This one reprotects the src block with perms you give it. It also sets bit32 into [[# | This one reprotects the src block with perms you give it. It also sets bit32 into [[#MemoryAttribute]]. | ||
Executable bit perm not allowed. | Executable bit perm not allowed. | ||
Closing all handles automatically causes the bit32 in [[# | Closing all handles automatically causes the bit32 in [[#MemoryAttribute]] to clear, and the permission to reset. | ||
== | == svcWaitSynchronization == | ||
Works with num_handles <= 0x40, error on num_handles == 0. | Works with num_handles <= 0x40, error on num_handles == 0. | ||
Does not accept 0xFFFF8001 or 0xFFFF8000 as handles. | Does not accept 0xFFFF8001 or 0xFFFF8000 as handles. | ||
== | == svcSendSyncRequestWithUserBuffer == | ||
Size must be 0x1000-aligned. | Size must be 0x1000-aligned. | ||
Line 311: | Line 311: | ||
|} | |} | ||
== | == svcMapTransferMemory == | ||
The newly mapped pages will have [[# | The newly mapped pages will have [[#MemoryAttribute]] type 0xE. | ||
You must pass same size and permissions as given in svcCreateMemoryMirror, otherwise error. | You must pass same size and permissions as given in svcCreateMemoryMirror, otherwise error. | ||
== | == svcUnmapTransferMemory == | ||
Size must match size given in map syscall, otherwise there's an invalid-size error. | Size must match size given in map syscall, otherwise there's an invalid-size error. | ||
== | == MemoryAttribute == | ||
{| class=wikitable | {| class=wikitable | ||
! Lower 8 bits || Type || Meaning | ! Lower 8 bits || Type || Meaning |