<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MemoryController</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MemoryController"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/MemoryController"/>
	<updated>2026-04-18T15:58:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=SVC&amp;diff=11532</id>
		<title>SVC</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=SVC&amp;diff=11532"/>
		<updated>2015-01-31T06:47:10Z</updated>

		<summary type="html">&lt;p&gt;MemoryController: /* System calls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= System calls =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Id&lt;br /&gt;
!  NF ARM11&lt;br /&gt;
!  NF ARM9&lt;br /&gt;
!  TF ARM11&lt;br /&gt;
!  Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; |  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ControlMemory(u32* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions)&lt;br /&gt;
| Outaddr is usually the same as the input addr0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryMemory(MemoryInfo* info, PageInfo* out, u32 Addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| void ExitProcess(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessAffinityMask(u8* affinitymask, Handle process, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessAffinityMask(Handle process, u8* affinitymask, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessIdealProcessor(s32 *idealprocessor, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessIdealProcessor(Handle process, s32 idealprocessor)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result [[#CreateThread|CreateThread]](Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| void ExitThread(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| void SleepThread(s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadPriority(s32* priority, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SetThreadPriority(Handle thread, s32 priority)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount)&lt;br /&gt;
| Replaced with a stub in ARM11 NATIVE_FIRM kernel beginning with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadIdealProcessor(s32* processorid, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetThreadIdealProcessor(Handle thread, s32 processorid)&lt;br /&gt;
| Replaced with a stub in ARM11 NATIVE_FIRM kernel beginning with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| s32 GetCurrentProcessorNumber(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result Run(Handle process, StartupInfo* info)&lt;br /&gt;
| This starts the main() thread. Buf+0 is main-thread priority, Buf+4 is main-thread stack-size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateMutex(Handle* mutex, bool initialLocked)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ReleaseMutex(Handle mutex)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateSemaphore(Handle* semaphore, s32 initialCount, s32 maxCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ReleaseSemaphore(s32* count, Handle semaphore, s32 releaseCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateEvent(Handle* event, ResetType resettype)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SignalEvent(Handle event)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ClearEvent(Handle event)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateTimer(Handle* timer, ResetType resettype)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SetTimer(Handle timer, s64 initial, s64 interval)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CancelTimer(Handle timer)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ClearTimer(Handle timer)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateMemoryBlock(Handle* memblock, u32 addr, u32 size, u32 mypermission, u32 otherpermission)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result UnmapMemoryBlock(Handle memblock, u32 addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateAddressArbiter(Handle* arbiter)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CloseHandle(Handle handle)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result WaitSynchronization1(Handle handle, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result WaitSynchronizationN(s32* out, Handle* handles, s32 handlecount, bool waitAll, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SignalAndWait(s32* out, Handle signal, Handle* handles, s32 handleCount, bool waitAll, s64 nanoseconds)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result DuplicateHandle(Handle* out, Handle original)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| s64 GetSystemTick(void) (This returns the total CPU ticks elapsed since the CPU was powered-on)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x29 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetHandleInfo(s64* out, Handle handle, HandleInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetSystemInfo(s64* out, SystemInfoType type, s32 param)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetProcessInfo(s64* out, Handle process, ProcessInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ConnectToPort(Handle* out, const char* portName)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest1(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest2(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest3(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest4(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x32 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest(Handle session)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x33 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result OpenProcess(Handle* process, u32 processId)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result OpenThread(Handle* thread, Handle process, u32 threadId)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x35 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetProcessId(u32* processId, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x36 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessIdOfThread(u32* processId, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x37 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadId(u32* threadId, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimit(Handle* resourceLimit, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x39 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimitLimitValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimitCurrentValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadContext(ThreadContext* context, Handle thread)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Break(BreakReason)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| OutputDebugString(void const, int)&lt;br /&gt;
| Does nothing on non-debug units.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| ControlPerformanceCounter(unsigned long long, int, unsigned int, unsigned long long)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x47 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreatePort(Handle* portServer, Handle* portClient,  const char* name, s32 maxSessions)&lt;br /&gt;
| Setting name=NULL creates a private port not accessible from svcConnectToPort.&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateSessionToPort(Handle* session, Handle port)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x49 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateSession(Handle* sessionServer, Handle* sessionClient)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result AcceptSession(Handle* session, Handle port)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive1(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive2(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive3(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive4(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x50 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result BindInterrupt(Interrupt name, Handle syncObject, s32 priority, bool isManualClear)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x51 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result UnbindInterrupt(Interrupt name, Handle syncObject)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x52 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result InvalidateProcessDataCache(Handle process, void* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x53 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StoreProcessDataCache(Handle process, void const* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result FlushProcessDataCache(Handle process, void const* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x55 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StartInterProcessDma(Handle* dma, Handle dstProcess, void* dst, Handle srcProcess, const void* src, u32 size, const DmaConfig&amp;amp; config)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x56 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StopDma(Handle dma)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x57 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetDmaState(DmaState* state, Handle dma)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| RestartDma(nn::Handle, void *, void  const*, unsigned int, signed char)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x60 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result DebugActiveProcess(Handle* debug, u32 processID)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x61 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result BreakDebugProcess(Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x62 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result TerminateDebugProcess(Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x63 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessDebugEvent(DebugEventInfo* info, Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x64 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ContinueDebugEvent(Handle debug, u32 flags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x65 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x66 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadList(s32* threadCount, u32* threadIds, s32 threadIdMaxCount, Handle domain)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x67 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetDebugThreadContext(ThreadContext* context, Handle debug, u32 threadId, u32 controlFlags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x68 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetDebugThreadContext(Handle debug, u32 threadId, ThreadContext* context, u32 controlFlags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x69 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryDebugProcessMemory(MemoryInfo* blockInfo, PageInfo* pageInfo, Handle process, u32 addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReadProcessMemory(void* buffer, Handle debug, u32 addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result WriteProcessMemory(Handle debug, void const* buffer, u32 addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetHardwareBreakPoint(s32 registerId, u32 control, u32 value)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| GetDebugThreadParam(long long *, int *, nn::Handle, unsigned int, nn::dmnt::DebugThreadParam)&lt;br /&gt;
| Disabled on regular kernel.&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x70&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ControlProcessMemory(Handle KProcess, unsigned int Addr0, unsigned int Addr1, unsigned int Size, unsigned int Type, unsigned int Permissions)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result MapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result UnmapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateCodeSet(Handle* handle_out, struct CodeSetInfo, u32 code_ptr, u32 ro_ptr, u32 data_ptr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result RandomStub()&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateProcess(Handle* handle_out, Handle codeset_handle, u32 arm11kernelcaps_ptr, u32 arm11kernelcaps_num)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| TerminateProcess(Handle)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x77&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessResourceLimits(Handle KProcess, Handle KResourceLimit)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x78&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateResourceLimit(Handle *KResourceLimit)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x79&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetResourceLimitValues(???)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AddCodeSegment (unsigned int Addr, unsigned int Size)&lt;br /&gt;
| Stubbed on NATIVE_FIRM beginning with [[2.0.0-2]]. Used during TWL_FIRM boot.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7B&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Backdoor(unsigned int CodeAddress)&lt;br /&gt;
| This is used on ARM9 NATIVE_FIRM. No ARM11 processes have access to it without some form of kernelhax.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| KernelSetState(unsigned int Type, unsigned int Param0, unsigned int Param1, unsigned int Param2)&lt;br /&gt;
| The type determines the meaning of each param&lt;br /&gt;
|-&lt;br /&gt;
| 0x7D&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryProcessMemory(MemInfo *Info, unsigned int *Out, Handle KProcess, unsigned int Addr)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0xFF&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ???&lt;br /&gt;
| Debug related? The svcaccesscontrol mask doesn&#039;t apply for this SVC. Stubbed on ARM9 NATIVE_FIRM.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that &amp;quot;stubbed&amp;quot; here means that the SVC only returns an error, as in the following snippet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ROM:FFF04D98                 LDR             R0, =0xF8C007F4&lt;br /&gt;
ROM:FFF04D9C                 BX              LR&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CreateThread ==&lt;br /&gt;
 R0=s32 threadpriority&lt;br /&gt;
 R1=func entrypoint&lt;br /&gt;
 R2=u32 arg&lt;br /&gt;
 R3=u32 stacktop&lt;br /&gt;
 R4=s32 processorid&lt;br /&gt;
&lt;br /&gt;
 Result result=R0&lt;br /&gt;
 Handle* thread=R1&lt;br /&gt;
&lt;br /&gt;
This processorid is a bitmask for which processors the thread can be run on. Bit value zero enables thread execution for this CPUID, bit value one disables thread execution for this CPUID. Bit0-&amp;lt;...&amp;gt; are for CPUID0-CPUID&amp;lt;...&amp;gt;. The thread priority value must be in the following range: 0x0..0x3F.&lt;br /&gt;
&lt;br /&gt;
With the Old3DS kernel, the s32 processorid must be &amp;lt;=2.&lt;br /&gt;
&lt;br /&gt;
With the New3DS kernel: processorid must be &amp;lt;= &amp;lt;total cores(MPCore &amp;quot;SCU Configuration Register&amp;quot; CPU number value + 1)&amp;gt;. When processorid==0x2 and the process is not an APPLICATION mem-region process, exheader kernel-flags bitmask 0x2000 must be set otherwise error 0xD9001BEA is returned. When processorid==0x3 and the process is not an APPLICATION mem-region process, error 0xD9001BEA is returned. These are the only restriction checks done by the kernel for processorid.&lt;br /&gt;
&lt;br /&gt;
The stacktop must be aligned to 0x8-bytes, otherwise when not aligned to 0x8-bytes the ARM11 kernel clears the low 3-bits of the stacktop address.&lt;br /&gt;
&lt;br /&gt;
= Types and structures =&lt;br /&gt;
&lt;br /&gt;
== enum MemoryState ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory state flags&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| FREE&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| RESERVED&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| IO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| STATIC&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| PRIVATE&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| SHARED&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| CONTINUOUS&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| ALIASED&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| ALIAS&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| ALIAS CODE&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| LOCKED&lt;br /&gt;
| 11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum PageFlags ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Page flags&lt;br /&gt;
!  Bit&lt;br /&gt;
|-&lt;br /&gt;
| LOCKED&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| CHANGED&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum MemoryOperation ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory operation&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| FREE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| RESERVE&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| COMMIT&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| MAP&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| UNMAP&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| PROTECT&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| REGION APP&lt;br /&gt;
| 0x100&lt;br /&gt;
|-&lt;br /&gt;
| REGION SYSTEM&lt;br /&gt;
| 0x200&lt;br /&gt;
|-&lt;br /&gt;
| REGION BASE&lt;br /&gt;
| 0x300&lt;br /&gt;
|-&lt;br /&gt;
| LINEAR&lt;br /&gt;
| 0x10000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The LINEAR memory-operation indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices&#039; DMA(such as the [[GPU]]). Addr0+size for this must be within the 0x14000000-0x1C000000 range when Addr0 is non-zero(Addr1 must be zero), Addr0 isn&#039;t actually used by svcControlMemory for mapping memory: Addr0 is not used by the kernel after doing address-range checks. The kernel determines what physical-address to use by allocating memory from FCRAM(about the same way as other memory), which is then used to determine the virtual-address.&lt;br /&gt;
&lt;br /&gt;
[[8.0.0-18]] added a new memory mapping(0x30000000-0x38000000) for LINEAR memory, this replaces the original mapping for newer titles. The kernel uses the new mapping when the process memory-region is BASE, or when the process kernel-release-version field is &amp;gt;=0x022c(2.44 / system-version [[8.0.0-18]]).&lt;br /&gt;
&lt;br /&gt;
The input mem-region value for svcControlMemory is only used(when non-zero) when the PID is value 1, for the [[FIRM]] ARM11 &amp;quot;loader&amp;quot; module.&lt;br /&gt;
&lt;br /&gt;
== enum MemoryPermission ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory permission&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| NONE&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| R&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| W&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| RW&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| X&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| RX&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| WX&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| RWX&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| DONTCARE&lt;br /&gt;
| 0x10000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum ResetType ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reset type&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| ONESHOT&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| STICKY&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| PULSE&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct MemoryInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Base process virtual address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Permission&lt;br /&gt;
|-&lt;br /&gt;
| enum MemoryState&lt;br /&gt;
| State&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct PageInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Flags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct StartupInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| s32&lt;br /&gt;
| Priority&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Stack size&lt;br /&gt;
|-&lt;br /&gt;
| s32&lt;br /&gt;
| argc&lt;br /&gt;
|-&lt;br /&gt;
| s16*&lt;br /&gt;
| argv&lt;br /&gt;
|-&lt;br /&gt;
| s16*&lt;br /&gt;
| envp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct CodeSetInfo ==&lt;br /&gt;
All addresses are given virtual for the process to be created.&lt;br /&gt;
All sizes/offsets are in given in 0x1000-pages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Codeset Name&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata offset&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data offset&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .bss size + .data size&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| u32[2]&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct DebugEventInfo ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Event type&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Thread ID (not used in all events)&lt;br /&gt;
|-&lt;br /&gt;
| u32[2]&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|-&lt;br /&gt;
| u32[6]&lt;br /&gt;
| Event-specific data (see below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Event type&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| CREATE THREAD&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| EXIT THREAD&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| EXIT PROCESS&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| EXCEPTION&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| DLL LOAD&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| DLL UNLOAD&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| SCHEDULE IN&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| SCHEDULE OUT&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| SYSCALL IN&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| SYSCALL OUT&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| OUTPUT STRING&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
| MAP&lt;br /&gt;
| 12&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PROCESS event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u64&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| Process name&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Process ID&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| 0 = newly created process, 1 = attached process&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CREATE THREAD event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Creator thread ID&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Base address (?)&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Entrypoint&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== EXIT THREAD/PROCESS events ===&lt;br /&gt;
&lt;br /&gt;
A single u32 reason field is used.&lt;br /&gt;
&lt;br /&gt;
Thread exit reasons:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| (None)&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| EXIT PROCESS&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE PROCESS&lt;br /&gt;
| 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Process exit reasons:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| (None)&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| UNHANDLED EXCEPTION&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== EXCEPTION event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Exception type&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Exception address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Argument (type-specific)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Exception types:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
!  Argument&lt;br /&gt;
|-&lt;br /&gt;
| UNDEFINED INSTRUCTION&lt;br /&gt;
| 0&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown)&lt;br /&gt;
| 1&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown, mem-related)&lt;br /&gt;
| 2&lt;br /&gt;
| Address&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown, mem-related)&lt;br /&gt;
| 3&lt;br /&gt;
| Address&lt;br /&gt;
|-&lt;br /&gt;
| ATTACH BREAK&lt;br /&gt;
| 4&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| BREAKPOINT&lt;br /&gt;
| 5&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| USER BREAK&lt;br /&gt;
| 6&lt;br /&gt;
| User break type&lt;br /&gt;
|-&lt;br /&gt;
| DEBUGGER BREAK&lt;br /&gt;
| 7&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| UNDEFINED SYSCALL&lt;br /&gt;
| 8&lt;br /&gt;
| Attempted syscall ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
User break types:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| PANIC&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| ASSERT&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| USER&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SCHEDULER/SYSCALL IN/OUT events ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u64&lt;br /&gt;
| Clock tick&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Syscall (only for SYSCALL events)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OUTPUT STRING event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| String address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| String size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MAP event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Mapped address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Mapped size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| MemoryPermission&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| MemoryState&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Processes =&lt;br /&gt;
Each process can only use SVCs which are enabled in the [[NCCH#CXI|exheader]] for this process. The ARM11 kernel SVC handler checks whether the SVC is enabled in the syscall access control mask stored on the SVC-mode stack, when the SVC isn&#039;t enabled a kernelpanic() is triggered. Each process has a separate SVC-mode stack, this stack and the syscall access mask stored here is initialized when the process is started. Applications normally only have access to SVCs &amp;lt;=0x3D, however not all SVCs &amp;lt;=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.&lt;br /&gt;
&lt;br /&gt;
Each process has a separate handle-table, the size of this table is stored in the exheader. The handles in a handle-table can&#039;t be used in the context of other processes, since those handles don&#039;t exist in other handle-tables.&lt;br /&gt;
&lt;br /&gt;
0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for the current KThread.&lt;br /&gt;
&lt;br /&gt;
Calling svcBreak on retail will only terminate the process which called this SVC.&lt;br /&gt;
&lt;br /&gt;
= Threads =&lt;br /&gt;
For svcCreateThread the input address used for Entrypoint_Param and StackTop are normally the same, however these can be arbitrary. For the main thread the Entrypoint_Param is value 0.&lt;br /&gt;
&lt;br /&gt;
Using CloseHandle() with a KThread handle will terminate the specified thread, only if the reference count reaches 0.&lt;br /&gt;
&lt;br /&gt;
Lower priority values give the thread higher priority. For userland apps, priorities between 0x18 and 0x3F are allowed. The priority of the app&#039;s main thread seems to be 0x30.&lt;br /&gt;
&lt;br /&gt;
The thread scheduler is cooperative, therefore if a thread takes up all the CPU time (for example if it enters an endless loop), all the other threads that run on the same CPU core won&#039;t get a chance to run. The main way of yielding another thread is using an address arbiter.&lt;br /&gt;
&lt;br /&gt;
= Memory Mapping =&lt;br /&gt;
ControlMemory and MapMemoryBlock can be used to map memory pages, these two SVCs only support mapping execute-never R/W pages. The input permissions parameter for these SVCs must therefore be &amp;lt;=3, where value zero is used when un-mapping memory. Furthermore it appears that only regular heap pages can be mirrored (it won&#039;t work for TLS, stack, .data, .text, for example).&lt;br /&gt;
&lt;br /&gt;
Bitmask 0xF00 for ControlMemory parameter MemoryType is the memory-type, when this is zero the memory-type is loaded from the kernel flags stored in the exheader ARM11 kernel descriptors, for the process using the SVC.&lt;br /&gt;
&lt;br /&gt;
ControlMemory parameter MemoryType with value 0x10003 is used for mapping the GSP [[Memory_layout|heap]]. The low 8-bits are the type: 1 is for un-mapping memory, 3 for mapping memory. Type4 is used to mirror the RW memory at Addr1, to Addr0. Type4 will return an error if Addr1 is located in read-only memory. Addr1 is not used for type1 and type3.&lt;br /&gt;
&lt;br /&gt;
The ARM11 kernel does not allow processes to create shared memory blocks via svcCreateMemoryBlock, when the process memorytype(from the kernel flags stored in the exheader kernel descriptor) is the application memorytype, and when addr=0. It&#039;s unknown how the kernel handles addr=0 when the memorytype is not the application memorytype. When addr is non-zero, it must be located in memory which is already mapped. Furthermore, it appears that only regular heap pages (allocated using svcControlMemory op=COMMIT) are accepted as valid addrs.&lt;br /&gt;
&lt;br /&gt;
ControlProcessMemory maps memory in the specified process, this is the only SVC which allows mapping executable memory. Format of the permissions field for memory mapping SVCs: bit0=R, bit1=W, bit2=X. Type6 sets the Addr0 memory permissions to the input permissions, for already mapped memory. Type is the MemoryOperation enum, without the memory-type/memory-region. ControlProcessMemory only supports type4, type5, and type6. ControlProcessMemory does not support using the current KProcess handle alias.&lt;br /&gt;
&lt;br /&gt;
MapProcessMemory maps RW memory starting at address 0x00100000 in the specified KProcess, at the specified StartAddr in the current process. MapProcessMemory then maps 0x08000000 in the specified process, to StartAddr+0x7f00000 in the current process. UnmapProcessMemory unmaps the memory which was mapped by MapProcessMemory.&lt;br /&gt;
&lt;br /&gt;
Note that with the MAP MemoryOperation, the kernel will refuse to MAP memory for the specified addr1, when addr1 was already used with another MAP operation as addr1. The kernel also doesn&#039;t allow memory to be freed via the FREE MemoryOperation, when other virtual-memory is mapped to this same memory(when the MAP MemoryOperation was used with this memory with addr1).&lt;br /&gt;
&lt;br /&gt;
= DMA =&lt;br /&gt;
The CTRSDK code for using svcStartInterProcessDma will execute svcBreak when svcStartInterProcessDma returns an error(except for certain error value(s)). Therefore on retail, triggering a svcStartInterProcessDma via a system-module which results in an error from svcStartInterProcessDma will result in the system-module terminating.&lt;br /&gt;
&lt;br /&gt;
==DmaConfig==&lt;br /&gt;
Size of struct is 24 bytes.&lt;br /&gt;
&lt;br /&gt;
 struct DmaConfig {&lt;br /&gt;
     sint8_t channel_sel; // @0 Selects which DMA channel to use: 0-7, -1 = don&#039;t care.&lt;br /&gt;
     uint8_t unk1;        // @1 Accepted values: 0,2,4,8.&lt;br /&gt;
     uint8_t flags;       // @2 bit0: DST_CFG, bit1: SRC_CFG, bit2: SHALL_BLOCK, bit3: ???, bit6: DST_ALT_CFG, bit7: SRC_ALT_CFG&lt;br /&gt;
     uint8_t dst_cfg[10];&lt;br /&gt;
     // @5 Accepted values (u8): 4, 8, 12, 15.&lt;br /&gt;
     // @15 Accepted values (u8): 4, 8, 12, 15.&lt;br /&gt;
     uint8_t src_cfg[10]; // @14&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If SRC_CFG/DST_CFG is set in the flags field, the configuration for src/dst is loaded from src_cfg/dst_cfg respectively. If the *_ALT_CFG flag is set same thing goes, except byte0 of each cfg is forced to 0xFF. ALT_CFG has priority over CFG.&lt;br /&gt;
&lt;br /&gt;
If CFG or ALT_CFG is not set, default configuration is loaded:&lt;br /&gt;
 FF 0F 80 00 00 00 80 00 00 00&lt;br /&gt;
&lt;br /&gt;
If SHALL_BLOCK is set, the thread will sleep until the DMA engine is ready. If not set, the SVC will return 0xD04007F0 if the DMA channel is busy.&lt;br /&gt;
&lt;br /&gt;
The format of src_cfg/dst_cfg is unknown, but both have the same format. Checks suggest that the second byte of cfg equalling 4 means NO_INCREMENT (don&#039;t increment after read/write).&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
DebugActiveProcess is used to attach to a process for debugging. This SVC can only be used when the target process&#039; ARM11 descriptors stored in the exheader have the kernel flag for &amp;quot;Enable debug&amp;quot; set. Otherwise when that flag is clear, the kernel flags for the process using this SVC must have the &amp;quot;Force debug&amp;quot; flag set.&lt;br /&gt;
&lt;br /&gt;
= KernelSetState =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Type&lt;br /&gt;
!  Enabled for the NATIVE_FIRM ARM11 kernel&lt;br /&gt;
!  Enabled for the TWL_FIRM ARM11 kernel&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This initializes the programID for launching [[FIRM]], then triggers launching [[FIRM]]. Param0 is unused. Param1 is the programID-low, and the programID-high is 0x00040138. Param2 is used only with the [[New_3DS]] kernel, pm-module uses value 0 with this. With New3DS kernel, it forces the programIDlow to be the New3DS NATIVE_FIRM, when the input programIDlow is for the Old3DS NATIVE_FIRM and Param2==0.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Unknown, does nothing with the TWL_FIRM ARM11 kernel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This used for initializing the 0x1000-byte buffer used by the launched [[FIRM]]. Param2 is unused. When Param0 is value 1, this buffer is copied to the beginning of FCRAM at 0xF0000000, and Param1 is unused. When Param0 is value 0, this kernel buffer is mapped to process address Param1.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Param0-Param3 are unused. This unmaps(?) the following virtual memory by writing value physaddr(where physaddr base is 0x80000000) to the L1 MMU table entries: 0x00300000..0x04300000, 0x08000000..0x0FE00000, and 0x10000000..0xF8000000.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Debug related?&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This triggers ARM11 kernel [[I2C]] code, Param0-Param3 are unused. This ARM11 kernel I2C code will never return. Device address 0x4a via the second I2C bus is used here. This triggers a hardware system reboot via poking an I2C MCU register: register address 0x20 is written to with value 4.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Alternate unused FIRM launch code-path, with different [[PXI]] FIFO word constants.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Yes, implemented at some point after system-version v4.5.&lt;br /&gt;
| ?&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| Only available for the [[New_3DS]] kernel. It&#039;s unknown what this is used for.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetSystemInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  SystemInfoType value&lt;br /&gt;
!  s32 param&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| This writes the total used memory size in the following memory regions to out: APPLICATION, SYSTEM, and BASE.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| This writes the total used memory size in the APPLICATION memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 2&lt;br /&gt;
| This writes the total used memory size in the SYSTEM memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 3&lt;br /&gt;
| This writes the total used memory size in the BASE memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Unused&lt;br /&gt;
| This writes the total number of processes which were directly launched by the kernel, to out. For the NATIVE_FIRM/SAFE_MODE_FIRM ARM11 kernel, this is normally 5, for processes sm, fs, pm, loader, and pxi.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetProcessInfo =&lt;br /&gt;
Input:&lt;br /&gt;
 R0 = unused&lt;br /&gt;
 R1 = Handle process&lt;br /&gt;
 R2 = ProcessInfoType type&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
 R0 = Result&lt;br /&gt;
 R1 = output value lower word&lt;br /&gt;
 R2 = output value upper word&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  ProcessInfoType value&lt;br /&gt;
!  Available since system version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 9-19&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| This only returns error 0xD8E007ED.&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| low u32 = (0x20000000 - &amp;lt;LINEAR virtual-memory base for this process&amp;gt;). That is, the output value is the value which can be added to LINEAR memory vaddrs for converting to physical-memory addrs.&lt;br /&gt;
|-&lt;br /&gt;
| 21-23&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| This only returns error 0xE0E01BF4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetHandleInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  HandleInfoType value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| This writes back two (unknown) u32 fields from the KProcess object. If not a KProcess handle is given, it will write whatever was in r5, r7 when the svc was called.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Get internal refcount-1 for kernel object (u32), and also a boolean if the refcount-1 is negative (u32).&lt;br /&gt;
|-&lt;br /&gt;
| 0x32107&lt;br /&gt;
| Returns (u64) 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= svc7B Backdoor =&lt;br /&gt;
This saves SVC-mode SP+LR on the user-mode stack, then sets the SVC-mode SP to the user-mode SP. This then calls the specified code in SVC-mode. Once the called code returns, this pops the saved SP+LR off the stack for restoring the SVC-mode SP, then returns from the svc7b handler. Note that this svc7b handler does not disable IRQs, if any IRQs/context-switches occur while the SVC-mode SP is set to the user-mode one here, the ARM11-kernel will crash(which hangs the whole ARM11-side system).&lt;br /&gt;
&lt;br /&gt;
= Kernel error-codes =&lt;br /&gt;
See [[Error codes]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Error-code value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0xC860180A&lt;br /&gt;
| Not enough free memory available for memory allocation.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC920181A&lt;br /&gt;
| The session was closed by the other process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD88007FA&lt;br /&gt;
| Unknown, this can be returned by svcConnectToPort.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007ED&lt;br /&gt;
| This indicates that a value is outside of the enum being used.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007F1&lt;br /&gt;
| This error indicates Misaligned address.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007F7&lt;br /&gt;
| This error indicates that the input handle used with the SVC does not exist in the process handle-table, or that the handle kernel object type does not match the type used by the SVC.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD9000402&lt;br /&gt;
| Invalid memory permissions for input/output buffers, for svcStartInterProcessDma.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD9001BF7&lt;br /&gt;
| This error is returned when the kernel retrieves a pointer to a kernel object, but the object type doesn&#039;t match the desired one.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD92007EA&lt;br /&gt;
| This error is returned when a process attempts to use svcCreateMemoryBlock when the process memorytype is the application memorytype, and when addr=0.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE0E01BF5&lt;br /&gt;
| This indicates an invalid address was used.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8C007F4&lt;br /&gt;
| Invalid type/param0-param3 input for svcKernelSetState. This is also returned for those syscalls marked as stubs.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>MemoryController</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=SVC&amp;diff=11531</id>
		<title>SVC</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=SVC&amp;diff=11531"/>
		<updated>2015-01-31T06:46:13Z</updated>

		<summary type="html">&lt;p&gt;MemoryController: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= System calls =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Id&lt;br /&gt;
!  NF ARM11&lt;br /&gt;
!  NF ARM9&lt;br /&gt;
!  TF ARM11&lt;br /&gt;
!  Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; |  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ControlMemory(u32* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions)&lt;br /&gt;
| Outaddr is usually the same as the input addr0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryMemory(MemoryInfo* info, PageInfo* out, u32 Addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| void ExitProcess(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessAffinityMask(u8* affinitymask, Handle process, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessAffinityMask(Handle process, u8* affinitymask, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessIdealProcessor(s32 *idealprocessor, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessIdealProcessor(Handle process, s32 idealprocessor)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result [[#CreateThread|CreateThread]](Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| void ExitThread(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| void SleepThread(s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadPriority(s32* priority, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SetThreadPriority(Handle thread, s32 priority)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount)&lt;br /&gt;
| Replaced with a stub in ARM11 NATIVE_FIRM kernel beginning with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadIdealProcessor(s32* processorid, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetThreadIdealProcessor(Handle thread, s32 processorid)&lt;br /&gt;
| Replaced with a stub in ARM11 NATIVE_FIRM kernel beginning with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| s32 GetCurrentProcessorNumber(void)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result Run(Handle process, StartupInfo* info)&lt;br /&gt;
| This starts the main() thread. Buf+0 is main-thread priority, Buf+4 is main-thread stack-size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateMutex(Handle* mutex, bool initialLocked)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ReleaseMutex(Handle mutex)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateSemaphore(Handle* semaphore, s32 initialCount, s32 maxCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ReleaseSemaphore(s32* count, Handle semaphore, s32 releaseCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateEvent(Handle* event, ResetType resettype)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SignalEvent(Handle event)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ClearEvent(Handle event)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateTimer(Handle* timer, ResetType resettype)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result SetTimer(Handle timer, s64 initial, s64 interval)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CancelTimer(Handle timer)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ClearTimer(Handle timer)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateMemoryBlock(Handle* memblock, u32 addr, u32 size, u32 mypermission, u32 otherpermission)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result UnmapMemoryBlock(Handle memblock, u32 addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CreateAddressArbiter(Handle* arbiter)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result CloseHandle(Handle handle)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result WaitSynchronization1(Handle handle, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result WaitSynchronizationN(s32* out, Handle* handles, s32 handlecount, bool waitAll, s64 nanoseconds)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SignalAndWait(s32* out, Handle signal, Handle* handles, s32 handleCount, bool waitAll, s64 nanoseconds)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result DuplicateHandle(Handle* out, Handle original)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| s64 GetSystemTick(void) (This returns the total CPU ticks elapsed since the CPU was powered-on)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x29 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetHandleInfo(s64* out, Handle handle, HandleInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetSystemInfo(s64* out, SystemInfoType type, s32 param)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetProcessInfo(s64* out, Handle process, ProcessInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ConnectToPort(Handle* out, const char* portName)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest1(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest2(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest3(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest4(Handle session)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x32 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SendSyncRequest(Handle session)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x33 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result OpenProcess(Handle* process, u32 processId)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result OpenThread(Handle* thread, Handle process, u32 threadId)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x35 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetProcessId(u32* processId, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x36 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessIdOfThread(u32* processId, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x37 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetThreadId(u32* threadId, Handle thread)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimit(Handle* resourceLimit, Handle process)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x39 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimitLimitValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetResourceLimitCurrentValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadContext(ThreadContext* context, Handle thread)&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Break(BreakReason)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| OutputDebugString(void const, int)&lt;br /&gt;
| Does nothing on non-debug units.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| ControlPerformanceCounter(unsigned long long, int, unsigned int, unsigned long long)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x47 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreatePort(Handle* portServer, Handle* portClient,  const char* name, s32 maxSessions)&lt;br /&gt;
| Setting name=NULL creates a private port not accessible from svcConnectToPort.&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateSessionToPort(Handle* session, Handle port)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x49 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateSession(Handle* sessionServer, Handle* sessionClient)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result AcceptSession(Handle* session, Handle port)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive1(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive2(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive3(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive4(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
| Stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x50 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result BindInterrupt(Interrupt name, Handle syncObject, s32 priority, bool isManualClear)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x51 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result UnbindInterrupt(Interrupt name, Handle syncObject)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x52 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result InvalidateProcessDataCache(Handle process, void* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x53 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StoreProcessDataCache(Handle process, void const* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result FlushProcessDataCache(Handle process, void const* addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x55 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StartInterProcessDma(Handle* dma, Handle dstProcess, void* dst, Handle srcProcess, const void* src, u32 size, const DmaConfig&amp;amp; config)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x56 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result StopDma(Handle dma)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x57 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Result GetDmaState(DmaState* state, Handle dma)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| RestartDma(nn::Handle, void *, void  const*, unsigned int, signed char)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x60 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result DebugActiveProcess(Handle* debug, u32 processID)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x61 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result BreakDebugProcess(Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x62 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result TerminateDebugProcess(Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x63 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessDebugEvent(DebugEventInfo* info, Handle debug)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x64 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ContinueDebugEvent(Handle debug, u32 flags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x65 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x66 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetThreadList(s32* threadCount, u32* threadIds, s32 threadIdMaxCount, Handle domain)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x67 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result GetDebugThreadContext(ThreadContext* context, Handle debug, u32 threadId, u32 controlFlags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x68 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetDebugThreadContext(Handle debug, u32 threadId, ThreadContext* context, u32 controlFlags)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x69 &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryDebugProcessMemory(MemoryInfo* blockInfo, PageInfo* pageInfo, Handle process, u32 addr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ReadProcessMemory(void* buffer, Handle debug, u32 addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result WriteProcessMemory(Handle debug, void const* buffer, u32 addr, u32 size)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetHardwareBreakPoint(s32 registerId, u32 control, u32 value)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| GetDebugThreadParam(long long *, int *, nn::Handle, unsigned int, nn::dmnt::DebugThreadParam)&lt;br /&gt;
| Disabled on regular kernel.&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x70&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result ControlProcessMemory(Handle KProcess, unsigned int Addr0, unsigned int Addr1, unsigned int Size, unsigned int Type, unsigned int Permissions)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result MapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result UnmapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateCodeSet(Handle* handle_out, struct CodeSetInfo, u32 code_ptr, u32 ro_ptr, u32 data_ptr)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result RandomStub()&lt;br /&gt;
| Stubbed&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateProcess(Handle* handle_out, Handle codeset_handle, u32 arm11kernelcaps_ptr, u32 arm11kernelcaps_num)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| TerminateProcess(Handle)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x77&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetProcessResourceLimits(Handle KProcess, Handle KResourceLimit)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x78&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result CreateResourceLimit(Handle *KResourceLimit)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x79&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result SetResourceLimitValues(???)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| AddCodeSegment (unsigned int Addr, unsigned int Size)&lt;br /&gt;
| Stubbed on NATIVE_FIRM beginning with [[2.0.0-2]]. Used during TWL_FIRM boot.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7B&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Backdoor(unsigned int CodeAddress)&lt;br /&gt;
| This is used on ARM9 NATIVE_FIRM. No ARM11 processes have access to it without some form of kernelhax.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| KernelSetState(unsigned int Type, unsigned int Param0, unsigned int Param1, unsigned int Param2)&lt;br /&gt;
| The type determines the meaning of each param&lt;br /&gt;
|-&lt;br /&gt;
| 0x7D&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Result QueryProcessMemory(MemInfo *Info, unsigned int *Out, Handle KProcess, unsigned int Addr)&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0xFF&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ???&lt;br /&gt;
| Debug related? The svcaccesscontrol mask doesn&#039;t apply for this SVC. Stubbed on ARM9 NATIVE_FIRM.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that &amp;quot;stubbed&amp;quot; here means that the SVC only returns an error.&lt;br /&gt;
&lt;br /&gt;
== CreateThread ==&lt;br /&gt;
 R0=s32 threadpriority&lt;br /&gt;
 R1=func entrypoint&lt;br /&gt;
 R2=u32 arg&lt;br /&gt;
 R3=u32 stacktop&lt;br /&gt;
 R4=s32 processorid&lt;br /&gt;
&lt;br /&gt;
 Result result=R0&lt;br /&gt;
 Handle* thread=R1&lt;br /&gt;
&lt;br /&gt;
This processorid is a bitmask for which processors the thread can be run on. Bit value zero enables thread execution for this CPUID, bit value one disables thread execution for this CPUID. Bit0-&amp;lt;...&amp;gt; are for CPUID0-CPUID&amp;lt;...&amp;gt;. The thread priority value must be in the following range: 0x0..0x3F.&lt;br /&gt;
&lt;br /&gt;
With the Old3DS kernel, the s32 processorid must be &amp;lt;=2.&lt;br /&gt;
&lt;br /&gt;
With the New3DS kernel: processorid must be &amp;lt;= &amp;lt;total cores(MPCore &amp;quot;SCU Configuration Register&amp;quot; CPU number value + 1)&amp;gt;. When processorid==0x2 and the process is not an APPLICATION mem-region process, exheader kernel-flags bitmask 0x2000 must be set otherwise error 0xD9001BEA is returned. When processorid==0x3 and the process is not an APPLICATION mem-region process, error 0xD9001BEA is returned. These are the only restriction checks done by the kernel for processorid.&lt;br /&gt;
&lt;br /&gt;
The stacktop must be aligned to 0x8-bytes, otherwise when not aligned to 0x8-bytes the ARM11 kernel clears the low 3-bits of the stacktop address.&lt;br /&gt;
&lt;br /&gt;
= Types and structures =&lt;br /&gt;
&lt;br /&gt;
== enum MemoryState ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory state flags&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| FREE&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| RESERVED&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| IO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| STATIC&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| PRIVATE&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| SHARED&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| CONTINUOUS&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| ALIASED&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| ALIAS&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| ALIAS CODE&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| LOCKED&lt;br /&gt;
| 11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum PageFlags ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Page flags&lt;br /&gt;
!  Bit&lt;br /&gt;
|-&lt;br /&gt;
| LOCKED&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| CHANGED&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum MemoryOperation ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory operation&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| FREE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| RESERVE&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| COMMIT&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| MAP&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| UNMAP&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| PROTECT&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| REGION APP&lt;br /&gt;
| 0x100&lt;br /&gt;
|-&lt;br /&gt;
| REGION SYSTEM&lt;br /&gt;
| 0x200&lt;br /&gt;
|-&lt;br /&gt;
| REGION BASE&lt;br /&gt;
| 0x300&lt;br /&gt;
|-&lt;br /&gt;
| LINEAR&lt;br /&gt;
| 0x10000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The LINEAR memory-operation indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices&#039; DMA(such as the [[GPU]]). Addr0+size for this must be within the 0x14000000-0x1C000000 range when Addr0 is non-zero(Addr1 must be zero), Addr0 isn&#039;t actually used by svcControlMemory for mapping memory: Addr0 is not used by the kernel after doing address-range checks. The kernel determines what physical-address to use by allocating memory from FCRAM(about the same way as other memory), which is then used to determine the virtual-address.&lt;br /&gt;
&lt;br /&gt;
[[8.0.0-18]] added a new memory mapping(0x30000000-0x38000000) for LINEAR memory, this replaces the original mapping for newer titles. The kernel uses the new mapping when the process memory-region is BASE, or when the process kernel-release-version field is &amp;gt;=0x022c(2.44 / system-version [[8.0.0-18]]).&lt;br /&gt;
&lt;br /&gt;
The input mem-region value for svcControlMemory is only used(when non-zero) when the PID is value 1, for the [[FIRM]] ARM11 &amp;quot;loader&amp;quot; module.&lt;br /&gt;
&lt;br /&gt;
== enum MemoryPermission ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Memory permission&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| NONE&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| R&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| W&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| RW&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| X&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| RX&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| WX&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| RWX&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| DONTCARE&lt;br /&gt;
| 0x10000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== enum ResetType ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reset type&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| ONESHOT&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| STICKY&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| PULSE&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct MemoryInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Base process virtual address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Permission&lt;br /&gt;
|-&lt;br /&gt;
| enum MemoryState&lt;br /&gt;
| State&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct PageInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Flags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct StartupInfo ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| s32&lt;br /&gt;
| Priority&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Stack size&lt;br /&gt;
|-&lt;br /&gt;
| s32&lt;br /&gt;
| argc&lt;br /&gt;
|-&lt;br /&gt;
| s16*&lt;br /&gt;
| argv&lt;br /&gt;
|-&lt;br /&gt;
| s16*&lt;br /&gt;
| envp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct CodeSetInfo ==&lt;br /&gt;
All addresses are given virtual for the process to be created.&lt;br /&gt;
All sizes/offsets are in given in 0x1000-pages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Codeset Name&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata offset&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .data offset&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .bss size + .data size&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| u32[2]&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== struct DebugEventInfo ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Event type&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Thread ID (not used in all events)&lt;br /&gt;
|-&lt;br /&gt;
| u32[2]&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|-&lt;br /&gt;
| u32[6]&lt;br /&gt;
| Event-specific data (see below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Event type&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| PROCESS&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| CREATE THREAD&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| EXIT THREAD&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| EXIT PROCESS&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| EXCEPTION&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| DLL LOAD&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| DLL UNLOAD&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| SCHEDULE IN&lt;br /&gt;
| 7&lt;br /&gt;
|-&lt;br /&gt;
| SCHEDULE OUT&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| SYSCALL IN&lt;br /&gt;
| 9&lt;br /&gt;
|-&lt;br /&gt;
| SYSCALL OUT&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| OUTPUT STRING&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
| MAP&lt;br /&gt;
| 12&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PROCESS event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u64&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| Process name&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Process ID&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| 0 = newly created process, 1 = attached process&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CREATE THREAD event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Creator thread ID&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Base address (?)&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Entrypoint&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== EXIT THREAD/PROCESS events ===&lt;br /&gt;
&lt;br /&gt;
A single u32 reason field is used.&lt;br /&gt;
&lt;br /&gt;
Thread exit reasons:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| (None)&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| EXIT PROCESS&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE PROCESS&lt;br /&gt;
| 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Process exit reasons:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| (None)&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| TERMINATE&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| UNHANDLED EXCEPTION&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== EXCEPTION event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Exception type&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Exception address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Argument (type-specific)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Exception types:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
!  Argument&lt;br /&gt;
|-&lt;br /&gt;
| UNDEFINED INSTRUCTION&lt;br /&gt;
| 0&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown)&lt;br /&gt;
| 1&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown, mem-related)&lt;br /&gt;
| 2&lt;br /&gt;
| Address&lt;br /&gt;
|-&lt;br /&gt;
| (Unknown, mem-related)&lt;br /&gt;
| 3&lt;br /&gt;
| Address&lt;br /&gt;
|-&lt;br /&gt;
| ATTACH BREAK&lt;br /&gt;
| 4&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| BREAKPOINT&lt;br /&gt;
| 5&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| USER BREAK&lt;br /&gt;
| 6&lt;br /&gt;
| User break type&lt;br /&gt;
|-&lt;br /&gt;
| DEBUGGER BREAK&lt;br /&gt;
| 7&lt;br /&gt;
| (None)&lt;br /&gt;
|-&lt;br /&gt;
| UNDEFINED SYSCALL&lt;br /&gt;
| 8&lt;br /&gt;
| Attempted syscall ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
User break types:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Reason&lt;br /&gt;
!  Id&lt;br /&gt;
|-&lt;br /&gt;
| PANIC&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| ASSERT&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| USER&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SCHEDULER/SYSCALL IN/OUT events ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u64&lt;br /&gt;
| Clock tick&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Syscall (only for SYSCALL events)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OUTPUT STRING event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| String address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| String size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MAP event ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Mapped address&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Mapped size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| MemoryPermission&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| MemoryState&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Processes =&lt;br /&gt;
Each process can only use SVCs which are enabled in the [[NCCH#CXI|exheader]] for this process. The ARM11 kernel SVC handler checks whether the SVC is enabled in the syscall access control mask stored on the SVC-mode stack, when the SVC isn&#039;t enabled a kernelpanic() is triggered. Each process has a separate SVC-mode stack, this stack and the syscall access mask stored here is initialized when the process is started. Applications normally only have access to SVCs &amp;lt;=0x3D, however not all SVCs &amp;lt;=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.&lt;br /&gt;
&lt;br /&gt;
Each process has a separate handle-table, the size of this table is stored in the exheader. The handles in a handle-table can&#039;t be used in the context of other processes, since those handles don&#039;t exist in other handle-tables.&lt;br /&gt;
&lt;br /&gt;
0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for the current KThread.&lt;br /&gt;
&lt;br /&gt;
Calling svcBreak on retail will only terminate the process which called this SVC.&lt;br /&gt;
&lt;br /&gt;
= Threads =&lt;br /&gt;
For svcCreateThread the input address used for Entrypoint_Param and StackTop are normally the same, however these can be arbitrary. For the main thread the Entrypoint_Param is value 0.&lt;br /&gt;
&lt;br /&gt;
Using CloseHandle() with a KThread handle will terminate the specified thread, only if the reference count reaches 0.&lt;br /&gt;
&lt;br /&gt;
Lower priority values give the thread higher priority. For userland apps, priorities between 0x18 and 0x3F are allowed. The priority of the app&#039;s main thread seems to be 0x30.&lt;br /&gt;
&lt;br /&gt;
The thread scheduler is cooperative, therefore if a thread takes up all the CPU time (for example if it enters an endless loop), all the other threads that run on the same CPU core won&#039;t get a chance to run. The main way of yielding another thread is using an address arbiter.&lt;br /&gt;
&lt;br /&gt;
= Memory Mapping =&lt;br /&gt;
ControlMemory and MapMemoryBlock can be used to map memory pages, these two SVCs only support mapping execute-never R/W pages. The input permissions parameter for these SVCs must therefore be &amp;lt;=3, where value zero is used when un-mapping memory. Furthermore it appears that only regular heap pages can be mirrored (it won&#039;t work for TLS, stack, .data, .text, for example).&lt;br /&gt;
&lt;br /&gt;
Bitmask 0xF00 for ControlMemory parameter MemoryType is the memory-type, when this is zero the memory-type is loaded from the kernel flags stored in the exheader ARM11 kernel descriptors, for the process using the SVC.&lt;br /&gt;
&lt;br /&gt;
ControlMemory parameter MemoryType with value 0x10003 is used for mapping the GSP [[Memory_layout|heap]]. The low 8-bits are the type: 1 is for un-mapping memory, 3 for mapping memory. Type4 is used to mirror the RW memory at Addr1, to Addr0. Type4 will return an error if Addr1 is located in read-only memory. Addr1 is not used for type1 and type3.&lt;br /&gt;
&lt;br /&gt;
The ARM11 kernel does not allow processes to create shared memory blocks via svcCreateMemoryBlock, when the process memorytype(from the kernel flags stored in the exheader kernel descriptor) is the application memorytype, and when addr=0. It&#039;s unknown how the kernel handles addr=0 when the memorytype is not the application memorytype. When addr is non-zero, it must be located in memory which is already mapped. Furthermore, it appears that only regular heap pages (allocated using svcControlMemory op=COMMIT) are accepted as valid addrs.&lt;br /&gt;
&lt;br /&gt;
ControlProcessMemory maps memory in the specified process, this is the only SVC which allows mapping executable memory. Format of the permissions field for memory mapping SVCs: bit0=R, bit1=W, bit2=X. Type6 sets the Addr0 memory permissions to the input permissions, for already mapped memory. Type is the MemoryOperation enum, without the memory-type/memory-region. ControlProcessMemory only supports type4, type5, and type6. ControlProcessMemory does not support using the current KProcess handle alias.&lt;br /&gt;
&lt;br /&gt;
MapProcessMemory maps RW memory starting at address 0x00100000 in the specified KProcess, at the specified StartAddr in the current process. MapProcessMemory then maps 0x08000000 in the specified process, to StartAddr+0x7f00000 in the current process. UnmapProcessMemory unmaps the memory which was mapped by MapProcessMemory.&lt;br /&gt;
&lt;br /&gt;
Note that with the MAP MemoryOperation, the kernel will refuse to MAP memory for the specified addr1, when addr1 was already used with another MAP operation as addr1. The kernel also doesn&#039;t allow memory to be freed via the FREE MemoryOperation, when other virtual-memory is mapped to this same memory(when the MAP MemoryOperation was used with this memory with addr1).&lt;br /&gt;
&lt;br /&gt;
= DMA =&lt;br /&gt;
The CTRSDK code for using svcStartInterProcessDma will execute svcBreak when svcStartInterProcessDma returns an error(except for certain error value(s)). Therefore on retail, triggering a svcStartInterProcessDma via a system-module which results in an error from svcStartInterProcessDma will result in the system-module terminating.&lt;br /&gt;
&lt;br /&gt;
==DmaConfig==&lt;br /&gt;
Size of struct is 24 bytes.&lt;br /&gt;
&lt;br /&gt;
 struct DmaConfig {&lt;br /&gt;
     sint8_t channel_sel; // @0 Selects which DMA channel to use: 0-7, -1 = don&#039;t care.&lt;br /&gt;
     uint8_t unk1;        // @1 Accepted values: 0,2,4,8.&lt;br /&gt;
     uint8_t flags;       // @2 bit0: DST_CFG, bit1: SRC_CFG, bit2: SHALL_BLOCK, bit3: ???, bit6: DST_ALT_CFG, bit7: SRC_ALT_CFG&lt;br /&gt;
     uint8_t dst_cfg[10];&lt;br /&gt;
     // @5 Accepted values (u8): 4, 8, 12, 15.&lt;br /&gt;
     // @15 Accepted values (u8): 4, 8, 12, 15.&lt;br /&gt;
     uint8_t src_cfg[10]; // @14&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If SRC_CFG/DST_CFG is set in the flags field, the configuration for src/dst is loaded from src_cfg/dst_cfg respectively. If the *_ALT_CFG flag is set same thing goes, except byte0 of each cfg is forced to 0xFF. ALT_CFG has priority over CFG.&lt;br /&gt;
&lt;br /&gt;
If CFG or ALT_CFG is not set, default configuration is loaded:&lt;br /&gt;
 FF 0F 80 00 00 00 80 00 00 00&lt;br /&gt;
&lt;br /&gt;
If SHALL_BLOCK is set, the thread will sleep until the DMA engine is ready. If not set, the SVC will return 0xD04007F0 if the DMA channel is busy.&lt;br /&gt;
&lt;br /&gt;
The format of src_cfg/dst_cfg is unknown, but both have the same format. Checks suggest that the second byte of cfg equalling 4 means NO_INCREMENT (don&#039;t increment after read/write).&lt;br /&gt;
&lt;br /&gt;
= Debugging =&lt;br /&gt;
DebugActiveProcess is used to attach to a process for debugging. This SVC can only be used when the target process&#039; ARM11 descriptors stored in the exheader have the kernel flag for &amp;quot;Enable debug&amp;quot; set. Otherwise when that flag is clear, the kernel flags for the process using this SVC must have the &amp;quot;Force debug&amp;quot; flag set.&lt;br /&gt;
&lt;br /&gt;
= KernelSetState =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Type&lt;br /&gt;
!  Enabled for the NATIVE_FIRM ARM11 kernel&lt;br /&gt;
!  Enabled for the TWL_FIRM ARM11 kernel&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This initializes the programID for launching [[FIRM]], then triggers launching [[FIRM]]. Param0 is unused. Param1 is the programID-low, and the programID-high is 0x00040138. Param2 is used only with the [[New_3DS]] kernel, pm-module uses value 0 with this. With New3DS kernel, it forces the programIDlow to be the New3DS NATIVE_FIRM, when the input programIDlow is for the Old3DS NATIVE_FIRM and Param2==0.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| Unknown, does nothing with the TWL_FIRM ARM11 kernel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This used for initializing the 0x1000-byte buffer used by the launched [[FIRM]]. Param2 is unused. When Param0 is value 1, this buffer is copied to the beginning of FCRAM at 0xF0000000, and Param1 is unused. When Param0 is value 0, this kernel buffer is mapped to process address Param1.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Param0-Param3 are unused. This unmaps(?) the following virtual memory by writing value physaddr(where physaddr base is 0x80000000) to the L1 MMU table entries: 0x00300000..0x04300000, 0x08000000..0x0FE00000, and 0x10000000..0xF8000000.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Debug related?&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| This triggers ARM11 kernel [[I2C]] code, Param0-Param3 are unused. This ARM11 kernel I2C code will never return. Device address 0x4a via the second I2C bus is used here. This triggers a hardware system reboot via poking an I2C MCU register: register address 0x20 is written to with value 4.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Alternate unused FIRM launch code-path, with different [[PXI]] FIFO word constants.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Yes, implemented at some point after system-version v4.5.&lt;br /&gt;
| ?&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| Only available for the [[New_3DS]] kernel. It&#039;s unknown what this is used for.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetSystemInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  SystemInfoType value&lt;br /&gt;
!  s32 param&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| This writes the total used memory size in the following memory regions to out: APPLICATION, SYSTEM, and BASE.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| This writes the total used memory size in the APPLICATION memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 2&lt;br /&gt;
| This writes the total used memory size in the SYSTEM memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 3&lt;br /&gt;
| This writes the total used memory size in the BASE memory region to out.&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Unused&lt;br /&gt;
| This writes the total number of processes which were directly launched by the kernel, to out. For the NATIVE_FIRM/SAFE_MODE_FIRM ARM11 kernel, this is normally 5, for processes sm, fs, pm, loader, and pxi.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetProcessInfo =&lt;br /&gt;
Input:&lt;br /&gt;
 R0 = unused&lt;br /&gt;
 R1 = Handle process&lt;br /&gt;
 R2 = ProcessInfoType type&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
 R0 = Result&lt;br /&gt;
 R1 = output value lower word&lt;br /&gt;
 R2 = output value upper word&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  ProcessInfoType value&lt;br /&gt;
!  Available since system version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 9-19&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| This only returns error 0xD8E007ED.&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| low u32 = (0x20000000 - &amp;lt;LINEAR virtual-memory base for this process&amp;gt;). That is, the output value is the value which can be added to LINEAR memory vaddrs for converting to physical-memory addrs.&lt;br /&gt;
|-&lt;br /&gt;
| 21-23&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| This only returns error 0xE0E01BF4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= GetHandleInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  HandleInfoType value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| This writes back two (unknown) u32 fields from the KProcess object. If not a KProcess handle is given, it will write whatever was in r5, r7 when the svc was called.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Get internal refcount-1 for kernel object (u32), and also a boolean if the refcount-1 is negative (u32).&lt;br /&gt;
|-&lt;br /&gt;
| 0x32107&lt;br /&gt;
| Returns (u64) 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= svc7B Backdoor =&lt;br /&gt;
This saves SVC-mode SP+LR on the user-mode stack, then sets the SVC-mode SP to the user-mode SP. This then calls the specified code in SVC-mode. Once the called code returns, this pops the saved SP+LR off the stack for restoring the SVC-mode SP, then returns from the svc7b handler. Note that this svc7b handler does not disable IRQs, if any IRQs/context-switches occur while the SVC-mode SP is set to the user-mode one here, the ARM11-kernel will crash(which hangs the whole ARM11-side system).&lt;br /&gt;
&lt;br /&gt;
= Kernel error-codes =&lt;br /&gt;
See [[Error codes]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Error-code value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0xC860180A&lt;br /&gt;
| Not enough free memory available for memory allocation.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC920181A&lt;br /&gt;
| The session was closed by the other process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD88007FA&lt;br /&gt;
| Unknown, this can be returned by svcConnectToPort.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007ED&lt;br /&gt;
| This indicates that a value is outside of the enum being used.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007F1&lt;br /&gt;
| This error indicates Misaligned address.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD8E007F7&lt;br /&gt;
| This error indicates that the input handle used with the SVC does not exist in the process handle-table, or that the handle kernel object type does not match the type used by the SVC.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD9000402&lt;br /&gt;
| Invalid memory permissions for input/output buffers, for svcStartInterProcessDma.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD9001BF7&lt;br /&gt;
| This error is returned when the kernel retrieves a pointer to a kernel object, but the object type doesn&#039;t match the desired one.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD92007EA&lt;br /&gt;
| This error is returned when a process attempts to use svcCreateMemoryBlock when the process memorytype is the application memorytype, and when addr=0.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE0E01BF5&lt;br /&gt;
| This indicates an invalid address was used.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8C007F4&lt;br /&gt;
| Invalid type/param0-param3 input for svcKernelSetState. This is also returned for those syscalls marked as stubs.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>MemoryController</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=10831</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=10831"/>
		<updated>2014-11-23T10:45:41Z</updated>

		<summary type="html">&lt;p&gt;MemoryController: Add small Linux Netbeans tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it. On Windows there&#039;s a GUI installer. On Linux/Mac there&#039;s a perl-script. Make sure you also select ctrulib when installing.&lt;br /&gt;
* Download the files in the [https://github.com/smealum/ctrulib/archive/master.zip ctrulib repository] (even though the library has already been installed) because the repository contains a 3DS project template and examples.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
* First get the devkitARM updater Perl script for Linux.&lt;br /&gt;
* Run it with superuser privileges if your /opt directory is not marked world read-writeable.&lt;br /&gt;
* Get ctrulib from Smealum&#039;s GitHub repository, build and install it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo -s&lt;br /&gt;
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
./devkitARMupdate.pl&lt;br /&gt;
cd /opt/devkitpro&lt;br /&gt;
git clone git@github.com:smealum/ctrulib.git&lt;br /&gt;
cd ctrulib/libctru&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created. Currently there are a few examples in the separate ctrulib download under the &amp;quot;examples&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;arm11u:&#039;&#039;&#039; simple homebrew example&lt;br /&gt;
* &#039;&#039;&#039;sdmc:&#039;&#039;&#039; demonstrates how to access files on the SD card&lt;br /&gt;
* &#039;&#039;&#039;mic:&#039;&#039;&#039; demonstrates how to read sound from the microphone&lt;br /&gt;
* &#039;&#039;&#039;gpu:&#039;&#039;&#039; demonstrates how to render 3D geometry with the GPU&lt;br /&gt;
&lt;br /&gt;
==Building the examples on Linux with Netbeans==&lt;br /&gt;
* Go to File-&amp;gt;New Project...&lt;br /&gt;
* Select C/C++ Project with existing code&lt;br /&gt;
* Navigate to the examples directory and select the folder for the project you want to build; eg.    /home/vtsingaras/3ds/examples/app_launch&lt;br /&gt;
* Leave Configuration Mode to &#039;Automatic&#039; and click &#039;Finish&#039;.&lt;br /&gt;
* It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:&lt;br /&gt;
&amp;lt;pre&amp;gt;export DEVKITPRO=/opt/devkitpro&lt;br /&gt;
export DEVKITARM=/opt/devkitpro/devkitARM&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Right-click the project and go to Properties-&amp;gt;Code Assistance and click C Compiler.&lt;br /&gt;
* In include directories enter &lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/devkitpro/devkitARM/include;/opt/devkitpro/ctrulib/libctru/include&amp;lt;/pre&amp;gt;&lt;br /&gt;
adjusting again for your devkitPro path.&lt;br /&gt;
* Do the same for &#039;C++ Compiler&#039;.&lt;br /&gt;
* Go to &#039;Run&#039; and click &#039;Clean and Build Project&#039;.&lt;br /&gt;
* Now right-click on the project and select Code Assistance-&amp;gt;Reparse Project.&lt;br /&gt;
&lt;br /&gt;
Now you can use Netbeans&#039; code completion feature and build your project from the Run menu.&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew open a terminal, browse to your homebrew&#039;s folder and run make.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file together with an icon. The icon and .3dsx file are the format required for the [[Homebrew Channel]].&lt;br /&gt;
&lt;br /&gt;
* To build a Gateway-compatible .3ds file you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip [ELF file]&lt;br /&gt;
 makerom -f cci -o [.3ds file] -rsf [RSF file] -target d -exefslogo -elf [ELF file] -icon [icon file] -banner [banner file]&lt;/div&gt;</summary>
		<author><name>MemoryController</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=10830</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=10830"/>
		<updated>2014-11-23T09:37:18Z</updated>

		<summary type="html">&lt;p&gt;MemoryController: added instructions for Linux&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it. On Windows there&#039;s a GUI installer. On Linux/Mac there&#039;s a perl-script. Make sure you also select ctrulib when installing.&lt;br /&gt;
* Download the files in the [https://github.com/smealum/ctrulib/archive/master.zip ctrulib repository] (even though the library has already been installed) because the repository contains a 3DS project template and examples.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
* First get the devkitARM updater Perl script for Linux.&lt;br /&gt;
* Run it with superuser privileges if your /opt directory is not marked world read-writeable.&lt;br /&gt;
* Get ctrulib from Smealum&#039;s GitHub repository, build and install it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo -s&lt;br /&gt;
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
./devkitARMupdate.pl&lt;br /&gt;
cd /opt/devkitpro&lt;br /&gt;
git clone git@github.com:smealum/ctrulib.git&lt;br /&gt;
cd ctrulib/libctru&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created. Currently there are a few examples in the separate ctrulib download under the &amp;quot;examples&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;arm11u:&#039;&#039;&#039; simple homebrew example&lt;br /&gt;
* &#039;&#039;&#039;sdmc:&#039;&#039;&#039; demonstrates how to access files on the SD card&lt;br /&gt;
* &#039;&#039;&#039;mic:&#039;&#039;&#039; demonstrates how to read sound from the microphone&lt;br /&gt;
* &#039;&#039;&#039;gpu:&#039;&#039;&#039; demonstrates how to render 3D geometry with the GPU&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew open a terminal, browse to your homebrew&#039;s folder and run make.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file together with an icon. The icon and .3dsx file are the format required for the [[Homebrew Channel]].&lt;br /&gt;
&lt;br /&gt;
* To build a Gateway-compatible .3ds file you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip [ELF file]&lt;br /&gt;
 makerom -f cci -o [.3ds file] -rsf [RSF file] -target d -exefslogo -elf [ELF file] -icon [icon file] -banner [banner file]&lt;/div&gt;</summary>
		<author><name>MemoryController</name></author>
	</entry>
</feed>