<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johndoe</id>
	<title>Nintendo Switch Brew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johndoe"/>
	<link rel="alternate" type="text/html" href="https://switchbrew.org/wiki/Special:Contributions/Johndoe"/>
	<updated>2026-05-11T23:45:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=SVC&amp;diff=1499</id>
		<title>SVC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=SVC&amp;diff=1499"/>
		<updated>2017-07-12T13:37:54Z</updated>

		<summary type="html">&lt;p&gt;Johndoe: /* Registers */ Form&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= System calls =&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Id || Name || In || Out&lt;br /&gt;
|-&lt;br /&gt;
|  0x1 || [[#svcSetHeapSize]] || W1=size || W0=result, X1=outaddr&lt;br /&gt;
|-&lt;br /&gt;
|  0x2 || [[#svcSetMemoryPermission]] || X0=addr, X1=size, W2=prot || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x3 || [[#svcSetMemoryAttribute]] || X0=addr, X1=size, W2=state0, W3=state1 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x4 || [[#svcMapMemory]] || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x5 || svcUnmapMemory || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x6 || svcQueryMemory || X0=meminfo_ptr, X2=addr || W0=result, W1=pageinfo                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0x7 || svcExitProcess || None ||&lt;br /&gt;
|-&lt;br /&gt;
|  0x8 || [[#svcCreateThread]] || X1=entry, X2=arg, X3=stacktop, W4=prio, W5=processor_id  || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
|  0x9 || svcStartThread || W0=thread_handle ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xA || svcExitThread || None ||                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0xB || [[#svcSleepThread]] || X0=nano ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xC || svcGetThreadPriority || W1=thread_handle || W0=result, W1=prio&lt;br /&gt;
|-&lt;br /&gt;
|  0xD || svcSetThreadPriority || W0=thread_handle, W1=prio || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0xE || svcGetThreadCoreMask || W2=thread_handle || W0=result, W1=out, X2=out&lt;br /&gt;
|-&lt;br /&gt;
|  0xF || svcSetThreadCoreMask || W0=thread_handle, W1=in, X2=in2 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || svcGetCurrentProcessorNumber || None || W0/X0=cpuid&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || svcSignalEvent || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || svcClearEvent || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || svcMapSharedMemory || W0=memblk_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || svcUnmapSharedMemory || W0=memblk_handle, X1=addr, X2=size || W0=result                                                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[#svcCreateTransferMemory]] || X1=addr, X2=size, W3=perm || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || svcCloseHandle || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || svcResetSignal || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[#svcWaitSynchronization]] || X1=handles_ptr, W2=num_handles. X3=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || svcCancelSynchronization || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || svcArbitrateLock || W0=cur_thread_handle, X1=ptr, W2=req_thread_handle ||                                     &lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || svcArbitrateUnlock || X0=ptr ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || svcWaitProcessWideKeyAtomic || X0=ptr0, X1=ptr, W2=thread_handle, X3=timeout || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || svcSignalProcessWideKey || X0=ptr, W1=value || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || svcGetSystemTick ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || svcConnectToNamedPort || X1=port_name_str || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || svcSendSyncRequestLight ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || svcSendSyncRequest || X0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || [[#svcSendSyncRequestWithUserBuffer]] || X0=cmdbufptr, X1=size, X2=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || svcSendAsyncRequestWithUserBuffer ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || svcGetProcessId ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || svcGetThreadId || W0=thread_handle || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || svcBreak || X0,X1,X2=info || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || svcOutputDebugString || X0=str, X1=size || &lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || svcReturnFromException || X0=result || &lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || [[#svcGetInfo]] || X1=info_id, X2=handle, X3=info_sub_id || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A || svcFlushEntireDataCache ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2B || svcFlushDataCache ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || svcMapPhysicalMemory ||  || This SVC was added in version [[3.0.0]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D || svcUnmapPhysicalMemory||  || This SVC was added in version [[3.0.0]].&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F || svcGetLastThreadInfo ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || svcGetResourceLimitLimitValue ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || svcGetResourceLimitCurrentValue ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x32 || svcSetThreadActivity ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x33 || svcGetThreadContext3 ||  || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || svcDumpInfo ||  || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 || svcCreateSession || W2=?, X3=? || W0=result, W1=client_handle, W2=server_handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x41 || svcAcceptSession || W1=port_handle || W0=result, W1=session_handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x42 || svcReplyAndReceiveLight ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x43 || svcReplyAndReceive || X1=ptr_handles, W2=num_handles, X3=?, X4=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x44 || svcReplyAndReceiveWithUserBuffer|| X1=buf, X2=sz, X3=ptr_handles, W4=num_handles, X5=?, X6=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x45 || svcCreateEvent || None || W0=result, W1=client_handle ?, W2=server_handle ?&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D || svcSleepSystem ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x4E || [[#svcReadWriteRegister]] || X1=reg_addr, W2=rw_mask, W3=in_val || W0=result, W1=out_val&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F || svcSetProcessActivity ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x50 || svcCreateSharedMemory || W1=size?, W2=perm0, W3=perm1 || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x51 || [[#svcMapTransferMemory]] || X0=mirror_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x52 || [[#svcUnmapTransferMemory]] || W0=mirror_handle, X1=addr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x53 || svcCreateInterruptEvent || X1=irq_id || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 || svcQueryPhysicalAddress ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x55 || svcQueryIoMapping || X0=physaddr, X1=size || X0=virtaddr&lt;br /&gt;
|-&lt;br /&gt;
| 0x56 || svcCreateDeviceAddressSpace || X1=start_addr?, X2=size? || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x57 || svcAttachDeviceAddressSpace || W0=handle, X1=device? || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x58 || svcDetachDeviceAddressSpace || W0=handle, X1=device? || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x59 || svcMapDeviceAddressSpaceByForce || W0=handle, W1=proc_handle?, X2=proc_addr?, X3=size?, X4=map_addr?, W5=perm || W0=result &lt;br /&gt;
|-&lt;br /&gt;
| 0x5A || svcMapDeviceAddressSpaceAligned || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5B || svcMapDeviceAddressSpace || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5C || svcUnmapDeviceAddressSpace || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5D || svcInvalidateProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5E || svcStoreProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5F || svcFlushProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x60 || svcDebugActiveProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x61 || svcBreakDebugProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x62 || svcTerminateDebugProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x63 || svcGetDebugEvent || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x64 || svcContinueDebugEvent || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x65 || svcGetProcessList || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x66 || svcGetThreadList || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x67 || svcGetDebugThreadContext || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x68 || svcSetDebugThreadContext || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x69 || svcQueryDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6A || svcReadDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6B || svcWriteDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6C || svcSetHardwareBreakPoint || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6D || svcGetDebugThreadParam || || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x70 || svcCreatePort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x71 || svcManageNamedPort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x72 || svcConnectToPort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x73 || svcSetProcessMemoryPermission || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x74 || svcMapProcessMemory || X0=srcaddr, W1=process_handle, X2=dstaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x75 || svcUnmapProcessMemory || W0=process_handle, X1=dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x76 || svcQueryProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x77 || svcMapProcessCodeMemory || W0=process_handle, X21dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 || svcUnmapProcessCodeMemory || W0=process_handle, X1=dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x79 || svcCreateProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7A || svcStartProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7B || svcTerminateProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7C || svcGetProcessInfo || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7D || svcCreateResourceLimit || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7E || svcSetResourceLimitLimitValue || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7F || svcCallSecureMonitor || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcSetHeapSize ==&lt;br /&gt;
Size must be a multiple of 0x2000000. The heap base-address is written to out.&lt;br /&gt;
&lt;br /&gt;
== svcSetMemoryPermission ==&lt;br /&gt;
Bit2 of permission (exec) is not allowed.&lt;br /&gt;
&lt;br /&gt;
Setting write-only is not allowed either (bit1).&lt;br /&gt;
&lt;br /&gt;
== svcSetMemoryAttribute ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! State0 || State1 || Action&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Clear bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 0 || Clear bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 8 || Set bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This might used for switching between cached and non-cached mappings.&lt;br /&gt;
&lt;br /&gt;
== svcMapMemory ==&lt;br /&gt;
Memory is only allowed to be mapped into a special region.&lt;br /&gt;
&lt;br /&gt;
Code can get the range of this region from [[#svcGetInfo]].&lt;br /&gt;
&lt;br /&gt;
The source region gets reprotected to ---, and sets bit32 is set in [[#MemoryAttribute]].&lt;br /&gt;
&lt;br /&gt;
== svcCreateThread ==&lt;br /&gt;
Processor_id must be 0,1,2,3 or -2.&lt;br /&gt;
&lt;br /&gt;
== svcSleepThread ==&lt;br /&gt;
Setting nano=0 means &amp;quot;yield thread&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== svcCreateTransferMemory ==&lt;br /&gt;
This one reprotects the src block with perms you give it. It also sets bit32 into [[#MemoryAttribute]].&lt;br /&gt;
&lt;br /&gt;
Executable bit perm not allowed.&lt;br /&gt;
&lt;br /&gt;
Closing all handles automatically causes the bit32 in [[#MemoryAttribute]] to clear, and the permission to reset.&lt;br /&gt;
&lt;br /&gt;
== svcWaitSynchronization ==&lt;br /&gt;
Works with num_handles &amp;lt;= 0x40, error on num_handles == 0.&lt;br /&gt;
&lt;br /&gt;
Does not accept 0xFFFF8001 or 0xFFFF8000 as handles.&lt;br /&gt;
&lt;br /&gt;
== svcSendSyncRequestWithUserBuffer ==&lt;br /&gt;
Size must be 0x1000-aligned.&lt;br /&gt;
&lt;br /&gt;
== svcBreak ==&lt;br /&gt;
When used on retail where inx0 bit31 is clear, the system will throw a [[Error_codes|fatal-error]]. Otherwise when bit31 is set, it will return 0.&lt;br /&gt;
&lt;br /&gt;
== svcGetInfo ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Handle type || Id0 || Id1 || Description&lt;br /&gt;
|-&lt;br /&gt;
| Process || 0 || 0 || Core available mask. Always 0xF meaning all 4 cores available.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 1 || 0 || Always 0xfffffffff0000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 2 || 0 || Randomized unknown base-address.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 3 || 0 || Always 0x1000000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 4 || 0 || Heap base. Randomized.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 5 || 0 || Heap region size. Always 0x180000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 6 || 0 || Total memory usage?&lt;br /&gt;
|-&lt;br /&gt;
| Process || 7 || 0 || Process heap size.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 8 || 0 || Always 0. Used during exception handling.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 9 || 0 || This creates and returns an unknown handle.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 10 || -1, {current coreid} || Unknown. Output data changes each time this SVC is used. Global and core-specific tick-count?&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 11 || 0-3 || Returns random from TRNG. Used to seed usermode PRNGs. Unknown what exactly causes this output to change, however it does change when exiting+launching a process.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 12 || 0 || Address space start. Always 0x8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 13 || 0 || Address space size. Always 0x7ff8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 14 || 0 || Map region base. Randomized.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 15 || 0 || Map region size.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 18 || 0 || Title-id, introduced with [[3.0.0]]&lt;br /&gt;
|-&lt;br /&gt;
| ? || 0xF0000002 || 0 || Unknown. Uses the input handle. Returns a tick-count?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcReadWriteRegister ==&lt;br /&gt;
Read/write Tegra hardware registers, input address is physical-address.&lt;br /&gt;
&lt;br /&gt;
rw_mask is 0 for reading and -1 for writing.&lt;br /&gt;
&lt;br /&gt;
=== Registers ===&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Address || Register Name || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192E8 || MC_LATENCY_ALLOWANCE_DC_0_0 || Latency allowance settings for DC clients&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192EC || MC_LATENCY_ALLOWANCE_DC_1_0 || Latency allowance settings for DC clients&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F0 || MC_LATENCY_ALLOWANCE_DC_2_0 || Latency allowance settings for DC clients&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F4 || MC_LATENCY_ALLOWANCE_DCB_0_0 || Latency allowance settings for DCB clients&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F8 || MC_LATENCY_ALLOWANCE_DCB_1_0 || Latency allowance settings for DCB clients &lt;br /&gt;
|-&lt;br /&gt;
| 0x7001941C || MC_DIS_PTSA_RATE_0 || DDA rate for dis PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019420 || MC_DIS_PTSA_MIN_0 || DDA minimum value for direct client dis PTSA.&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019424 || MC_DIS_PTSA_MAX_0 || DDA maximum value for direct client dis PTSA.&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019428 || MC_DISB_PTSA_RATE_0 || DDA rate for disb PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001942C || MC_DISB_PTSA_MIN_0 || DDA minimum value for direct client disb PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019430 || MC_DISB_PTSA_MAX_0 || DDA maximum value for direct client disb PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001944C || MC_MLL_MPCORER_PTSA_RATE_0 || DDA rate for mll_mpcorer PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001947C || MC_RING1_PTSA_RATE_0 || DDA rate for ring1 PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019480 || MC_RING1_PTSA_MIN_0 || DDA minimum value for direct client ring1 PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019484 || MC_RING1_PTSA_MAX_0 || DDA maximum value for direct client ring1 PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001950C || MC_FTOP_PTSA_RATE_0 || DDA rate for ftop PTSA&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019670 || MC_SEC_CARVEOUT_BOM_0 || Baseaddress for the SEC carveout address space.&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019674 || MC_SEC_CARVEOUT_SIZE_MB_0 || Size in MB for the SEC carveout region&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019690 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0A_0 || Scaled Latency Allowance settings for DISPLAY0A&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019694 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0AB_0 || Scaled Latency Allowance settings for DISPLAY0AB&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019698 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0B_0 || Scaled Latency Allowance settings for DISPLAY0B&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001969C || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0BB_0 || Scaled Latency Allowance settings for DISPLAY0BB&lt;br /&gt;
|-&lt;br /&gt;
| 0x700196A0 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0C_0 || Scaled Latency Allowance settings for DISPLAY0C&lt;br /&gt;
|-&lt;br /&gt;
| 0x700196A4 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0CB_0 || Scaled Latency Allowance settings for DISPLAY0CB&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019C5C ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcMapTransferMemory ==&lt;br /&gt;
The newly mapped pages will have [[#MemoryAttribute]] type 0xE.&lt;br /&gt;
&lt;br /&gt;
You must pass same size and permissions as given in svcCreateMemoryMirror, otherwise error.&lt;br /&gt;
&lt;br /&gt;
== svcUnmapTransferMemory ==&lt;br /&gt;
Size must match size given in map syscall, otherwise there&#039;s an invalid-size error.&lt;br /&gt;
&lt;br /&gt;
== MemoryAttribute ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Lower 8 bits || Type                 || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0x0          || Unmapped             ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x1          || IO                   ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x3          || Code static          || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x4          || Code                 || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0x5          || Heap                 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x6          || Shared memory block  ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8          || Module code static   || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x9          || Module code          || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0xB          || Mapped memory        ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC          || Thread local storage ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE          || Transfer memory      ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x10         || Reserved             ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit32: is_mirrored&lt;br /&gt;
Bit34: is_device_mapped&lt;br /&gt;
Bit35: is_uncached?&lt;br /&gt;
&lt;br /&gt;
=Exception Handling=&lt;br /&gt;
There appears to be userland code for handling exceptions, however this doesn&#039;t seem to be executed on retail.&lt;br /&gt;
&lt;br /&gt;
On usermode exception, it jumps to main code binary entrypoint (main_binary_address+0) with X0=exception_info_ptr and X1=exception_info2_ptr.&lt;br /&gt;
On boot, X0 is set to 0 triggering normal crt0 setup.&lt;/div&gt;</summary>
		<author><name>Johndoe</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=SVC&amp;diff=1497</id>
		<title>SVC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=SVC&amp;diff=1497"/>
		<updated>2017-07-12T13:36:08Z</updated>

		<summary type="html">&lt;p&gt;Johndoe: Add registers summary from Tegra datasheet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= System calls =&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Id || Name || In || Out&lt;br /&gt;
|-&lt;br /&gt;
|  0x1 || [[#svcSetHeapSize]] || W1=size || W0=result, X1=outaddr&lt;br /&gt;
|-&lt;br /&gt;
|  0x2 || [[#svcSetMemoryPermission]] || X0=addr, X1=size, W2=prot || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x3 || [[#svcSetMemoryAttribute]] || X0=addr, X1=size, W2=state0, W3=state1 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x4 || [[#svcMapMemory]] || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x5 || svcUnmapMemory || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x6 || svcQueryMemory || X0=meminfo_ptr, X2=addr || W0=result, W1=pageinfo                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0x7 || svcExitProcess || None ||&lt;br /&gt;
|-&lt;br /&gt;
|  0x8 || [[#svcCreateThread]] || X1=entry, X2=arg, X3=stacktop, W4=prio, W5=processor_id  || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
|  0x9 || svcStartThread || W0=thread_handle ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xA || svcExitThread || None ||                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0xB || [[#svcSleepThread]] || X0=nano ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xC || svcGetThreadPriority || W1=thread_handle || W0=result, W1=prio&lt;br /&gt;
|-&lt;br /&gt;
|  0xD || svcSetThreadPriority || W0=thread_handle, W1=prio || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0xE || svcGetThreadCoreMask || W2=thread_handle || W0=result, W1=out, X2=out&lt;br /&gt;
|-&lt;br /&gt;
|  0xF || svcSetThreadCoreMask || W0=thread_handle, W1=in, X2=in2 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || svcGetCurrentProcessorNumber || None || W0/X0=cpuid&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || svcSignalEvent || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || svcClearEvent || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || svcMapSharedMemory || W0=memblk_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || svcUnmapSharedMemory || W0=memblk_handle, X1=addr, X2=size || W0=result                                                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[#svcCreateTransferMemory]] || X1=addr, X2=size, W3=perm || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || svcCloseHandle || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || svcResetSignal || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[#svcWaitSynchronization]] || X1=handles_ptr, W2=num_handles. X3=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || svcCancelSynchronization || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || svcArbitrateLock || W0=cur_thread_handle, X1=ptr, W2=req_thread_handle ||                                     &lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || svcArbitrateUnlock || X0=ptr ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || svcWaitProcessWideKeyAtomic || X0=ptr0, X1=ptr, W2=thread_handle, X3=timeout || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || svcSignalProcessWideKey || X0=ptr, W1=value || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || svcGetSystemTick ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || svcConnectToNamedPort || X1=port_name_str || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || svcSendSyncRequestLight ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || svcSendSyncRequest || X0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || [[#svcSendSyncRequestWithUserBuffer]] || X0=cmdbufptr, X1=size, X2=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || svcSendAsyncRequestWithUserBuffer ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || svcGetProcessId ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || svcGetThreadId || W0=thread_handle || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || svcBreak || X0,X1,X2=info || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || svcOutputDebugString || X0=str, X1=size || &lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || svcReturnFromException || X0=result || &lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || [[#svcGetInfo]] || X1=info_id, X2=handle, X3=info_sub_id || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A || svcFlushEntireDataCache ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2B || svcFlushDataCache ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || svcMapPhysicalMemory ||  || This SVC was added in version [[3.0.0]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D || svcUnmapPhysicalMemory||  || This SVC was added in version [[3.0.0]].&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F || svcGetLastThreadInfo ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || svcGetResourceLimitLimitValue ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || svcGetResourceLimitCurrentValue ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x32 || svcSetThreadActivity ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x33 || svcGetThreadContext3 ||  || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || svcDumpInfo ||  || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 || svcCreateSession || W2=?, X3=? || W0=result, W1=client_handle, W2=server_handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x41 || svcAcceptSession || W1=port_handle || W0=result, W1=session_handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x42 || svcReplyAndReceiveLight ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x43 || svcReplyAndReceive || X1=ptr_handles, W2=num_handles, X3=?, X4=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x44 || svcReplyAndReceiveWithUserBuffer|| X1=buf, X2=sz, X3=ptr_handles, W4=num_handles, X5=?, X6=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x45 || svcCreateEvent || None || W0=result, W1=client_handle ?, W2=server_handle ?&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D || svcSleepSystem ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x4E || [[#svcReadWriteRegister]] || X1=reg_addr, W2=rw_mask, W3=in_val || W0=result, W1=out_val&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F || svcSetProcessActivity ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x50 || svcCreateSharedMemory || W1=size?, W2=perm0, W3=perm1 || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x51 || [[#svcMapTransferMemory]] || X0=mirror_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x52 || [[#svcUnmapTransferMemory]] || W0=mirror_handle, X1=addr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x53 || svcCreateInterruptEvent || X1=irq_id || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 || svcQueryPhysicalAddress ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 0x55 || svcQueryIoMapping || X0=physaddr, X1=size || X0=virtaddr&lt;br /&gt;
|-&lt;br /&gt;
| 0x56 || svcCreateDeviceAddressSpace || X1=start_addr?, X2=size? || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x57 || svcAttachDeviceAddressSpace || W0=handle, X1=device? || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x58 || svcDetachDeviceAddressSpace || W0=handle, X1=device? || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x59 || svcMapDeviceAddressSpaceByForce || W0=handle, W1=proc_handle?, X2=proc_addr?, X3=size?, X4=map_addr?, W5=perm || W0=result &lt;br /&gt;
|-&lt;br /&gt;
| 0x5A || svcMapDeviceAddressSpaceAligned || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5B || svcMapDeviceAddressSpace || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5C || svcUnmapDeviceAddressSpace || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5D || svcInvalidateProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5E || svcStoreProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x5F || svcFlushProcessDataCache || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x60 || svcDebugActiveProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x61 || svcBreakDebugProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x62 || svcTerminateDebugProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x63 || svcGetDebugEvent || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x64 || svcContinueDebugEvent || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x65 || svcGetProcessList || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x66 || svcGetThreadList || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x67 || svcGetDebugThreadContext || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x68 || svcSetDebugThreadContext || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x69 || svcQueryDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6A || svcReadDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6B || svcWriteDebugProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6C || svcSetHardwareBreakPoint || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6D || svcGetDebugThreadParam || || &lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x70 || svcCreatePort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x71 || svcManageNamedPort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x72 || svcConnectToPort || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x73 || svcSetProcessMemoryPermission || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x74 || svcMapProcessMemory || X0=srcaddr, W1=process_handle, X2=dstaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x75 || svcUnmapProcessMemory || W0=process_handle, X1=dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x76 || svcQueryProcessMemory || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x77 || svcMapProcessCodeMemory || W0=process_handle, X21dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 || svcUnmapProcessCodeMemory || W0=process_handle, X1=dstaddr, X2=srcaddr, X3=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x79 || svcCreateProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7A || svcStartProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7B || svcTerminateProcess || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7C || svcGetProcessInfo || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7D || svcCreateResourceLimit || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7E || svcSetResourceLimitLimitValue || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7F || svcCallSecureMonitor || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcSetHeapSize ==&lt;br /&gt;
Size must be a multiple of 0x2000000. The heap base-address is written to out.&lt;br /&gt;
&lt;br /&gt;
== svcSetMemoryPermission ==&lt;br /&gt;
Bit2 of permission (exec) is not allowed.&lt;br /&gt;
&lt;br /&gt;
Setting write-only is not allowed either (bit1).&lt;br /&gt;
&lt;br /&gt;
== svcSetMemoryAttribute ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! State0 || State1 || Action&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Clear bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 0 || Clear bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 8 || Set bit35 in [[#MemoryAttribute]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This might used for switching between cached and non-cached mappings.&lt;br /&gt;
&lt;br /&gt;
== svcMapMemory ==&lt;br /&gt;
Memory is only allowed to be mapped into a special region.&lt;br /&gt;
&lt;br /&gt;
Code can get the range of this region from [[#svcGetInfo]].&lt;br /&gt;
&lt;br /&gt;
The source region gets reprotected to ---, and sets bit32 is set in [[#MemoryAttribute]].&lt;br /&gt;
&lt;br /&gt;
== svcCreateThread ==&lt;br /&gt;
Processor_id must be 0,1,2,3 or -2.&lt;br /&gt;
&lt;br /&gt;
== svcSleepThread ==&lt;br /&gt;
Setting nano=0 means &amp;quot;yield thread&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== svcCreateTransferMemory ==&lt;br /&gt;
This one reprotects the src block with perms you give it. It also sets bit32 into [[#MemoryAttribute]].&lt;br /&gt;
&lt;br /&gt;
Executable bit perm not allowed.&lt;br /&gt;
&lt;br /&gt;
Closing all handles automatically causes the bit32 in [[#MemoryAttribute]] to clear, and the permission to reset.&lt;br /&gt;
&lt;br /&gt;
== svcWaitSynchronization ==&lt;br /&gt;
Works with num_handles &amp;lt;= 0x40, error on num_handles == 0.&lt;br /&gt;
&lt;br /&gt;
Does not accept 0xFFFF8001 or 0xFFFF8000 as handles.&lt;br /&gt;
&lt;br /&gt;
== svcSendSyncRequestWithUserBuffer ==&lt;br /&gt;
Size must be 0x1000-aligned.&lt;br /&gt;
&lt;br /&gt;
== svcBreak ==&lt;br /&gt;
When used on retail where inx0 bit31 is clear, the system will throw a [[Error_codes|fatal-error]]. Otherwise when bit31 is set, it will return 0.&lt;br /&gt;
&lt;br /&gt;
== svcGetInfo ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Handle type || Id0 || Id1 || Description&lt;br /&gt;
|-&lt;br /&gt;
| Process || 0 || 0 || Core available mask. Always 0xF meaning all 4 cores available.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 1 || 0 || Always 0xfffffffff0000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 2 || 0 || Randomized unknown base-address.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 3 || 0 || Always 0x1000000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 4 || 0 || Heap base. Randomized.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 5 || 0 || Heap region size. Always 0x180000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 6 || 0 || Total memory usage?&lt;br /&gt;
|-&lt;br /&gt;
| Process || 7 || 0 || Process heap size.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 8 || 0 || Always 0. Used during exception handling.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 9 || 0 || This creates and returns an unknown handle.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 10 || -1, {current coreid} || Unknown. Output data changes each time this SVC is used. Global and core-specific tick-count?&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 11 || 0-3 || Returns random from TRNG. Used to seed usermode PRNGs. Unknown what exactly causes this output to change, however it does change when exiting+launching a process.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 12 || 0 || Address space start. Always 0x8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 13 || 0 || Address space size. Always 0x7ff8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 14 || 0 || Map region base. Randomized.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 15 || 0 || Map region size.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 18 || 0 || Title-id, introduced with [[3.0.0]]&lt;br /&gt;
|-&lt;br /&gt;
| ? || 0xF0000002 || 0 || Unknown. Uses the input handle. Returns a tick-count?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcReadWriteRegister ==&lt;br /&gt;
Read/write Tegra hardware registers, input address is physical-address.&lt;br /&gt;
&lt;br /&gt;
rw_mask is 0 for reading and -1 for writing.&lt;br /&gt;
&lt;br /&gt;
=== Registers ===&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Address || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192E8 || MC_LATENCY_ALLOWANCE_DC_0_0 (Latency allowance settings for DC clients)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192EC || MC_LATENCY_ALLOWANCE_DC_1_0 (Latency allowance settings for DC clients)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F0 || MC_LATENCY_ALLOWANCE_DC_2_0 (Latency allowance settings for DC clients)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F4 || MC_LATENCY_ALLOWANCE_DCB_0_0 (Latency allowance settings for DCB clients)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700192F8 || MC_LATENCY_ALLOWANCE_DCB_1_0 (Latency allowance settings for DCB clients) &lt;br /&gt;
|-&lt;br /&gt;
| 0x7001941C || MC_DIS_PTSA_RATE_0 (DDA rate for dis PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019420 || MC_DIS_PTSA_MIN_0 (DDA minimum value for direct client dis PTSA.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019424 || MC_DIS_PTSA_MAX_0 (DDA maximum value for direct client dis PTSA.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019428 || MC_DISB_PTSA_RATE_0 (DDA rate for disb PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001942C || MC_DISB_PTSA_MIN_0 (DDA minimum value for direct client disb PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019430 || MC_DISB_PTSA_MAX_0 (DDA maximum value for direct client disb PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001944C || MC_MLL_MPCORER_PTSA_RATE_0 (DDA rate for mll_mpcorer PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001947C || MC_RING1_PTSA_RATE_0 (DDA rate for ring1 PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019480 || MC_RING1_PTSA_MIN_0 (DDA minimum value for direct client ring1 PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019484 || MC_RING1_PTSA_MAX_0 (DDA maximum value for direct client ring1 PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001950C || MC_FTOP_PTSA_RATE_0 (DDA rate for ftop PTSA)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019670 || MC_SEC_CARVEOUT_BOM_0 (Baseaddress for the SEC carveout address space.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019674 || MC_SEC_CARVEOUT_SIZE_MB_0 (Size in MB for the SEC carveout region) &lt;br /&gt;
|-&lt;br /&gt;
| 0x70019690 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0A_0 (Scaled Latency Allowance settings for DISPLAY0A) &lt;br /&gt;
|-&lt;br /&gt;
| 0x70019694 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0AB_0 (Scaled Latency Allowance settings for DISPLAY0AB)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019698 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0B_0 (Scaled Latency Allowance settings for DISPLAY0B)&lt;br /&gt;
|-&lt;br /&gt;
| 0x7001969C || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0BB_0 (Scaled Latency Allowance settings for DISPLAY0BB)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700196A0 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0C_0 (Scaled Latency Allowance settings for DISPLAY0C)&lt;br /&gt;
|-&lt;br /&gt;
| 0x700196A4 || MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0CB_0 (Scaled Latency Allowance settings for DISPLAY0CB)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70019C5C ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcMapTransferMemory ==&lt;br /&gt;
The newly mapped pages will have [[#MemoryAttribute]] type 0xE.&lt;br /&gt;
&lt;br /&gt;
You must pass same size and permissions as given in svcCreateMemoryMirror, otherwise error.&lt;br /&gt;
&lt;br /&gt;
== svcUnmapTransferMemory ==&lt;br /&gt;
Size must match size given in map syscall, otherwise there&#039;s an invalid-size error.&lt;br /&gt;
&lt;br /&gt;
== MemoryAttribute ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Lower 8 bits || Type                 || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0x0          || Unmapped             ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x1          || IO                   ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x3          || Code static          || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x4          || Code                 || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0x5          || Heap                 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x6          || Shared memory block  ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8          || Module code static   || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x9          || Module code          || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0xB          || Mapped memory        ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC          || Thread local storage ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE          || Transfer memory      ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x10         || Reserved             ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit32: is_mirrored&lt;br /&gt;
Bit34: is_device_mapped&lt;br /&gt;
Bit35: is_uncached?&lt;br /&gt;
&lt;br /&gt;
=Exception Handling=&lt;br /&gt;
There appears to be userland code for handling exceptions, however this doesn&#039;t seem to be executed on retail.&lt;br /&gt;
&lt;br /&gt;
On usermode exception, it jumps to main code binary entrypoint (main_binary_address+0) with X0=exception_info_ptr and X1=exception_info2_ptr.&lt;br /&gt;
On boot, X0 is set to 0 triggering normal crt0 setup.&lt;/div&gt;</summary>
		<author><name>Johndoe</name></author>
	</entry>
</feed>