<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hthh</id>
	<title>Nintendo Switch Brew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hthh"/>
	<link rel="alternate" type="text/html" href="https://switchbrew.org/wiki/Special:Contributions/Hthh"/>
	<updated>2026-05-17T06:39:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=6677</id>
		<title>Shared Database services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=6677"/>
		<updated>2019-04-17T07:50:14Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= pl:u =&lt;br /&gt;
This is &amp;quot;nn::pl::detail::ISharedFontManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestLoad]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetLoadState]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#GetSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetSharedMemoryAddressOffset]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetSharedMemoryNativeHandle]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetSharedFontInOrderOfPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetSharedFontInOrderOfPriorityForSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [8.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [8.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestLoad ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), no output.&lt;br /&gt;
&lt;br /&gt;
== GetLoadState ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the [[#LoadState]] (uint32).&lt;br /&gt;
&lt;br /&gt;
=== LoadState ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Loading&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Loaded&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSize ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the Font Size (uint32).&lt;br /&gt;
&lt;br /&gt;
== GetSharedMemoryAddressOffset ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the offset (uint32) to the Font Address.&lt;br /&gt;
&lt;br /&gt;
== GetSharedMemoryNativeHandle ==&lt;br /&gt;
No input, returns an output SharedMemory handle.&lt;br /&gt;
&lt;br /&gt;
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.&lt;br /&gt;
&lt;br /&gt;
Font data is TTF, located at the offset returned by [[#GetSharedMemoryAddressOffset]].&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontInOrderOfPriority ==&lt;br /&gt;
Takes an input u64 [[Settings_services#LanguageCode|LanguageCode]] and 3 type-0x6 output buffers, returns an output u8 and u32. The u8 is a bool to specify if the fonts are loaded or not and the u32 is the font count.&lt;br /&gt;
The first buffer contains a list of [[#SharedFontType|Shared font types]], the second buffer contains the font offsets and the final buffer contains the font sizes.&lt;br /&gt;
The buffers are an array of u32s which specify information about a specific font. Buffer1[n] is related to Buffer2[n] and Buffer3[n].&lt;br /&gt;
Example: Font index 0s offset is at Buffer2[0], size is at Buffer3[0].&lt;br /&gt;
The fonts are relative to the shared memory created by [[#GetSharedMemoryNativeHandle]]&lt;br /&gt;
&lt;br /&gt;
== SharedFontType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Japan, US and Europe (Standard)&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Extended Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Chinese Traditional&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Korean (Hangul)&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Nintendo Extended&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons,  etc.&lt;br /&gt;
&lt;br /&gt;
= mii:u, mii:e =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetDatabaseService&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IDatabaseService ==&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsUpdated&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsFullDatabase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Get1&lt;br /&gt;
|-&lt;br /&gt;
| 5 || UpdateLatest&lt;br /&gt;
|-&lt;br /&gt;
| 6 || BuildRandom&lt;br /&gt;
|-&lt;br /&gt;
| 7 || BuildDefault&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Get2&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Get3&lt;br /&gt;
|-&lt;br /&gt;
| 10 || UpdateLatest1&lt;br /&gt;
|-&lt;br /&gt;
| 11 || FindIndex&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Move&lt;br /&gt;
|-&lt;br /&gt;
| 13 || AddOrReplace&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Delete&lt;br /&gt;
|-&lt;br /&gt;
| 15 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 16 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 17 || Format&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Import&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Export&lt;br /&gt;
|-&lt;br /&gt;
| 20 || IsBrokenDatabaseWithClearFlag&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetIndex&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [5.0.0+] SetInterfaceVersion&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [5.0.0+] Convert&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [7.0.0+] ConvertCoreDataToCharInfo&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [7.0.0+] ConvertCharInfoToCoreData&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= miiimg =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IImageDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Reload&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 12 || IsEmpty&lt;br /&gt;
|-&lt;br /&gt;
| 13 || IsFull&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 15 || LoadImage&lt;br /&gt;
|-&lt;br /&gt;
| 16 || AddOrUpdateImage&lt;br /&gt;
|-&lt;br /&gt;
| 17 || DeleteImages&lt;br /&gt;
|-&lt;br /&gt;
| 100 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 101 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ImportFile&lt;br /&gt;
|-&lt;br /&gt;
| 103 || ExportFile&lt;br /&gt;
|-&lt;br /&gt;
| 104 || ForceInitialize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= pdm:ntfy =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::INotifyService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [8.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= pdm:qry =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::IQueryService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 1 || &lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 2 || &lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || &lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 6 || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || &lt;br /&gt;
|-&lt;br /&gt;
| 14 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= avm =&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IAvmService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || No input, returns an [[#IVersionListImporter]].&lt;br /&gt;
|-&lt;br /&gt;
| 200 || &lt;br /&gt;
|-&lt;br /&gt;
| 202 || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IVersionListImporter ==&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IVersionListImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=BCAT_services&amp;diff=6639</id>
		<title>BCAT services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=BCAT_services&amp;diff=6639"/>
		<updated>2019-04-16T03:08:59Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BCAT (Background Content Asymmetric synchronized delivery and Transmission) encompasses a set of content download/upload related services.&lt;br /&gt;
&lt;br /&gt;
= bcat:a, bcat:m, bcat:u, bcat:s =&lt;br /&gt;
These are &amp;quot;nn::bcat::detail::ipc::IServiceCreator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateBcatService&lt;br /&gt;
|-&lt;br /&gt;
| 1 || CreateDeliveryCacheStorageService&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDeliveryCacheStorageServiceWithApplicationId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Equivalent to 3DS BOSS(SpotPass). See [[BCAT_Content_Container|here]] for BCAT-content-container.&lt;br /&gt;
&lt;br /&gt;
== IBcatService ==&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IBcatService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 10100 || RequestSyncDeliveryCache&lt;br /&gt;
|-&lt;br /&gt;
| 10101 || [5.0.0+] RequestSyncDeliveryCacheWithDirectoryName&lt;br /&gt;
|-&lt;br /&gt;
| 10200 || [5.0.0+] CancelSyncDeliveryCacheRequest&lt;br /&gt;
|-&lt;br /&gt;
| 20100 || RequestSyncDeliveryCacheWithApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 20101 || [5.0.0+] RequestSyncDeliveryCacheWithApplicationIdAndDirectoryName&lt;br /&gt;
|-&lt;br /&gt;
| 20300 || [8.0.0+] ? (Takes a total of 8-bytes of input, returns an [[#INotifierService]])&lt;br /&gt;
|-&lt;br /&gt;
| 20301 || [8.0.0+] ? (Takes a total of 8-bytes of input, returns an [[#IDeliveryTaskSuspensionService]])&lt;br /&gt;
|-&lt;br /&gt;
| 30100 || SetPassphrase&lt;br /&gt;
|-&lt;br /&gt;
| 30200 || RegisterBackgroundDeliveryTask&lt;br /&gt;
|-&lt;br /&gt;
| 30201 || UnregisterBackgroundDeliveryTask&lt;br /&gt;
|-&lt;br /&gt;
| 30202 || BlockDeliveryTask&lt;br /&gt;
|-&lt;br /&gt;
| 30203 || UnblockDeliveryTask&lt;br /&gt;
|-&lt;br /&gt;
| 30300 || [8.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 90100 || EnumerateBackgroundDeliveryTask&lt;br /&gt;
|-&lt;br /&gt;
| 90200 || GetDeliveryList&lt;br /&gt;
|-&lt;br /&gt;
| 90201 || ClearDeliveryCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 90202 || [8.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 90300 || GetPushNotificationLog&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDeliveryCacheProgressService ===&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IDeliveryCacheProgressService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetEvent&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetImpl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IDeliveryCacheStorageService ==&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IDeliveryCacheStorageService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFileService&lt;br /&gt;
|-&lt;br /&gt;
| 1 || CreateDirectoryService&lt;br /&gt;
|-&lt;br /&gt;
| 10 || EnumerateDeliveryCacheDirectory&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDeliveryCacheFileService ===&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IDeliveryCacheFileService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetDigest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDeliveryCacheDirectoryService ===&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IDeliveryCacheDirectoryService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetCount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== INotifierService ===&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::INotifierService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Added with [8.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDeliveryTaskSuspensionService ===&lt;br /&gt;
This is &amp;quot;nn::bcat::detail::ipc::IDeliveryTaskSuspensionService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Added with [8.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;nowiki&amp;gt;news:a, news:c, news:m, news:p, news:v&amp;lt;/nowiki&amp;gt; =&lt;br /&gt;
These are &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::IServiceCreator&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || No input, returns an [[#INewsService]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || No input, returns an [[#INewlyArrivedEventHolder]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || || No input, returns an [[#INewsDataService]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || || No input, returns an [[#INewsDatabaseService]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || || No input, returns an [[#IOverwriteEventHolder]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INewsService ==&lt;br /&gt;
This is &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::INewsService&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 10100 || &lt;br /&gt;
|-&lt;br /&gt;
| 20100 || &lt;br /&gt;
|-&lt;br /&gt;
| 30100 || &lt;br /&gt;
|-&lt;br /&gt;
| 30101 || &lt;br /&gt;
|-&lt;br /&gt;
| 30110 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 30200 || &lt;br /&gt;
|-&lt;br /&gt;
| 30201 || [8.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 30300 || &lt;br /&gt;
|-&lt;br /&gt;
| 30400 || &lt;br /&gt;
|-&lt;br /&gt;
| 30500 || [8.0.0+] ? (Takes a total of 8-bytes of input, a handle, and a type-0x9 input buffer, returns an [[#IUnknown2]])&lt;br /&gt;
|-&lt;br /&gt;
| 40100 || &lt;br /&gt;
|-&lt;br /&gt;
| 40101 || &lt;br /&gt;
|-&lt;br /&gt;
| 40200 || &lt;br /&gt;
|-&lt;br /&gt;
| 40201 || &lt;br /&gt;
|-&lt;br /&gt;
| 90100 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INewlyArrivedEventHolder ==&lt;br /&gt;
This is &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::INewlyArrivedEventHolder&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INewsDataService ==&lt;br /&gt;
This is &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::INewsDataService&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [6.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INewsDatabaseService ==&lt;br /&gt;
This is &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::INewsDatabaseService&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [6.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IOverwriteEventHolder ==&lt;br /&gt;
This is &amp;lt;nowiki&amp;gt;&amp;quot;nn::news::detail::ipc::IOverwriteEventHolder&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IUnknown2 ==&lt;br /&gt;
This was added with [8.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= prepo:a, prepo:a2, prepo:m, prepo:u, prepo:s =&lt;br /&gt;
These are &amp;quot;nn::prepo::detail::ipc::IPrepoService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 10100 || SaveReportOld ([1.0.0-5.1.0] SaveReport)&lt;br /&gt;
|-&lt;br /&gt;
| 10101 || SaveReportWithUserOld ([1.0.0-5.1.0] SaveReportWithUser)&lt;br /&gt;
|-&lt;br /&gt;
| 10102 || [6.0.0+] SaveReport&lt;br /&gt;
|-&lt;br /&gt;
| 10103 || [6.0.0+] SaveReportWithUser&lt;br /&gt;
|-&lt;br /&gt;
| 10200 || RequestImmediateTransmission&lt;br /&gt;
|-&lt;br /&gt;
| 10300 || GetTransmissionStatus&lt;br /&gt;
|-&lt;br /&gt;
| 20100 || SaveSystemReport&lt;br /&gt;
|-&lt;br /&gt;
| 20101 || SaveSystemReportWithUser&lt;br /&gt;
|-&lt;br /&gt;
| 20200 || [4.0.0+] SetOperationMode&lt;br /&gt;
|-&lt;br /&gt;
| 30100 || ClearStorage&lt;br /&gt;
|-&lt;br /&gt;
| 30200 || [6.0.0+] ClearStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 30300 || [6.0.0+] GetStorageUsage&lt;br /&gt;
|-&lt;br /&gt;
| 30400 || [6.0.0+] GetStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 30401 || [6.0.0+] GetThroughputHistory&lt;br /&gt;
|-&lt;br /&gt;
| 30500 || [6.0.0+] GetLastUploadError&lt;br /&gt;
|-&lt;br /&gt;
| 40100 || IsUserAgreementCheckEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 40101 || SetUserAgreementCheckEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 90100 || [6.0.0+] ReadAllReportFiles ([1.0.0-5.1.0] GetStorageUsage)&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0-5.1.0] 90200 || &lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0-5.1.0] 90201 || &lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0-5.1.0] 90300 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Data reporting ==&lt;br /&gt;
The &amp;quot;Play Report&amp;quot; (prepo) service uploads system and user information to a cloud server.&lt;br /&gt;
This includes the following fields:&lt;br /&gt;
 sys_info&lt;br /&gt;
 data&lt;br /&gt;
 application_id&lt;br /&gt;
 event_id&lt;br /&gt;
 operation_mode&lt;br /&gt;
 lc_recorded_at (followed by a timestamp)&lt;br /&gt;
 nc_recorded_at (followed by a timestamp)&lt;br /&gt;
 nsa_id&lt;br /&gt;
 os_version&lt;br /&gt;
&lt;br /&gt;
And the contents of the following file:&lt;br /&gt;
 is_user_agreement_check_enabled.bin&lt;br /&gt;
&lt;br /&gt;
All the information is periodically uploaded to the following URL:&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://receive-%.dg.srv.nintendo.net/post&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It also checks the validity of the device&#039;s authentication token using the following URL:&amp;lt;br&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://dauth-%.ndas.srv.nintendo.net/v1/device_auth_token&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Account_services&amp;diff=6630</id>
		<title>Account services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Account_services&amp;diff=6630"/>
		<updated>2019-04-16T02:15:03Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= acc:su =&lt;br /&gt;
This is &amp;quot;nn::account::IAccountServiceForAdministrator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetUserCount ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetUserExistence ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ListAllUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListOpenUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetLastOpenedUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetProfile || Returns an [[#IProfile]].&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetProfileDigest ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || IsUserRegistrationRequestPermitted ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || TrySelectUserWithoutInteraction ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [5.0.0-5.1.0] ListOpenContextStoredUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [6.0.0+] DebugActivateOpenContextRetention || No input, returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetUserRegistrationNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetUserStateChangeNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 102 || GetBaasAccountManagerForSystemService || Returns an [[#IManagerForSystemService]].&lt;br /&gt;
|-&lt;br /&gt;
| 103 || GetBaasUserAvailabilityChangeNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 104 || GetProfileUpdateNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [4.0.0+] CheckNetworkServiceAvailabilityAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 110 || StoreSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || ClearSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 112 || LoadSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 113 || GetSaveDataThumbnailExistence ||&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [6.0.0+] ActivateOpenContextRetention || Takes a total of 0x8-bytes of input, returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [6.0.0+] ListQualifiedUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 190 || GetUserLastOpenedApplication ||&lt;br /&gt;
|-&lt;br /&gt;
| 191 || [7.0.0+] UpdateNotificationReceiverInfo ([5.0.0-5.1.0] ActivateOpenContextHolder) ||&lt;br /&gt;
|-&lt;br /&gt;
| 200 || BeginUserRegistration ||&lt;br /&gt;
|-&lt;br /&gt;
| 201 || CompleteUserRegistration ||&lt;br /&gt;
|-&lt;br /&gt;
| 202 || CancelUserRegistration ||&lt;br /&gt;
|-&lt;br /&gt;
| 203 || DeleteUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 204 || SetUserPosition ||&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetProfileEditor || Takes an input userID and returns an [[#IProfileEditor]].&lt;br /&gt;
|-&lt;br /&gt;
| 206 || CompleteUserRegistrationForcibly ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 || CreateFloatingRegistrationRequest || Returns an [[#IFloatingRegistrationRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 211 || [8.0.0+] || Takes a total of 0x4-bytes of input and a handle, returns an [[#IOAuthProcedureForUserRegistration]].&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [8.0.0+] || Takes a total of 0x14-bytes of input and a handle, returns an [[#IOAuthProcedureForUserRegistration]].&lt;br /&gt;
|-&lt;br /&gt;
| 230 || AuthenticateServiceAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 250 || GetBaasAccountAdministrator || Returns an [[#IAdministrator]].&lt;br /&gt;
|-&lt;br /&gt;
| 290 || ProxyProcedureForGuestLoginWithNintendoAccount || Returns an [[#IOAuthProcedureForExternalNsa]].&lt;br /&gt;
|-&lt;br /&gt;
| 291 || ProxyProcedureForFloatingRegistrationWithNintendoAccount || Returns an [[#IOAuthProcedureForExternalNsa]].&lt;br /&gt;
|-&lt;br /&gt;
| 299 || SuspendBackgroundDaemon || Returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 997 || DebugInvalidateTokenCacheForUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 998 || DebugSetUserStateClose ||&lt;br /&gt;
|-&lt;br /&gt;
| 999 || DebugSetUserStateOpen ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IManagerForSystemService ==&lt;br /&gt;
This is &amp;quot;nn::account::baas::IManagerForSystemService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CheckAvailability ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || EnsureIdTokenCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || LoadIdTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || SetSystemProgramIdentification ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [7.0.0+] RefreshNotificationTokenAsync || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || [4.0.0+] GetServiceEntryRequirementCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [4.0.0+] InvalidateServiceEntryRequirementCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [4.0.0-6.2.0] InvalidateTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [6.1.0+] GetServiceEntryRequirementCacheForOnlinePlay || Takes a total of 0x8-bytes of input, returns a total of 0x4-bytes of output.&lt;br /&gt;
|-&lt;br /&gt;
| 120 || GetNintendoAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 130 || GetNintendoAccountUserResourceCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 131 || RefreshNintendoAccountUserResourceCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 132 || RefreshNintendoAccountUserResourceCacheAsyncIfSecondsElapsed || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [5.0.0+] GetNetworkServiceLicenseCache || &lt;br /&gt;
|-&lt;br /&gt;
| 141 || [5.0.0+] RefreshNetworkServiceLicenseCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 142 || [5.0.0+] RefreshNetworkServiceLicenseCacheAsyncIfSecondsElapsed || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 150 || CreateAuthorizationRequest || Returns an [[#IAuthorizationRequest]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IFloatingRegistrationRequest ==&lt;br /&gt;
This is &amp;quot;nn::account::baas::IFloatingRegistrationRequest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSessionId ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetLinkedNintendoAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetNickname ||&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetProfileImage ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || LoadIdTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || RegisterUser ([1.0.0-3.0.2] RegisterAsync) || [1.0.0-3.0.2] Used to return an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 101 || RegisterUserWithUid ([1.0.0-3.0.2] RegisterWithUidAsync) || [1.0.0-3.0.2] Used to return an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [4.0.0+] RegisterNetworkServiceAccountAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 103 || [4.0.0+] RegisterNetworkServiceAccountWithUidAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 110 || SetSystemProgramIdentification ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || EnsureIdTokenCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAdministrator ==&lt;br /&gt;
This is &amp;quot;nn::account::baas::IAdministrator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CheckAvailability ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || EnsureIdTokenCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || LoadIdTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || SetSystemProgramIdentification ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [7.0.0+] RefreshNotificationTokenAsync&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [4.0.0+] GetServiceEntryRequirementCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [4.0.0+] InvalidateServiceEntryRequirementCache ||&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0-6.2.0] 112 || InvalidateTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [6.1.0+] GetServiceEntryRequirementCacheForOnlinePlay || Takes a total of 0x8-bytes of input, returns a total of 0x4-bytes of output.&lt;br /&gt;
|-&lt;br /&gt;
| 120 || GetNintendoAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 130 || GetNintendoAccountUserResourceCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 131 || RefreshNintendoAccountUserResourceCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 132 || RefreshNintendoAccountUserResourceCacheAsyncIfSecondsElapsed || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [5.0.0+] GetNetworkServiceLicenseCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 141 || [5.0.0+] RefreshNetworkServiceLicenseCacheAsync ||&lt;br /&gt;
|-&lt;br /&gt;
| 142 || [5.0.0+] RefreshNetworkServiceLicenseCacheAsyncIfSecondsElapsed ||&lt;br /&gt;
|-&lt;br /&gt;
| 150 || CreateAuthorizationRequest || Returns an [[#IAuthorizationRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsRegistered ||&lt;br /&gt;
|-&lt;br /&gt;
| 201 || RegisterAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 202 || UnregisterAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 203 || DeleteRegistrationInfoLocally ||&lt;br /&gt;
|-&lt;br /&gt;
| 220 || SynchronizeProfileAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 221 || UploadProfileAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 222 || SynchronizeProfileAsyncIfSecondsElapsed || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 250 || IsLinkedWithNintendoAccount ||&lt;br /&gt;
|-&lt;br /&gt;
| 251 || CreateProcedureToLinkWithNintendoAccount || Returns an [[#IOAuthProcedureForNintendoAccountLinkage]].&lt;br /&gt;
|-&lt;br /&gt;
| 252 || ResumeProcedureToLinkWithNintendoAccount || Returns an [[#IOAuthProcedureForNintendoAccountLinkage]].&lt;br /&gt;
|-&lt;br /&gt;
| 255 || CreateProcedureToUpdateLinkageStateOfNintendoAccount || Returns an [[#IOAuthProcedure]].&lt;br /&gt;
|-&lt;br /&gt;
| 256 || ResumeProcedureToUpdateLinkageStateOfNintendoAccount || Returns an [[#IOAuthProcedure]].&lt;br /&gt;
|-&lt;br /&gt;
| 260 || CreateProcedureToLinkNnidWithNintendoAccount || Returns an [[#IOAuthProcedure]].&lt;br /&gt;
|-&lt;br /&gt;
| 261 || ResumeProcedureToLinkNnidWithNintendoAccount || Returns an [[#IOAuthProcedure]].&lt;br /&gt;
|-&lt;br /&gt;
| 280 || ProxyProcedureToAcquireApplicationAuthorizationForNintendoAccount || Returns an [[#IOAuthProcedure]].&lt;br /&gt;
|-&lt;br /&gt;
| 290 || [8.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 300 || [6.0.0+] TryRecoverNintendoAccountUserStateAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [6.1.0+] IsServiceEntryRequirementCacheRefreshRequiredForOnlinePlay || Takes a total of 0x8-bytes of input, returns an output u8.&lt;br /&gt;
|-&lt;br /&gt;
| 401 || [6.1.0+] RefreshServiceEntryRequirementCacheForOnlinePlayAsync || Takes a total of 0x8-bytes of input, returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 997 || DebugUnlinkNintendoAccountAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 998 || DebugSetAvailabilityErrorDetail ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAuthorizationRequest ==&lt;br /&gt;
This is &amp;quot;nn::account::nas::IAuthorizationRequest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSessionId ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || InvokeWithoutInteractionAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 19 || IsAuthorized ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetAuthorizationCode ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetIdToken ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetState ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IOAuthProcedure ==&lt;br /&gt;
This is &amp;quot;nn::account::http::IOAuthProcedure&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || PrepareAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetRequest ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ApplyResponse ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ApplyResponseAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Suspend ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IOAuthProcedureForExternalNsa ==&lt;br /&gt;
This is &amp;quot;nn::account::nas::IOAuthProcedureForExternalNsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || PrepareAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetRequest ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ApplyResponse ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ApplyResponseAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Suspend ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetLinkedNintendoAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 102 || GetNickname ||&lt;br /&gt;
|-&lt;br /&gt;
| 103 || GetProfileImage ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IOAuthProcedureForNintendoAccountLinkage ==&lt;br /&gt;
This is &amp;quot;nn::account::nas::IOAuthProcedureForNintendoAccountLinkage&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || PrepareAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetRequest ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ApplyResponse ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ApplyResponseAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Suspend ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetRequestWithTheme ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || IsNetworkServiceAccountReplaced ||&lt;br /&gt;
|-&lt;br /&gt;
| [?-5.1.0] 199 || GetUrlForIntroductionOfExtraMembership ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INotifier ==&lt;br /&gt;
This is &amp;quot;nn::account::detail::INotifier&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSystemEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IProfile ==&lt;br /&gt;
This is &amp;quot;nn::account::profile::IProfile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Get]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetBase]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#GetImageSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#LoadImage]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Get ===&lt;br /&gt;
Takes an output type-0x1A buffer for [[#UserData]], returns an output [[#ProfileBase]].&lt;br /&gt;
&lt;br /&gt;
=== GetBase ===&lt;br /&gt;
No input, returns an output [[#ProfileBase]].&lt;br /&gt;
&lt;br /&gt;
=== GetImageSize ===&lt;br /&gt;
No input, returns an output u32 for the size of the image buffer.&lt;br /&gt;
&lt;br /&gt;
=== LoadImage === &lt;br /&gt;
Takes an output type-0x6 buffer, returns the same output u32 as [[#GetImageSize]].&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the JPEG profile image icon. This is valid for both Miis and character icons.&lt;br /&gt;
&lt;br /&gt;
== IProfileEditor ==&lt;br /&gt;
This is &amp;quot;nn::account::profile::IProfileEditor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Get]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetBase]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#GetImageSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#LoadImage]]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [[#Store]]&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [[#StoreWithImage]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Store ===&lt;br /&gt;
Takes a [[#ProfileBase]] and an input type-0x19 buffer for [[#UserData]].&lt;br /&gt;
&lt;br /&gt;
=== StoreWithImage ===&lt;br /&gt;
Takes a [[#ProfileBase]], an input type-0x19 buffer for [[#UserData]], and an input type-0x5 buffer.&lt;br /&gt;
&lt;br /&gt;
== IAsyncContext ==&lt;br /&gt;
This is &amp;quot;nn::account::detail::IAsyncContext&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || HasDone&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetResult&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISessionObject ==&lt;br /&gt;
This is &amp;quot;nn::account::detail::ISessionObject&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 999 || Dummy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= acc:u0 =&lt;br /&gt;
This is &amp;quot;nn::account::IAccountServiceForApplication&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetUserCount ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetUserExistence ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ListAllUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListOpenUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetLastOpenedUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetProfile || Takes an input userID, returns an [[#IProfile]].&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetProfileDigest ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || IsUserRegistrationRequestPermitted ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || TrySelectUserWithoutInteraction ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [5.0.0-5.1.0] ListOpenContextStoredUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [6.0.0+] DebugActivateOpenContextRetention || No input, returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 100 || InitializeApplicationInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetBaasAccountManagerForApplication || Returns an [[#IManagerForApplication]].&lt;br /&gt;
|-&lt;br /&gt;
| 102 || AuthenticateApplicationAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 103 || [4.0.0+] CheckNetworkServiceAvailabilityAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 110 || StoreSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || ClearSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 120 || CreateGuestLoginRequest || Returns an [[#IGuestLoginRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [5.0.0+] LoadOpenContext ||&lt;br /&gt;
|-&lt;br /&gt;
| 131 || [6.0.0+] ListOpenContextStoredUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 140 || [6.0.0+] InitializeApplicationInfo || &lt;br /&gt;
|-&lt;br /&gt;
| 141 || [6.0.0+] ListQualifiedUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 150 || [6.0.0+] IsUserAccountSwitchLocked || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IGuestLoginRequest ==&lt;br /&gt;
This is &amp;quot;nn::account::baas::IGuestLoginRequest&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSessionId&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetLinkedNintendoAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetNickname&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetProfileImage&lt;br /&gt;
|-&lt;br /&gt;
| 21 || LoadIdTokenCache&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IManagerForApplication ==&lt;br /&gt;
This is &amp;quot;nn::account::baas::IManagerForApplication&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CheckAvailability ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || EnsureIdTokenCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || LoadIdTokenCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 130 || GetNintendoAccountUserResourceCacheForApplication ||&lt;br /&gt;
|-&lt;br /&gt;
| 150 || CreateAuthorizationRequest || Returns an [[#IAuthorizationRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 160 || [5.0.0+] StoreOpenContext ||&lt;br /&gt;
|-&lt;br /&gt;
| 170 || [6.0.0+] LoadNetworkServiceLicenseKindAsync || No input, returns an [[#IAsyncNetworkServiceLicenseKindContext]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAsyncNetworkServiceLicenseKindContext ==&lt;br /&gt;
This is &amp;quot;nn::account::detail::IAsyncNetworkServiceLicenseKindContext&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSystemEvent || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || HasDone || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetResult || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetNetworkServiceLicenseKind || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= acc:u1 =&lt;br /&gt;
This is &amp;quot;nn::account::IAccountServiceForSystemService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetUserCount ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetUserExistence ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ListAllUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListOpenUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetLastOpenedUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetProfile || Returns an [[#IProfile]].&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetProfileDigest ||&lt;br /&gt;
|-&lt;br /&gt;
| 50 || IsUserRegistrationRequestPermitted ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || TrySelectUserWithoutInteraction ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [5.0.0-5.1.0] ListOpenContextStoredUsers ||&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [6.0.0+] DebugActivateOpenContextRetention || No input, returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetUserRegistrationNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetUserStateChangeNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 102 || GetBaasAccountManagerForSystemService || Returns an [[#IManagerForSystemService]].&lt;br /&gt;
|-&lt;br /&gt;
| 103 || GetBaasUserAvailabilityChangeNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 104 || GetProfileUpdateNotifier || Returns an [[#INotifier]].&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [4.0.0+] CheckNetworkServiceAvailabilityAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 110 || StoreSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 111 || ClearSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 112 || LoadSaveDataThumbnail ||&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [5.0.0+] GetSaveDataThumbnailExistence ||&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [6.0.0+] ActivateOpenContextRetention || Takes a total of 0x8-bytes of input, returns an [[#ISessionObject]].&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [6.0.0+] ListQualifiedUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 190 || GetUserLastOpenedApplication ||&lt;br /&gt;
|-&lt;br /&gt;
| 191 || [7.0.0+] UpdateNotificationReceiverInfo ([5.0.0-5.1.0] ActivateOpenContextHolder) ||&lt;br /&gt;
|-&lt;br /&gt;
| 997 || DebugInvalidateTokenCacheForUser ||&lt;br /&gt;
|-&lt;br /&gt;
| 998 || DebugSetUserStateClose ||&lt;br /&gt;
|-&lt;br /&gt;
| 999 || DebugSetUserStateOpen ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IOAuthProcedureForUserRegistration ==&lt;br /&gt;
This is &amp;quot;nn::account::nas::IOAuthProcedureForUserRegistration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [8.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || No input, returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || || Takes a type-0x9 input buffer, returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || || No input, returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 111 || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= acc:aa =&lt;br /&gt;
This is &amp;quot;nn::account::IBaasAccessTokenAccessor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || EnsureCacheAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || LoadCache ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetDeviceAccountId ||&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 50 || RegisterNotificationTokenAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 51 || UnregisterNotificationTokenAsync || Returns an [[#IAsyncContext]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= dauth:0 =&lt;br /&gt;
This is &amp;quot;nn::dauth::detail::IService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ? ([5.0.0-5.1.0] ?)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [6.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAsyncResult ==&lt;br /&gt;
This is &amp;quot;nn::dauth::detail::IAsyncResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= UserData =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x4? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x4? || Icon ID. 0 = Mii, the rest are character icon IDs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x1? || Profile icon background color ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x7 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x10 || Some ID related to the Mii? All zeros when a character icon is used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x60 || Usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x80-byte struct.&lt;br /&gt;
&lt;br /&gt;
= ProfileBase =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x10 || userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8 || POSIX UTC timestamp, for last account edit.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x20 || UTF-8 Username&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x38-byte struct.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=6424</id>
		<title>Settings services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=6424"/>
		<updated>2019-03-26T02:52:56Z</updated>

		<summary type="html">&lt;p&gt;Hthh: doesn&amp;#039;t look like set:cal ever had a command 33&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= set =&lt;br /&gt;
This is &amp;quot;nn::settings::ISettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLanguageCode || No input, returns an output [[#LanguageCode]]. This is the current system language.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAvailableLanguageCodes || Takes a type-0xA buffer containing the [[#LanguageCode]] output array, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] MakeLanguageCode || Takes an input [[#Language]], returns an output [[#LanguageCode]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAvailableLanguageCodeCount || No input, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetRegionCode || No input, returns a [[#RegionCode]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] GetAvailableLanguageCodes2 || Takes a type-0x6 buffer containing the [[#LanguageCode]] output array, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetAvailableLanguageCodeCount2 || No input, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [4.0.0+] GetKeyCodeMap || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [5.0.0+] GetQuestFlag || Identical to &amp;quot;set:sys&amp;quot; [[#set:sys|GetQuestFlag]].&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [6.0.0+] GetKeyCodeMap2 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] Official user-processes now use GetAvailableLanguageCodes2/GetAvailableLanguageCodeCount2 instead of {original commands}.&lt;br /&gt;
&lt;br /&gt;
In official user-processes in the [[#Language]]-&amp;gt;[[#LanguageCode]] conversion function (MakeLanguageCode):&lt;br /&gt;
* During one-time init, GetAvailableLanguageCodes is used to initialize the LanguageCodes array cache, with max_entries=0xF (buffer size in u64s). [4.0.0+] GetAvailableLanguageCodes2 is now used with max_entries 0x40.&lt;br /&gt;
* [4.0.0+] When the input [[#Language]] is larger than the cached total_entries from the above command output, or [[#Language]] is negative, command MakeLanguageCode is used instead of the array.&lt;br /&gt;
&lt;br /&gt;
== GetKeyCodeMap ==&lt;br /&gt;
Takes a type-0x16 output buffer containing KeyCodeMap, official sw uses fixed size 0x1000. This is probably related to HID keyboard.&lt;br /&gt;
&lt;br /&gt;
== Language ==&lt;br /&gt;
&amp;quot;nn::settings::Language&amp;quot; (s32) is basically array indices in the output array from GetAvailableLanguageCodes.&lt;br /&gt;
&lt;br /&gt;
== LanguageCode ==&lt;br /&gt;
This is &amp;quot;nn::settings::LanguageCode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is an u64, which is a NUL-terminated string.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Array-index / [[#Language]] || [[#LanguageCode]] || Icon [[NCA_Content_FS#FS-type3|language]] filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ja || &amp;quot;Japanese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || en-US || &amp;quot;AmericanEnglish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2 || fr || &amp;quot;French&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || de || &amp;quot;German&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || it || &amp;quot;Italian&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || es || &amp;quot;Spanish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || zh-CN || &amp;quot;Chinese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ko || &amp;quot;Korean&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nl || &amp;quot;Dutch&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 9 || pt || &amp;quot;Portuguese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 10 || ru || &amp;quot;Russian&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 11 || zh-TW || &amp;quot;Taiwanese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 12 || en-GB || &amp;quot;BritishEnglish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 13 || fr-CA || &amp;quot;CanadianFrench&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 14 || es-419 || &amp;quot;LatinAmericanSpanish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 15 || zh-Hans || &amp;quot;SimplifiedChinese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 16 || zh-Hant || &amp;quot;TraditionalChinese&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegionCode ==&lt;br /&gt;
A region code is a signed 32-bit value representing a particular region. Currently the available regions defined by the system are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Region&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Japan&lt;br /&gt;
|-&lt;br /&gt;
| 1 || USA&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Europe&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Australia&lt;br /&gt;
|-&lt;br /&gt;
| 4 || China&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Korea&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Taiwan&lt;br /&gt;
|-&lt;br /&gt;
| Any other value || Considered an unknown region&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:fd =&lt;br /&gt;
This is &amp;quot;nn::settings::IFirmwareDebugSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] Only exposed if in [[SPL_services#IsDebugMode|debug mode]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ResetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateSettingsItemKeyIterator || Returns an [[#ISettingsItemKeyIterator]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [4.0.0+] ReadSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [4.0.0+] ResetSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] SetWebInspectorFlag ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetAllowedSslHosts ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [4.0.0+] SetHostFsMountPoint ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISettingsItemKeyIterator ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GoNext&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetKeySize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:cal =&lt;br /&gt;
This is &amp;quot;nn::settings::IFactorySettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBluetoothBdAddress&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetConfigurationId1&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAccelerometerOffset&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAccelerometerScale&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetGyroscopeOffset&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGyroscopeScale&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetWirelessLanMacAddress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetWirelessLanCountryCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetWirelessLanCountryCodes&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSerialNumber&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#GetEciDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [[#GetEticketDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#GetSslKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#GetSslCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [[#GetGameCardKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#GetGameCardCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#GetEciDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetEticketDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetSpeakerParameter&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [4.0.0+] GetLcdVendorId&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [5.0.0+] [[#GetEciDeviceCertificate2]]&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [5.0.0+] [[#GetEciDeviceKey2]]&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [5.0.0+] GetAmiiboKey&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [5.0.0+] GetAmiiboEcqvCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [5.0.0+] GetAmiiboEcdsaCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [5.0.0+] GetAmiiboEcqvBlsKey&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [5.0.0+] GetAmiiboEcqvBlsCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [5.0.0+] GetAmiiboEcqvBlsRootCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [5.0.0+] GetUsbTypeCPowerSourceCircuitVersion&lt;br /&gt;
|-&lt;br /&gt;
| 41 || [6.0.0+] GetBatteryVersion&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Used for accessing data calibrated at the factory.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x180.&lt;br /&gt;
&lt;br /&gt;
Returns the device certificate (ECC signed). This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x240.&lt;br /&gt;
&lt;br /&gt;
Returns the ETicket certificate (RSA signed).&lt;br /&gt;
&lt;br /&gt;
== GetSslKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended SSL key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal SSL key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetSslCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x804.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the plaintext SSL certificate.&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetGameCardKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended GameCard key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal GameCard key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetGameCardCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x404.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the GameCard certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey ==&lt;br /&gt;
Returns the extended device ECC-B233 key (0x50 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal device ECC-B233 key (0x30 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x244.&lt;br /&gt;
&lt;br /&gt;
Returns the extended ETicket RSA-2048 key (0x240 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal ETicket RSA-2048 key (0x220 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate2 ==&lt;br /&gt;
Same as [[#GetEciDeviceCertificate]], but returns a RSA-2048 variant of the device certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey2 ==&lt;br /&gt;
Same as [[#GetEciDeviceKey]], but returns a RSA-2048 variant of the device key.&lt;br /&gt;
&lt;br /&gt;
== setcal Container Structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Size (same size used for decryption if needed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| {above size}&lt;br /&gt;
| Actual data starts here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This container is used for returning data with variable sizes.&lt;br /&gt;
&lt;br /&gt;
= set:sys =&lt;br /&gt;
This is &amp;quot;nn::settings::ISystemSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetFirmwareVersion]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] GetFirmwareVersion2&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [5.0.0+] GetFirmwareVersionDigest&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 20 || SetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 22 || SetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#GetColorSetId]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [[#SetColorSetId]]&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 29 || GetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 32 || SetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 35 || GetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 36 || SetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 37 || GetSettingsItemValueSize&lt;br /&gt;
|-&lt;br /&gt;
| 38 || [[#GetSettingsItemValue]]&lt;br /&gt;
|-&lt;br /&gt;
| 39 || GetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 40 || SetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 42 || SetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 44 || SetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 45 || IsForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 46 || SetForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetQuestFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || SetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 50 || SetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 51 || GetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 53 || GetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 54 || SetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetWirelessCertificationFileSize&lt;br /&gt;
|-&lt;br /&gt;
| 56 || [[Flash_Filesystem#PRODINFOF|GetWirelessCertificationFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 57 || SetRegionCode&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 59 || SetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 60 || IsUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 61 || SetUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [[#GetDebugModeFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || GetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || SetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 66 || SetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 67 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [[#GetSerialNumber]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || GetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 70 || SetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 71 || GetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 72 || SetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 73 || GetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 74 || SetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 75 || GetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 76 || SetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 77 || GetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 78 || SetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 79 || GetProductModel&lt;br /&gt;
|-&lt;br /&gt;
| 80 || GetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 81 || SetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 82 || AcquireTelemetryDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 83 || GetTelemetryDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 84 || GetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 85 || SetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 86 || GetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 87 || SetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 88 || GetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 89 || SetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 90 || GetMiiAuthorId&lt;br /&gt;
|-&lt;br /&gt;
| 91 || SetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 92 || GetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 93 || AcquireFatalDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 94 || GetFatalDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [2.0.0+] GetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [2.0.0+] SetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [2.0.0+] GetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [2.0.0+] SetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [2.0.0+] GetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [2.0.0+] SetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [2.0.0+] GetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] SetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 103 || [3.0.0+] GetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 104 || [3.0.0+] SetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [3.0.0+] SetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 106 || [3.0.0+] GetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 107 || [3.0.0+] GetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 108 || [3.0.0+] SetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 109 || [3.0.0+] GetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [3.0.0+] SetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [3.0.0+] GetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [3.0.0+] SetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [3.0.0+] GetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [3.0.0+] SetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [3.0.0+] GetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [3.0.0+] SetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 117 || [3.0.0+] GetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 118 || [3.0.0+] SetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 119 || [3.0.0+] NeedsToUpdateHeadphoneVolume&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [3.0.0+] GetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 121 || [3.0.0+] SetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 122 || [4.0.0+] [[#GetServiceDiscoveryControlSettings]]&lt;br /&gt;
|-&lt;br /&gt;
| 123 || [4.0.0+] SetServiceDiscoveryControlSettings&lt;br /&gt;
|-&lt;br /&gt;
| 124 || [4.0.0+] GetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 125 || [4.0.0+] SetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 126 || [4.0.0+] GetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 127 || [4.0.0+] SetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 128 || [4.0.0+] GetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 129 || [4.0.0+] SetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 131 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 132 || [4.0.0+] GetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 133 || [4.0.0+] SetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 134 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 135 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 136 || [4.0.0+] GetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 137 || [4.0.0+] SetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 138 || [4.0.0+] GetWebInspectorFlag&lt;br /&gt;
|-&lt;br /&gt;
| 139 || [4.0.0+] [[#GetAllowedSslHosts]]&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [4.0.0+] GetHostFsMountPoint&lt;br /&gt;
|-&lt;br /&gt;
| 141 || [5.0.0+] GetRequiresRunRepairTimeReviser&lt;br /&gt;
|-&lt;br /&gt;
| 142 || [5.0.0+] SetRequiresRunRepairTimeReviser&lt;br /&gt;
|-&lt;br /&gt;
| 143 || [5.0.0+] SetBlePairingSettings&lt;br /&gt;
|-&lt;br /&gt;
| 144 || [5.0.0+] GetBlePairingSettings&lt;br /&gt;
|-&lt;br /&gt;
| 145 || [5.0.0+] GetConsoleSixAxisSensorAngularVelocityTimeBias&lt;br /&gt;
|-&lt;br /&gt;
| 146 || [5.0.0+] SetConsoleSixAxisSensorAngularVelocityTimeBias&lt;br /&gt;
|-&lt;br /&gt;
| 147 || [5.0.0+] GetConsoleSixAxisSensorAngularAcceleration&lt;br /&gt;
|-&lt;br /&gt;
| 148 || [5.0.0+] SetConsoleSixAxisSensorAngularAcceleration&lt;br /&gt;
|-&lt;br /&gt;
| 149 || [5.0.0+] GetRebootlessSystemUpdateVersion&lt;br /&gt;
|-&lt;br /&gt;
| 150 || [5.0.0+] GetDeviceTimeZoneLocationUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 151 || [5.0.0+] SetDeviceTimeZoneLocationUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 152 || [6.0.0+] GetUserSystemClockAutomaticCorrectionUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 153 || [6.0.0+] SetUserSystemClockAutomaticCorrectionUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 154 || [6.0.0+] GetAccountOnlineStorageSettings&lt;br /&gt;
|-&lt;br /&gt;
| 155 || [6.0.0+] SetAccountOnlineStorageSettings&lt;br /&gt;
|-&lt;br /&gt;
| 156 || [6.0.0+] GetPctlReadyFlag&lt;br /&gt;
|-&lt;br /&gt;
| 157 || [6.0.0+] SetPctlReadyFlag&lt;br /&gt;
|-&lt;br /&gt;
| 162 || [6.0.0+] GetPtmBatteryVersion&lt;br /&gt;
|-&lt;br /&gt;
| 163 || [6.0.0+] SetPtmBatteryVersion&lt;br /&gt;
|-&lt;br /&gt;
| 164 || [6.0.0+] GetUsb30HostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 165 || [6.0.0+] SetUsb30HostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 166 || [6.0.0+] GetUsb30DeviceEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 167 || [6.0.0+] SetUsb30DeviceEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 168 || [7.0.0+] GetThemeId&lt;br /&gt;
|-&lt;br /&gt;
| 169 || [7.0.0+] SetThemeId&lt;br /&gt;
|-&lt;br /&gt;
| 170 || [7.0.0+] GetChineseTraditionalInputMethod&lt;br /&gt;
|-&lt;br /&gt;
| 171 || [7.0.0+] SetChineseTraditionalInputMethod&lt;br /&gt;
|-&lt;br /&gt;
| 172 || [7.0.0+] GetPtmCycleCountReliability&lt;br /&gt;
|-&lt;br /&gt;
| 173 || [7.0.0+] SetPtmCycleCountReliability&lt;br /&gt;
|-&lt;br /&gt;
| 175 || [7.0.0+] GetThemeSettings&lt;br /&gt;
|-&lt;br /&gt;
| 176 || [7.0.0+] SetThemeSettings&lt;br /&gt;
|-&lt;br /&gt;
| 177 || [7.0.0+] GetThemeKey&lt;br /&gt;
|-&lt;br /&gt;
| 178 || [7.0.0+] SetThemeKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Official user-processes get a new service session handle each time a set:sys cmd is used, with the session being closed aftewards.&lt;br /&gt;
&lt;br /&gt;
== GetFirmwareVersion ==&lt;br /&gt;
Takes a type-0x1A output buffer. User-processes use hard-coded size 0x100.&lt;br /&gt;
&lt;br /&gt;
If needed, reads the content of the [[System_Version_Title]] &amp;quot;/file&amp;quot; into state. This is only done once.&lt;br /&gt;
&lt;br /&gt;
Then the above 0x100-byte data is copied to the output buffer.&lt;br /&gt;
&lt;br /&gt;
== GetColorSetId ==&lt;br /&gt;
No input, returns an output s32.&lt;br /&gt;
&lt;br /&gt;
This is the current Theme set by System Settings.&lt;br /&gt;
&lt;br /&gt;
* 0: &amp;quot;Basic White&amp;quot;&lt;br /&gt;
* 1: &amp;quot;Basic Black&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== SetColorSetId ==&lt;br /&gt;
Takes an input s32, no output.&lt;br /&gt;
&lt;br /&gt;
== GetSettingsItemValue ==&lt;br /&gt;
Takes two type-0x19 input buffers and a type-0x6 output buffer. Returns an output u64 for the actual size written to the outbuf.&lt;br /&gt;
&lt;br /&gt;
The outbuf_size is compared with the config_size. When config_size is larger than outbuf_size, outbuf_size is used for the memcpy, otherwise config_size is used. Afterwards the size used for the memcpy is written to output(see above).&lt;br /&gt;
&lt;br /&gt;
If loading from main config fails, it will also attempt to load config from various state if the input strings match hard-coded strings.&lt;br /&gt;
&lt;br /&gt;
== GetDebugModeFlag ==&lt;br /&gt;
Returns an output u8.&lt;br /&gt;
&lt;br /&gt;
Loads the 1-byte config for &amp;lt;&amp;quot;settings_debug&amp;quot;, &amp;quot;is_debug_mode_enabled&amp;quot;&amp;gt;. If that fails, value 0x1 is written to output. This uses the same func as ReadSetting internally.&lt;br /&gt;
&lt;br /&gt;
Returned retval is always 0.&lt;br /&gt;
&lt;br /&gt;
== GetSerialNumber ==&lt;br /&gt;
Returns the 0x18-byte SerialNumber string.&lt;br /&gt;
&lt;br /&gt;
== GetServiceDiscoveryControlSettings ==&lt;br /&gt;
Returns 0x01 if [[Safemode|safemode]] needs to be launched.&lt;br /&gt;
&lt;br /&gt;
== GetAllowedSslHosts ==&lt;br /&gt;
Takes a type-0x6 output buffer, returns an output s32. This buffer contains an array of 0x8-byte &amp;quot;nn::settings::system::AllowedSslHost&amp;quot; entries.&lt;br /&gt;
&lt;br /&gt;
== GetQuestFlag ==&lt;br /&gt;
Gets a flag determining whether the console is a kiosk unit (codenamed &amp;quot;Quest&amp;quot;). Used by qlaunch to determine whether to launch Retail Interactive Display Menu.&lt;br /&gt;
&lt;br /&gt;
= System Config =&lt;br /&gt;
There&#039;s a common config title (*818), and a config title for each [[SPL_services|HardwareType]].&lt;br /&gt;
&lt;br /&gt;
[5.0.0+] New config fields were added to the HardwareType-specific config:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;systeminitializer!eks_enabled&amp;quot; 1 for non-Mariko, 0 otherwise.&lt;br /&gt;
* &amp;quot;systeminitializer!bct_eks_offset&amp;quot; Offset within the [[BCT]] where the [[Flash_Filesystem|keyblob]]/&amp;quot;EKS&amp;quot; is stored.&lt;br /&gt;
* &amp;quot;systeminitializer!bct_version_offset&amp;quot; Offset within the [[BCT]] where the keyblob version is stored (bootloader0_info.version).&lt;br /&gt;
* &amp;quot;systeminitializer!boot_image_update_type&amp;quot; 0 for non-Mariko, 1 otherwise.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;bct_eks_offset&amp;quot; and &amp;quot;bct_version_offset&amp;quot; are only present in non-Mariko config, since (?) Mariko &amp;quot;eks_enabled&amp;quot; is 0. This presumably means the [[Flash_Filesystem|keyblob]]/&amp;quot;EKS&amp;quot; is not embedded in [[BCT]] with Mariko?&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Capture_services&amp;diff=6342</id>
		<title>Capture services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Capture_services&amp;diff=6342"/>
		<updated>2019-03-05T11:00:17Z</updated>

		<summary type="html">&lt;p&gt;Hthh: names for IAlbumAccessorService (thanks Splatoon 2)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= caps:a =&lt;br /&gt;
This is &amp;quot;nn::capsrv::sf::IAlbumAccessorService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetAlbumFileCount&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAlbumFileList&lt;br /&gt;
|-&lt;br /&gt;
| 2 || LoadAlbumFile&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteAlbumFile&lt;br /&gt;
|-&lt;br /&gt;
| 4 || StorageCopyAlbumFile&lt;br /&gt;
|-&lt;br /&gt;
| 5 || IsAlbumMounted&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetAlbumUsage&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetAlbumFileSize&lt;br /&gt;
|-&lt;br /&gt;
| 8 || LoadAlbumFileThumbnail&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [2.0.0+] LoadAlbumScreenShotImage&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [2.0.0+] LoadAlbumScreenShotThumbnailImage&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [2.0.0+] GetAlbumEntryFromApplicationAlbumEntry&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [1.0.0-2.3.0] SaveEditedScreenShot&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetLastThumbnail&lt;br /&gt;
|-&lt;br /&gt;
| 401 || GetAutoSavingStorage&lt;br /&gt;
|-&lt;br /&gt;
| 501 || GetRequiredStorageSpaceSizeToCopyAll&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 8001 || ForceAlbumUnmounted&lt;br /&gt;
|-&lt;br /&gt;
| 8002 || ResetAlbumMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 8011 || RefreshAlbumCache&lt;br /&gt;
|-&lt;br /&gt;
| 8012 || GetAlbumCache&lt;br /&gt;
|-&lt;br /&gt;
| 8013 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 8021 || GetAlbumEntryFromApplicationAlbumEntryAruid&lt;br /&gt;
|-&lt;br /&gt;
| 10011 || SetInternalErrorConversionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 60002 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= caps:c =&lt;br /&gt;
This is &amp;quot;nn::capsrv::sf::IAlbumControlService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [7.0.0+] || Takes a total of 0x10-bytes of input, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 2001 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2002 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2011 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2012 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2013 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2014 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2101 || || Takes an input u8 and u64, returns a 0x18-byte struct.&lt;br /&gt;
|-&lt;br /&gt;
| 2102 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2201 || || &lt;br /&gt;
|-&lt;br /&gt;
| 2301 || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= caps:u =&lt;br /&gt;
This is &amp;quot;nn::capsrv::sf::IAlbumApplicationService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [7.0.0+] || Takes a total of 0x10-bytes of input and a PID, no output.&lt;br /&gt;
|-&lt;br /&gt;
| 102 || GetAlbumFileListByAruid || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || DeleteAlbumFileByAruid || &lt;br /&gt;
|-&lt;br /&gt;
| 104 || GetAlbumFileSizeByAruid || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || LoadAlbumScreenShotImageByAruid || &lt;br /&gt;
|-&lt;br /&gt;
| 120 || LoadAlbumScreenShotThumbnailImageByAruid || &lt;br /&gt;
|-&lt;br /&gt;
| 140 || [6.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 141 || [6.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 60002 || OpenAccessorSessionForApplication || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAlbumAccessorApplicationSession ==&lt;br /&gt;
This is &amp;quot;nn::capsrv::sf::IAlbumAccessorApplicationSession&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 2001 || OpenAlbumMovieReadStream&lt;br /&gt;
|-&lt;br /&gt;
| 2002 || CloseAlbumMovieReadStream&lt;br /&gt;
|-&lt;br /&gt;
| 2003 || GetAlbumMovieReadStreamMovieDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 2004 || ReadMovieDataFromAlbumMovieReadStream&lt;br /&gt;
|-&lt;br /&gt;
| 2005 || GetAlbumMovieReadStreamBrokenReason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
capsrv is responsible for validating the MACs for screenshots stored on the SD card, if the setting capsrv!enable_album_screenshot_filedata_verification is non-zero. &lt;br /&gt;
&lt;br /&gt;
Screenshots are validated as follows: The JPEG&#039;s MAC is extracted from the EXIF maker note, and stored. A timestamp string is generated by calling snprintf(&amp;amp;str, 20, &amp;quot;%04d:%02d:%02d %02d:%02d:%02d&amp;quot;, ...); with stored timestamp values. If this doesn&#039;t match the timestamp string stored in EXIF, then an error 0xA34CE is returned. Otherwise, the entire JPEG is loaded into memory, and the stored EXIF maker note is cleared to zeroes. Then, an HMAC-SHA256 is computed over the entire JPEG using a hardcoded secret key. if (memcmp(calculated_hmac, stored_hmac, 0x10) == 0), the screenshot is valid, else 0xA3ACE is returned.&lt;br /&gt;
&lt;br /&gt;
In [[3.0.0]], MAC calculation was changed: now, instead of calculating an HMAC, a plain SHA256 hash is calculated. capsrv basically does screenshot_kek = spl::GenerateAesKek(&amp;lt;hardcoded screenshot_kek_source&amp;gt;); spl::LoadAesKey(screenshot_kek, &amp;lt;hardcoded screenshot_key_source&amp;gt;); MAC = spl::ComputeCmac(hash);&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
[[4.0.0]] includes video playback etc support in Album via mp4. These include a JPEG thumbnail, which is used for video &amp;quot;validation&amp;quot;. The EXIF is also much larger: the MakerNote is 0x498-bytes, with encrypted data starting at offset +0x8. This encryption uses AES-CTR with hardcoded key/ctr. MAC calculation works the same way as the [[3.0.0]]+ JPEG MAC calculation, except with a different movie_kek_source/movie_key_source.&lt;br /&gt;
&lt;br /&gt;
Note: the Album process itself uses libstagefright for video playback.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=6312</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=6312"/>
		<updated>2019-02-26T07:57:07Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxyForLoader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenCodeFileSystem || u64 TitleId + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsArchivedProgram || u64 ProcessId || Returns a bool (1 if the process id&#039;s [[#ContentPath]] ends in &amp;quot;.nca&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] SetCurrentProcess || PID descriptor ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IProgramRegistry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RegisterProgram]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#UnregisterProgram]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] SetCurrentProcess ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterProgram ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== UnregisterProgram ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA_Format|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#OpenFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#SetCurrentProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#OpenFileSystemWithPatch]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 18 || OpenSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataFileSystemAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSaveDataFileSystemBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [5.0.0+] DeleteCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [5.0.0+] GetCacheStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] CreateSaveDataFileSystemByHashSalt (Unofficial name, takes a total of 0xB0-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] OpenReadOnlySaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] [[#ReadSaveDataFileSystemExtraDataBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 58 || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [5.0.0+] OpenCacheStorageList&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [5.0.0+] OpenSaveDataInternalStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [5.0.0+] UpdateSaveDataMacForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [5.0.0+] WriteSaveDataFileSystemExtraData2&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] FindSaveDataWithFilter (Takes a total of 0x50-bytes of input, returns 8-bytes of output, and a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] OpenSaveDataInfoReaderBySaveDataFilter (Unofficial name, takes a total of 0x50-bytes of input, returns an #ISaveDataInfoReader)&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataMetaFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+] OpenSaveDataTransferManager (No input, returns an [[#ISaveDataTransferManager]])&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [5.0.0+] OpenSaveDataTransferManagerVersion2 (No input, returns an [[#ISaveDataTransferManagerWithDivision]])&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [6.0.0+] OpenSaveDataTransferProhibiterForCloudBackUp (Takes an input u64, returns an [[#ISaveDataTransferProhibiter]])&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [6.0.0+] ListApplicationAccessibleSaveDataOwnerId (Takes a total of 0x10-bytes of input, returns 4-bytes of output, and a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 100 || OpenImageDirectoryFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [6.0.0+] OpenCloudBackupWorkStorageFileSystem (Takes 4-bytes of input, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [7.0.0+] OpenCustomStorageFileSystem (Takes 4-bytes of input, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || OpenPatchDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 204 || [7.0.0+] ? (Takes an input u8, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 205 || [7.0.0+] ? (Takes an input u8, returns an [[#IStorage]])&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 510 || [5.0.0+] OpenSystemDataUpdateEventNotifier&lt;br /&gt;
|-&lt;br /&gt;
| 511 || [5.0.0+] NotifySystemDataUpdateEvent&lt;br /&gt;
|-&lt;br /&gt;
| 520 || [6.0.0+] SimulateGameCardDetectionEvent (Takes a total of 0xC-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterAllExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdAndKeyGenerationByPath&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+] SetCurrentPosixTimeWithTimeDifference&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+] GetFreeSpaceSizeForSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+] VerifySaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+] CorruptSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 615 || [5.0.0+] QuerySaveDataInternalStorageTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 616 || [6.0.0+] [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| 617 || [7.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+] SetSdCardAccessibility&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+] IsSdCardAccessible&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0+] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [5.0.0+] OpenAccessFailureResolver&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [5.0.0+] GetAccessFailureDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [5.0.0+] IsAccessFailureDetected&lt;br /&gt;
|-&lt;br /&gt;
| 710 || [5.0.0+] ResolveAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 720 || [5.0.0+] AbandonAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearFileSystemProxyErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 810 || [7.0.0+] RegisterProgramIndexMapInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+] RegisterUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] OpenRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+] GetAndClearMemoryReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1010 || [5.1.0-6.2.0] SetDataStorageRedirectTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1011 || [7.0.0+] (no input, returns two 32-bit values, second is &amp;quot;program_index&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey&lt;br /&gt;
|-&lt;br /&gt;
| 1110 || [6.0.0+] CorruptSaveDataFileSystemBySaveDataSpaceId2&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [6.0.0+] OpenMultiCommitManager (No input, returns an output #IMultiCommitManager)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]].&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || CanMountLogo || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || CanMountContentMeta || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || CanMountContentControl || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || CanMountContentManual || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || CanMountContentData || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || CanMountApplicationPackage || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || CanMountSaveDataStorage || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || CanMountContentStorage || 3 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || CanMountImageAndVideoStorage || 3 || [[#OpenImageDirectoryFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanMountCloudBackupWorkStorage || 3 || OpenCloudBackupWorkStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000084&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountBisCalibrationFile || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000008080) || CanMountBisSafeMode || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000008080 || CanMountBisUser || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000008080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountBisSystem || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanMountBisSystemProperEncryption || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000010) || CanMountBisSystemProperPartition || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0xC000000000200000&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000010)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000040020) || CanMountSdCard || 3 || [[#OpenSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000010&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000040020)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000028) || CanMountGameCard || 3 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000040020&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000020) || CanMountDeviceSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000000028&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000020) || CanMountSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000000020&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010082) || CanMountOthersSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000000020&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000010082)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanMountOthersSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000010082&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition1Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition2Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanOpenBisPartitionUserDataRoot || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part1 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part2 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part3 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part4 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part5 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part6 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000000084&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationBinary || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000084&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationFile || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000080 || CanOpenBisPartitionSafeMode || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || CanOpenBisPartitionUser || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanOpenBisPartitionSystem || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000100) || CanOpenBisPartitionSystemProperEncryption || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000100008) || CanOpenBisPartitionSystemProperPartition || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000200000&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000100)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000400000) || CanOpenSdCardStorage || ||&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x27 || 0x8000000000000100&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanOpenGameCardStorage || 3 || [[#OpenGameCardStorage]],  [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1), [[#GetGameCardErrorInfo]] (bit1), [[#EraseAndWriteParamDirectly]] (bit1), [[#ReadParamDirectly]] (bit1), [[#ForceEraseGameCard]] (bit1)&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x28 || 0x8000000000100008&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000400000) || CanMountSystemDataPrivate || 1 || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x29 || 0xC000000000400000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010000) || CanMountHost || 3 || [[#OpenHostFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanMountRegisteredUpdatePartition || 1 || [[#OpenRegisteredUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x2B || 0x8000000000000000 || CanOpenSaveDataInternalStorage || 3 || [[#OpenSaveDataInternalStorageFileSystem]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || CanInvalidateBisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || CanEraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || CanGetGameCardDeviceCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || CanGetGameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || CanFinalizeGameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || CanGetGameCardAsicInfo || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || CanCreateSaveData || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || CanDeleteSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || CanCreateSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || CanCreateOthersSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || CanDeleteSystemSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || CanOpenSaveDataInfoReader || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || CanOpenSaveDataInfoReaderForSystem || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000040&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000020000) || || OpenSaveDataInfoReaderBySaveDataFilter&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000020000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000400) || CanOpenSaveDataMetaFile || [[#OpenSaveDataMetaFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000400&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000004060) || CanSetCurrentPosixTime || [[#SetCurrentPosixTime]], [[#SetCurrentPosixTimeWithTimeDifference]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000004060&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000080000) || CanReadSaveDataFileSystemExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || CanSetGlobalAccessLogMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000080000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] Invalid) || CanSetSpeedEmulationMode || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || Invalid&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000800000) || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000000800000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000001000000) || CanFillBis || [[#CreatePaddingFile]], [[#DeleteAllPaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000001000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000001000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0xC000000002000000) || CanCorruptSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000001000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000004000000) || CanCorruptSystemSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000000000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0xC000000002000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000008000000) || CanVerifySaveData || [[#VerifySaveDataFileSystem]], [[#VerifySaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0xC000000002000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000004000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000010000000) || CanDebugSaveData || [[#CreateSaveDataFileSystem]], [[#OpenSaveDataFileSystem]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000004000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000008000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000800) || CanFormatSdCard || [[#FormatSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000008000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000010000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000004020) || CanGetRightsId || [[#GetRightsId]], [[#GetRightsIdAndKeyGenerationByPath]], [[#GetRightsIdByPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1B || 0x8000000010000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000800)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000002020) || CanRegisterExternalKey || [[#RegisterExternalKey]], [[#UnregisterAllExternalKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1C || 0x8000000000000800&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000004020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000028) || CanSetEncryptionSeed || [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1D || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000020000000) || SaveDataExtraData_Write0 || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraData2]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1E || 0x8000000000004020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000002020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000040000000) || CanWriteSaveDataFileSystemExtraDataFlags || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraData2]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1F || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || SaveDataExtraData_Write1 || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraData2]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x20 || 0x8000000000000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000020000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || CanWriteSaveDataFileSystemExtraDataAll || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraData2]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x21 || 0x8000000000002020&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanExtendSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x22 || 0x8000000000000028&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000002) || CanExtendSystemSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x23 || 0x8000000020000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanRegisterUpdatePartition || [[#RegisterUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x24 || 0x8000000040000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanOpenSaveDataTransferManager || [[#OpenSaveDataTransferManager]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x25 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanOpenSaveDataTransferManagerVersion2 || [[#OpenSaveDataTransferManagerVersion2]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x26 || 0x8000000200002000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080000110) || CanOpenSaveDataTransferProhibiterForCloudBackUp || [[#OpenSaveDataTransferProhibiterForCloudBackUp]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x27 || 0x8000000200002000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanListApplicationAccessibleSaveDataOwnerId || ListApplicationAccessibleSaveDataOwnerId&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x28 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080010000) || CanControlMmcPatrol || [[#SuspendMmcPatrol]], [[#ResumeMmcPatrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x29 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOverrideSaveDataTransferTokenSignVerificationKey || [[#OverrideSaveDataTransferTokenSignVerificationKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0x8000000080200000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSdCardDetectionEventNotifier || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2B || 0x8000000080000110&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenGameCardDetectionEventNotifier || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2C || 0x8000000000100008&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSystemDataUpdateEventNotifier || [[#OpenSystemDataUpdateEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2D || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanNotifySystemDataUpdateEvent || [[#NotifySystemDataUpdateEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2E || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanOpenAccessFailureDetectionEventNotifier || [[#OpenAccessFailureResolver]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2F || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanGetAccessFailureDetectionEvent || [[#GetAccessFailureDetectionEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.1.0+] 0x30 || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080080000) || CanIsAccessFailureDetected || [[#IsAccessFailureDetected]] &lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x31 || 0x8000000100000000 || CanResolveAccessFailure || [[#ResolveAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x32 || 0x8000000100000000 || CanAbandonAccessFailure || [[#AbandonAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x33 || 0x8000000040000000 || CanQuerySaveDataInternalStorageTotalSize || [[#QuerySaveDataInternalStorageTotalSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x34 || 0x8000000200000020 || CanGetSaveDataCommitId || [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x35 || 0x8000000000200000 || CanSetSdCardAccessibility || [[#SetSdCardAccessibility]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x36 || 0x4000000000000000 || || SimulateGameCardDetectionEvent, SetGameCardSimulationEvent, ClearGameCardSimulationEvent&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x37 || 0x8000000000080000 || CanSetDataStorageRedirectTarget || SetDataStorageRedirectTarget&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x38 || 0x8000000000000000 || || [[#CreateSaveDataFileSystem]], CreateSaveDataFileSystemByHashSalt&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer (ContentPath) and a [[#FileSystemType]] as parameters. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
[2.0.0+] This function was removed.&lt;br /&gt;
&lt;br /&gt;
== SetCurrentProcess ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithPatch ==&lt;br /&gt;
Takes an input [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Web-applet loads the [[#FileSystemType]] (which must be &#039;&#039;&#039;ContentManual&#039;&#039;&#039;) from u32_table[inparam].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as &amp;quot;MountContent&amp;quot;, but official nn_sf_sync symbols use &amp;quot;OpenXX&amp;quot; names.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithId ==&lt;br /&gt;
Takes a type-0x19 input buffer, an [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
The [[#IFileSystem]] must be &#039;&#039;&#039;ContentMeta&#039;&#039;&#039; if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from [[NS_Services#GetApplicationContentPath|GetApplicationContentPath]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and [[#FileSystemType]] &#039;&#039;&#039;ApplicationPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After the [[#FileSystemType]] specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When [[#FileSystemType]] is &#039;&#039;&#039;ContentMeta&#039;&#039;&#039;, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== OpenBisFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 [[Flash_Filesystem|Bis partitionID]]. Official user-process code sets instr[0] = 0 normally. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisStorage]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisStorage ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisStorage IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveDataFileSystem ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystem ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardStorage ==&lt;br /&gt;
Takes two input u32s (gamecard handle, partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardFileSystem ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a [[Gamecard_Partition|gamecard partition]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystem ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process (specifically only one [[#IFileSystem]] session) can mount a given savedata at any given time (this includes SystemSaveData).&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraDataBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an input u64 saveID, and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraData ==&lt;br /&gt;
Takes an input u64 saveID and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReader ==&lt;br /&gt;
No input, returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReaderBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenContentStorageFileSystem ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[NCM_services#ReadContentIdFile]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveDataFileSystem ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataCommitId ==&lt;br /&gt;
Takes an input u8 and u64, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes in the 0x10 byte SD card encryption seed, and loads it into FS-module state.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module reads the 0x10 bytes from SdCard:/Nintendo/Contents/private, and compares them to the first 0x10 bytes of the ns_appman:/private (in [[Flash_Filesystem#System_Savegames|system savedata]] 0x8000000000000043). If they match, NS calls this command using bytes 0x10-0x20 from ns_appman:/private. The rest of this file (0x1F0 bytes total) is (usually/always?) all-zero (however in some cases the byte at offset 0x20 is value 0x1).&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IStorage&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#OpenFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+] [[#CleanDirectoryRecursively]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0+] [[#GetFileTimeStampRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] QueryEntry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
== OpenFile ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path, and an u32 &#039;&#039;&#039;mode&#039;&#039;&#039;. &#039;&#039;&#039;mode&#039;&#039;&#039; controls how the file is opened, based on which bits are set:&lt;br /&gt;
&lt;br /&gt;
* When bit 0 is set, the file is Readable: you can use the Read operation.&lt;br /&gt;
* When bit 1 is set, the file is Writable: you can use the Write operation.&lt;br /&gt;
* When bit 2 is set, the file is Appendable: unless this bit is set, you will not be able to write beyond the end of a file (such writes will result in an error 0x307202)&lt;br /&gt;
&lt;br /&gt;
== OpenDirectory ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
== CleanDirectoryRecursively ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and clears the contents of the directory specified in the path.&lt;br /&gt;
&lt;br /&gt;
== GetFileTimeStampRaw ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path and returns a 0x20-byte struct. This contains 3 u64s and an u8.&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDirectory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x301 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x301 || 0x3 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8 || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
&lt;br /&gt;
An s8 value indicating a directory entry type. The current values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Directory&lt;br /&gt;
|-&lt;br /&gt;
| 1 || File&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataInfoReader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ReadSaveDataInfo]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataInfo ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64 for total output entries. This buffer contains an array of [[#SaveDataInfo]].&lt;br /&gt;
&lt;br /&gt;
This is used to get [[#SaveDataInfo]] for all savedata on the system (or all savedata for the current [[#SaveDataSpaceId]]). When used multiple times, it will resume reading where it left off, until no more entries are available (in that case the out u64 is value 0).&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDeviceOperator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+] SuspendMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+] ResumeMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardDeviceIdForProdCard&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+] EraseAndWriteParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] ReadParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+] ForceEraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] GetGameCardErrorReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 218 || [3.0.0+] GetGameCardDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [5.0.0+] SuspendSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 401 || [5.0.0+] ResumeSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 402 || [6.0.0+] GetSdmmcConnectionStatus (Takes a total of 4-bytes of input, returns a total of 8-bytes of output)&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [6.0.0+] SetSimulationEvent (Takes a total of 0x14-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [6.0.0+] ClearSimulationEvent (Takes a total of 4-bytes of input, no output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IEventNotifier&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetEventHandle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManager =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetToken]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [[#OpenSaveDataImporter]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== SetToken ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64, returns an [[#ISaveDataExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x10-byte userID, and a type-0x5 input buffer. Returns an output u64 and an [[#ISaveDataImporter]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataExporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Pull]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#PullInitialData]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#SaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataExporter constructor. This is used automatically after [[#OpenSaveDataExporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
Takes a type-0x6 output buffer, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== PullInitialData ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataImporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Push]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#Finalize]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#SaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataImporter constructor. This is used automatically after [[#OpenSaveDataImporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Push ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== Finalize ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManagerWithDivision =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetKeySeedPackage]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataFullExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [[#OpenSaveDataDiffExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] [[#OpenSaveDataExporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [[#OpenSaveDataFullImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [[#OpenSaveDataDiffImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] [[#OpenSaveDataDuplicateDiffImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] [[#OpenSaveDataImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] [[#OpenSaveDataImporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [6.0.0+] [[#CancelSuspendingImport]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer containing the &#039;&#039;&#039;Challenge&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== SetKeySeedPackage ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer containing the &#039;&#039;&#039;KeySeedPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFullExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataDiffExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFullImporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], a 0x10-byte userID, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataDiffImporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]], returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataDuplicateDiffImporter ==&lt;br /&gt;
Takes an input u8 and an u64, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8, an u8(bool), a 0x10-byte struct, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== CancelSuspendingImport ==&lt;br /&gt;
Takes an input u64 and a 0x10-byte struct, no output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionExporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDivisionCount (Takes an input u32, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIterator]])&lt;br /&gt;
|-&lt;br /&gt;
| 48 || OpenSaveDataChunkExporter (Takes an input u32, returns an [[#ISaveDataChunkExporter]])&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0+] FinalizeFullExport (No input, returns two 0x10-byte output structs)&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [6.0.0+] FinalizeDiffExport (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] CancelExport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] SuspendExport (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [6.0.0+] GetKeySeed (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [6.0.0+] GetInitialDataMac (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 72 || [6.0.0+] FinalizeExport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] GetImportInitialDataAad (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [6.0.0+] SetExportInitialDataAad (Takes an input 0x20-byte struct, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] GetReportInfo (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionImporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [6.0.0+] GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIterator]])&lt;br /&gt;
|-&lt;br /&gt;
| 32 || InitializeImport (No input, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
| 33 || FinalizeImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] CancelImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] GetImportContext (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [6.0.0+] SuspendImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 48 || OpenSaveDataChunkImporter (Takes an input u32, returns an [[#ISaveDataChunkImporter]])&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0+] GetImportInitialDataAad (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] GetReportInfo (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkIterator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Next (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsEnd (No input, returns an output u8)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetId (No input, returns an output u32)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkExporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Pull (Takes an input u64 and a type-0x6 output buffer, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+] GetRestRawDataSize (No input, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkImporter =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Push (Takes an input u64 and a type-0x5 input buffer, no output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferProhibiter =&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to handle any commands (?).&lt;br /&gt;
&lt;br /&gt;
= IMultiCommitManager =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ? (Takes an input [[#IFilesystem]], no output)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ? (No input/output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
= FileSystemType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Invalid&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Invalid&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Logo&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ContentControl&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ContentManual&lt;br /&gt;
|-&lt;br /&gt;
| 5 || ContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContentData&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ApplicationPackage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= SaveDataSpaceId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [3.0.0+] ProperSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Determines the storage where the savedata is stored.&lt;br /&gt;
&lt;br /&gt;
= SaveDataType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SaveData&lt;br /&gt;
|-&lt;br /&gt;
| 2 || BcatDeliveryCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeviceSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] TemporaryStorage&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] CacheStorage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ImageDirectoryId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CloudBackupWorkStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] @RegUpdate || Registered update partition&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Save Struct =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x22&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x4&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field.&lt;br /&gt;
&lt;br /&gt;
= SaveCreate Struct =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
= DeviceSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
= BcatSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
= SaveDataInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Unknown saveID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| saveID, 0 for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| Application titleID, for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| Raw saveimage size&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x25&lt;br /&gt;
| Unknown. Usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x60-byte struct.&lt;br /&gt;
&lt;br /&gt;
= SaveDataFileSystemExtraData =&lt;br /&gt;
This is a 0x200-byte struct. Appears to match [[Savegames#Extra_data]].&lt;br /&gt;
&lt;br /&gt;
= InitialDataVersion2 =&lt;br /&gt;
This is a 0x8210-byte struct used by [[#ISaveDataTransferManagerWithDivision]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=HIPC&amp;diff=3541</id>
		<title>HIPC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=HIPC&amp;diff=3541"/>
		<updated>2018-01-24T02:46:45Z</updated>

		<summary type="html">&lt;p&gt;Hthh: /* Domain message */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IPC Command Structure ==&lt;br /&gt;
This is an array of u32&#039;s, usually located in [[Thread Local Storage]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-0 || Type. 4=Request, 5=Control&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 19-16 || Number of buf X descriptors (each: 2 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 23-20 || Number of buf A descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 27-24 || Number of buf B descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 9-0 || Size of raw data section in u32s.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 13-10 || Flags for buf C descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 30-20 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31 || Enable handle descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Handle descriptor|Handle descriptor]], if enabled.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor X &amp;quot;Pointer&amp;quot;|Buf X descriptors]], each one 2 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf A descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf B descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Type W descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Raw_data_section|Raw data section]] (including padding before and after aligned data section).&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor C &amp;quot;ReceiveList&amp;quot;|Buf C descriptors]], each one 2 words.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
First two header u32&#039;s and handle descriptor (if enabled) are copied as-is from one process to the other.&lt;br /&gt;
&lt;br /&gt;
=== Handle descriptor ===&lt;br /&gt;
There can only be one of this descriptor type. It is enabled by bit31 of the second word.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Send current PID.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4-1 || Number of handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-5 || Number of handles to move&lt;br /&gt;
|-&lt;br /&gt;
| ... || || 8-byte PID if enabled&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to move&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sysmodules load the last u64 of rawdata when handling the PID. This is not written by kernel. For sysmodule handling:&lt;br /&gt;
* In some cases: these commands require a placeholder u64 value passed in the input parameters, as mentioned above. In these cases the OverwriteClientProcessId method is called to replace the value before it is used.&lt;br /&gt;
* In other cases: The rawdata_u64 is compared with the PID from the descriptor. On mismatch and when rawdata_u64!=0, error 0x60A is returned. The PID value passed to the cmdhandler vtable funcptr is the rawdata_u64.&lt;br /&gt;
&lt;br /&gt;
Handle 0 is allowed, and just means no handle was sent.&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor X &amp;quot;Pointer&amp;quot; ===&lt;br /&gt;
This one is packed even worse than A, they inserted the bit38-36 of the address &#039;&#039;on top&#039;&#039; of the counter field.&lt;br /&gt;
&lt;br /&gt;
Officially, the counter is known as &amp;quot;receive index&amp;quot;. This one writes to the buffer described in the ReceiveList.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 5-0 || Bits 5-0 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-6 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 11-9 || Bits 11-9 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-12 || Bit 35-32 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Size&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot; ===&lt;br /&gt;
This packing is so unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1-0 || Flags. Always set to 0, 1 or 3.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 4-2 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 27-24 || Bit 35-32 of size.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 31-28 || Bit 35-32 of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A reply must not use A/B/W, svcReplyAndReceive will return 0xE801.&lt;br /&gt;
&lt;br /&gt;
[[SVC|MemoryAttribute]] IsBorrowed and IsUncached are never allowed for the source address.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Send&amp;quot; means buffer is sent from source process into service process.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Receive&amp;quot; means that data is copied from service process into user process.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Exchange&amp;quot; means both &amp;quot;Send&amp;quot; and &amp;quot;Receive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Flags ====&lt;br /&gt;
Determines what [[SVC|MemoryState]] to use with the mapped memory in the sysmodule.&lt;br /&gt;
&lt;br /&gt;
Used to enforce whether or not device mapping is allowed for src and dst buffers respectively.&lt;br /&gt;
 &lt;br /&gt;
* Flag0: Device mapping *not* allowed for src or dst.&lt;br /&gt;
* Flag1: Device mapping allowed for src and dst.&lt;br /&gt;
* Flag3: Device mapping allowed for src but not for dst.&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor C &amp;quot;ReceiveList&amp;quot; ===&lt;br /&gt;
There&#039;s a 4-bit flag in the main header controlling the behavior of C descriptors.&lt;br /&gt;
&lt;br /&gt;
If it has value 0, the C descriptor functionality is disabled.&lt;br /&gt;
&lt;br /&gt;
If it has value 1, there is an &amp;quot;inlined&amp;quot; C buffer after the raw data. Received data is copied to ROUND_UP(cmdbuf+raw_size+index, 16)&lt;br /&gt;
&lt;br /&gt;
If it has value 2, there is a single C descriptor.&lt;br /&gt;
&lt;br /&gt;
Otherwise it has (flag-2) C descriptors. In this case, index picks which C descriptor to copy received data to [instead of picking the offset into the buffer].&lt;br /&gt;
&lt;br /&gt;
Data sent with this method must have MemoryState 0x4000000 mask set.&lt;br /&gt;
&lt;br /&gt;
After reply, X descriptors are written to the sender containing the address, size and index that were copied to.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15-0 || Rest of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31-16 || Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IPC buffers ===&lt;br /&gt;
Buffer descriptor A/B/... map memory into the sysmodule process. For the mapped memory in the sysmodule the permissions are: desc-A = R--, desc-B = RW-. The buffer is automatically unmapped while the kernel handles the cmdreply, the sysmodule doesn&#039;t need to specify anything in the cmdreply to trigger this.&lt;br /&gt;
&lt;br /&gt;
This memory is mapped in the sysmodule to the same vaddr from the original user-process cmd-request, except with with bits &amp;gt;=(~28(?)) changed to a different ASLR&#039;d region.&lt;br /&gt;
&lt;br /&gt;
No user-process-&amp;gt;sysmodule memcpy is done for outbufs, only sysmodule-&amp;gt;user-process.&lt;br /&gt;
&lt;br /&gt;
== Raw data section ==&lt;br /&gt;
&lt;br /&gt;
[[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type A lengths is padded to fill up a whole word.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding to align to 16 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| ... || If sent to an object domain, a [[#Domain_message|domain message]], otherwise a [[#Data payload|data payload]]&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding&lt;br /&gt;
|-&lt;br /&gt;
| ... || Buffer type 0xA lengths (u16 array)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total amount of padding within the raw data section is always 0x10 bytes. This means that if no padding is required before the message, there will be 0x10 bytes of padding after the message (before the buffer type 0xA lengths).&lt;br /&gt;
&lt;br /&gt;
=== Domain message ===&lt;br /&gt;
This header is used to wrap up requests sent to domains instead of sessions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 7-0 || Command. 1=send message, 2=close virtual handle&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-15 || Input object count&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).&lt;br /&gt;
|-&lt;br /&gt;
  | 2&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;| Padding to align to u64&lt;br /&gt;
|-&lt;br /&gt;
  | 3&lt;br /&gt;
|-&lt;br /&gt;
| 4... || || [[#Data payload|Data payload]]&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Input object IDs (u32s, not aligned)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data payload ===&lt;br /&gt;
&lt;br /&gt;
This is an array of u32&#039;s, but individual parameters are generally stored as u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Magic (&amp;quot;SFCI&amp;quot; for requests, &amp;quot;SFCO&amp;quot; for responses) as u64.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses.&lt;br /&gt;
|-&lt;br /&gt;
| 4... || Input parameters or return values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Official marshalling code ==&lt;br /&gt;
The official marshalling function takes an array of (buf_ptr, size) pairs and a type-field for each such pair.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 seems to indicate null-terminated strings, but that flag is ignored by the marshalling code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type Mask || Description || Direction&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 1 || Creates a A descriptor with flags=0. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 1 || Creates a A descriptor with flags=1. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 1 || Creates a A descriptor with flags=3. || In&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 2 || Creates a B descriptor with flags=0. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 2 || Creates a B descriptor with flags=1. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 2 || Creates a B descriptor with flags=3. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 1 || Creates an X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 2 || Creates a C descriptor, and writes the u16 size to an offset into raw data. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 + 8 + 2 || Creates a C descriptor || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 1 || Creates both an A and X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 2 || Creates both an B and C descriptor || Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
C and X (Pointer and ReceiveList) descriptors are backed by the &amp;quot;pointer buffer&amp;quot;, a buffer in the service process. Its size is a u16, which is retrieved using the &amp;quot;QueryPointerBufferSize&amp;quot; control message. If the client code determines all buffers with flag 8 do not fit in the pointer buffer, it returns error 0x11A0B.&lt;br /&gt;
&lt;br /&gt;
For buffers with flag 0x20 it creates two descriptors (A+X or B+C), but one descriptor is NULL (zero size and pointer), while the other holds the expected values. X/C descriptors are used as the non-NULL descriptor where possible, but if they don&#039;t fit in the pointer buffer, A/B descriptors are used instead. The code defers processing of type 0x20 buffers with sizes that fit in a u16 (and may therefore fit in the pointer buffer). This ensures all type 8 buffers get pointer-buffer space before any type 0x20.&lt;br /&gt;
&lt;br /&gt;
(The order in which the deferred type 0x20 buffers are processed is determined by a convoluted loop.)&lt;br /&gt;
&lt;br /&gt;
== Official IPC Cmd Structure ==&lt;br /&gt;
Official struct that is stored for each IPC command. It contains precalculated offsets for different portions of the command structure.&lt;br /&gt;
&lt;br /&gt;
All offsets are given is in number of u32 words.&lt;br /&gt;
&lt;br /&gt;
 struct IpcCmdStruct {&lt;br /&gt;
   u8  unk0;&lt;br /&gt;
   u8  has_handle_descriptor;&lt;br /&gt;
   u8  pad0[2];&lt;br /&gt;
   u32 cmd0;&lt;br /&gt;
   u32 cmd1;&lt;br /&gt;
   u32 offset_handle_descriptor;&lt;br /&gt;
   u32 pad1;&lt;br /&gt;
   u32 offset_handles;          &lt;br /&gt;
   u32 pad2;&lt;br /&gt;
   u32 offset_x_descriptors;&lt;br /&gt;
   u32 offset_a_descriptors;&lt;br /&gt;
   u32 offset_b_descriptors;&lt;br /&gt;
   u32 offset_w_descriptors; /* this is a guess */&lt;br /&gt;
   u32 offset_raw_data;&lt;br /&gt;
   u32 offset_c_descriptors;&lt;br /&gt;
   u32 unk2;&lt;br /&gt;
   u32 unk3;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
When type == 5 you are talking to the IPC manager. These are processed by the sysmodule.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ConvertSessionToDomain || None || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || ConvertDomainToSession || u32 domain || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || DuplicateSession || None || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || QueryPointerBufferSize || None || u32 as u16-size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DuplicateSessionEx || u32 unknown || &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3505</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3505"/>
		<updated>2018-01-22T08:02:14Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || MountCode || u64 TitleId + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsCodeMounted || u64 ProcessId || Returns a bool (1 if code is mounted).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] Initialize || PID descriptor ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#SetFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ClearFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] Initialize ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetFsPermissions ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== ClearFsPermissions ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying a RSA signature fails. This RSA signature seems to be the signature in the [[NPDM]] ACID. It then skips verifying what seems to be the second signature in the [[NCA_Format|NCA header]]. Note that if verifying the NPDM(?) signature is successful, and verifying that second signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#MountContent7]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystemImpl&lt;br /&gt;
|-&lt;br /&gt;
| 18 || MountSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] MountSaveDataReadOnly&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] ReadSaveDataFileSystemExtraDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 58 || ReadSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || OpenSaveDataInfoReader&lt;br /&gt;
|-&lt;br /&gt;
| 61 || OpenSaveDataIterator&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataThumbnailFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+] OpenSaveDataTransferManager&lt;br /&gt;
|-&lt;br /&gt;
| 100 || MountImageDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || Returns an [[#IStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdByPath2 (returns extra byte)&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+] GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+] SetSdCardAccessibility&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+] IsSdCardAccessible&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0+] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearFileSystemProxyErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+] RegisterUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] MountRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]],&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || MountContentType2 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || MountContentType5 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || MountContentType3 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || MountContentType4 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || MountContentType6 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || MountContentType7 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || ContentStorageAccess || 3 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || ImageDirectoryAccess || 3 || [[#MountImageDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000084 || MountBisType28 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000080 || MountBisType29 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000008080 || MountBisType30 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000008080 || MountBisType31 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000080 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0xC000000000200000 || SdCardAccess || 3 || [[#MountSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000010 || GameCardUser || 3 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000040020 || SaveDataAccess0 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000028 || SystemSaveDataAccess0 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000000020 || SaveDataAccess1 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000000020 || SystemSaveDataAccess1 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000010082 || BisPartition0 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000010080 || BisPartition10 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010080 || BisPartition20 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000010080 || BisPartition21 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000010080 || BisPartition22 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || BisPartition23 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || BisPartition24 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || BisPartition25 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000000080 || BisPartition26 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000000084 || BisPartition27 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000000084 || BisPartition28 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000000080 || BisPartition29 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000080 || BisPartition30 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000080 || BisPartition31 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || BisPartition32 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0xC000000000200000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000100 || GameCard_System || 3 || [[#OpenGameCardPartition]],  [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000100008 || MountContent_System || 1 || [[#MountContent]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000400000 || HostAccess || 3 || [[#OpenHostFileSystemImpl]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || BisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || EraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || GameCardCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || GameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || GameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || GameCardAsic || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || SaveDataCreate || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || SaveDataDelete0 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || SystemSaveDataCreate0 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || SystemSaveDataCreate1 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || SaveDataDelete1 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || SaveDataIterators0 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || SaveDataIterators1 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000020000 || SaveThumbnails || [[#OpenSaveDataThumbnailFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000400 || PosixTime || [[#SetCurrentPosixTime]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000004060 || SaveDataExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000080000 || GlobalMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || SpeedEmulation || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Invalid || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0xC000000000800000 || PaddingFiles || [[#CreatePaddingFile]], [[#DeletePaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000001000000 || SaveData_Debug || [[#CorruptSaveDataForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000002000000 || SaveData_SystemManagement || [[#CreateSaveData]], [[#MountSaveData]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000004000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000008000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0x8000000010000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000000000800 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000000004020 || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== MountContent7 ==&lt;br /&gt;
Takes an input u32 (same as [[#MountContent]]) and an u64 title-id. Web-applet loads the u32 from u32_table[inparam]. The in32 must be 4.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and the below &amp;quot;MountContent&amp;quot; as &amp;quot;MountContent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== MountContent ==&lt;br /&gt;
Takes a type-0x19 input buffer, an in32, and an input title-id.&lt;br /&gt;
&lt;br /&gt;
The in32 must be 5 if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The in32 must be 2..7.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from nsam [[NS_Services#GetContentNcaPath|GetContentNcaPath]].&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and in32=7.&lt;br /&gt;
&lt;br /&gt;
After the in32-specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When in32=5, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== MountBis ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 Bis partitionID(see below). Official user-process code sets instr[0] = 0 normally.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisPartition]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisPartition ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisPartition IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveData ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSystemSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardPartition ==&lt;br /&gt;
&lt;br /&gt;
Takes an input u32 (partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountGameCardPartition ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a gamecard [[Gamecard_Partition|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process can mount a given savedata at any given time (this includes systemsavedata).&lt;br /&gt;
&lt;br /&gt;
== MountSystemSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== MountContentStorage ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[Content_Manager_services#ReadEntryRaw]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveData ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes 0x10-bytes of input.&lt;br /&gt;
&lt;br /&gt;
Appears to be used to load the seed into FS-module state, since FS-module itself doesn&#039;t seem to have file-reading code to handle this itself.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module uses this with data read from a file.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || OpenFile&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || CleanDirectoryRecursively [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetFileTimeStampRaw [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] QueryEntry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
==OpenDirectory==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer and an input u64. Unknown what the u64 is for, doesn&#039;t(?) seem to affect output. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x300 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x300 || 0x4 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8? || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
s8 type: 0 = directory, 1 = file.&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+] SuspendMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+] ResumeMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+] EraseAndWriteParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] ReadParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+] ForceEraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] GetGameCardErrorReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 218 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BindEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=BisPartitionID=&lt;br /&gt;
* 0: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 0.&lt;br /&gt;
* 10: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 1.&lt;br /&gt;
* Rest: see [[Flash_Filesystem|here]].&lt;br /&gt;
&lt;br /&gt;
=Save Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| ContentStorageId? 0 for SystemSaveData. 1 for SaveData. 2 for DeviceSaveData(with official user-processes all other fields are 0 for DeviceSaveData).&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=SaveCreate Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=DeviceSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
=BcatSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveData]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Title_list&amp;diff=3342</id>
		<title>Title list</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Title_list&amp;diff=3342"/>
		<updated>2018-01-01T08:42:05Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Modules ==&lt;br /&gt;
Note: Unlike 3DS, Switch doesn&#039;t have a dedicated HTTP-sysmodule. Instead, processes using HTTP(S) just use libcurl + socket/ssl services.&lt;br /&gt;
&lt;br /&gt;
As of [[2.0.0]], the only sysmodule with a RomFS is [[HID_services|hid-sysmodule]].&lt;br /&gt;
&lt;br /&gt;
Decimal versions use the format:&lt;br /&gt;
* Bit31-Bit26: Major&lt;br /&gt;
* Bit25-Bit20: Middle&lt;br /&gt;
* Bit19-Bit16: Minor&lt;br /&gt;
* Bit15-Bit0: Build?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000000 || [bundled with kernel] || FS&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000001 || [bundled with kernel] || Loader&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000002 || [bundled with kernel] || NCM&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000003 || [bundled with kernel] || ProcessMana&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000004 || [bundled with kernel] || sm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000005 || [bundled with kernel] || [[boot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000006 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || usb&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000007 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || tma&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000008 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || [[Boot2|boot2]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000009 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || settings&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || bus&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || bluetooth&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000C || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || bcat&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000D || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000E || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || friends&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000F || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || nifm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000010 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ptm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000011 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000012 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.3.0|v131092]] (0.0.2.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || bsdsockets&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000013 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || hid&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000014 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || audio&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000015 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || LogManager.Prod&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000016 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[2.2.0|v196608]] (0.0.3.0)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || wlan&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000017 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000018 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ldn&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000019 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[2.3.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (4.0.1.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || nvservices&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || pcv&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ppc&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001C || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || nvnflinger&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001D || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || pcie.withoutHb&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001E || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || account&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001F || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ns&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000020 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.2.0|v131072]] (0.0.2.0)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || nfc&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000021 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || psc&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000022 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || capsrv&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000023 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || am&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000024 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ssl&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000025 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || nim&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000028 || [bundled with kernel] || spl&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000029 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || lbl&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || btm&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || erpt&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002D || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || vi&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002E || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || pctl&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002F || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || npns&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000030 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || [[Eupld_services|eupld]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000031 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || glue&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000032 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || eclct&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000033 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || es&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000034 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || fatal&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000035 || [[4.0.0|v268435656]] (4.0.0.200) || grc, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000036 || [[2.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[2.1.0|v65596]] (0.0.1.60)&amp;lt;br/&amp;gt; [[2.3.0|v131092]] (0.0.2.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || [[creport]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000037 || [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || ro&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000038 || || This title is referenced by [[3.0.0]] boot2.prodBoot, but does not exist on retail systems.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000039 || [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || sdb&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003A || [[4.0.0|v268435656]] (4.0.0.200) || migration, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003C || [[4.0.0|v268435656]] (4.0.0.200) || jpegdec, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003D || [[4.0.0|v268435656]] (4.0.0.200) || [[safemode]], added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Debug Applets ==&lt;br /&gt;
Note: No 01000000000020XX titles exist on retail systems.&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002000 ||  || &amp;quot;BoardTest&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002001 ||  || &amp;quot;BoardWireless&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002002 ||  || C1LcdAndKey (&amp;quot;LcdAndKey&amp;quot;) - LCD/Keyboard testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002003 ||  || C2UsbHpmic (&amp;quot;UsbAndHPMicTest&amp;quot;) - USB and audio testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002004 ||  || C3Aging (&amp;quot;Aging&amp;quot;) - Graphics/Framerate testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002005 ||  || C4SixAxis (&amp;quot;6axisTest&amp;quot;) - Sixaxis (controller peripheral) testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002006 ||  || C5Wireless (&amp;quot;AssembledWireless&amp;quot;) - Wireless testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002007 ||  || &amp;quot;FinalCheck&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002044 ||  || &amp;quot;HB-TBIntegrationTest&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000204E ||  || A4BoardCalWriti (&amp;quot;BoardCalWriting&amp;quot;) - Writes calibration data to NAND.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000209B ||  || &amp;quot;am.debug&amp;quot; - Used by [[AM_services|AM]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000209C ||  || TestApplication (&amp;quot;TestApplicationLauncher&amp;quot;) - Factory qlaunch replacement. Used to launch other tests.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002071 ||  || &amp;quot;snap_shot_dump&amp;quot; - Used by [[NS_Services|NS]].&lt;br /&gt;
|-&lt;br /&gt;
| 01000000000020F0 ||  || &amp;quot;devmenuapp_installer&amp;quot; - Launched by [[Boot2|boot2]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Data Archives ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000800 || [[1.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || SSL trusted certificates&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000801 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Stores the message strings for Support Error Codes. There&#039;s &amp;quot;/DatabaseInfo&amp;quot; at FS root, then the rest is stored at &amp;quot;/{first 4 error digits}/{last 4 error digits}/&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000802 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Random textures?&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000803 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Mounted as &amp;quot;shareddata:/&amp;quot;. Contains various browser data: emojis, OSS NROs, &amp;quot;buildinfo/buildinfo.dat&amp;quot;, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000804 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || HTML resources: Open-source licenses(&amp;quot;Intellectual Property Notices&amp;quot;) and seizure warnings(&amp;quot;Health &amp;amp; Safety Information&amp;quot;). The former is stored at FS &amp;quot;/legallines.htdocs/&amp;quot;&amp;lt;br/&amp;gt; while the latter is at &amp;quot;/safe.htdocs/&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000805 || [[1.0.0|v450]] (0.0.0.450) || Chinese and Korean dictionaries&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000806 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Bad words&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000807 || [[1.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || [[Hotspot List]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000808 || [[1.0.0|v450]] (0.0.0.450) || European, English, and Japanese dictionaries&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000809 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[2.3.0|v262164]] (0.0.4.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (4.0.1.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || [[System Version Title]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Chara?&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Tutorial images and strings. Used for the offline news by the News applet.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080C || [[1.0.0|v450]] (0.0.0.450) || EULA. Also accessed by [[NS_Services|NS]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080D || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Blacklist URL&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080E || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Geo Zoneinfo&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000810 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Extended font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000811 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Standard font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000812 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Korean font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000813 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Taiwanese font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000814 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Chinese font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000816 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt;  [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.0.3.20)&amp;lt;br/&amp;gt; [[2.3.0|v262164]] (0.0.4.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (4.0.1.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || Contains the title-listing for the associated sysupdate in the [[NCA]]-type0 .cnmt.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000818 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.3.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || System config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000819 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || Firmware Package A: Normal Firmware.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || Firmware Package B: SafeMode Firmware.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.0.2.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || Firmware Package C: Normal Firmware (exFAT variant). Identical to 0100000000000819 with different package2. Requires a device ID to download from CDN.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081C || [[4.0.0|v268435656]] (4.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (4.1.0.50) || Firmware Package D: SafeMode Firmware (exFAT variant). Identical to 010000000000081A with different package2.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081D || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Errdisp strings&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081E || [[2.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Dummy file&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081F || [[2.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Icosa system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000820 || [[2.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Copper system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000821 || [[2.0.0|v260]] (0.0.0.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Hoag system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000822 || [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (3.0.2.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Firmware binaries for peripherals (hardware within Joy-Cons/etc).&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000823 || [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || Contains version.dat and ac_*_nx files. All of the *_nx files stored under here are compressed with gzip.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Applets ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001000 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;[[qlaunch]]&amp;quot; System applet (Launched by NS with TID loaded from system-config-title)&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001001 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;auth&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001002 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;cabinet&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001003 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;controller&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001004 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;dataErase&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001005 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;error&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001006 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;netConnect&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001007 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;playerSelect&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001008 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.0.2.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;swkbd&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001009 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;miiEdit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100A || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;LibAppletWeb&amp;quot; [[Internet_Browser|WebApplet]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100B || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;LibAppletShop&amp;quot; [[Internet_Browser|ShopN]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100C || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;overlayDisp&amp;quot; Overlay applet (TID is loaded by NS from system-config-title)&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100D || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;photoViewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100F || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;LibAppletOff&amp;quot; [[Internet_Browser|Offline]] web-applet&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001010 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;LibAppletLns&amp;quot; [[Internet_Browser|Whitelisted]] applet (LoginApplet+ShareApplet+LobbyApplet)&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001011 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.0.2.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (3.0.1.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;LibAppletAuth&amp;quot; [[Internet_Browser|WifiWebAuth]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001012 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;starter&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001013 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;myPage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001015 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.0.1.260)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (3.0.0.410)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;maintenance&amp;quot; Initial applet displayed when booting into [[Recovery_Mode]]. This title is launched by [[NS_Services|NS]] when a state flag is val1 indicating that this title should be launched instead of the above &amp;quot;System applet&amp;quot; title.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001016 || || TitleID used by [[NS_Services|NS]] when a certain flag is non-zero, in multiple places including around code using string &amp;quot;application_install&amp;quot;. This title doesn&#039;t seem to exist for retail.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Factory System Modules ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 100000000000B120 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 100000000000B14A || || [[Manu Services|manu]] - installed in [[Factory Setup|factory firmware]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Target Tools ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000001 || || [[Factory Setup|SystemInitializ]]&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000004 || || [[Factory Setup|CalWriterManu]]&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000007 || || &amp;quot;ApplicationLauncer&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Applications ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 01008BB00013C000 || [[1.0.0|v450]] (0.0.0.450)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (4.0.0.200) || &amp;quot;[[flog]]&amp;quot; NES emulator.&lt;br /&gt;
|-&lt;br /&gt;
| 0100069000078000 || v0 || &amp;quot;Retail Interactive Display Menu&amp;quot;. This title can be launched by [[qlaunch]], but is not normally installed on retail systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== eShop Games / Applications ==&lt;br /&gt;
Note: Nintendo Switch game and application titles follow a higher entropy TitleID scheme than previous generation consoles. &amp;lt;br/&amp;gt; Refer to the [[Title_list/Games|Games List]] for more information.&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Title_list&amp;diff=3340</id>
		<title>Title list</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Title_list&amp;diff=3340"/>
		<updated>2018-01-01T07:20:16Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System Modules ==&lt;br /&gt;
Note: Unlike 3DS, Switch doesn&#039;t have a dedicated HTTP-sysmodule. Instead, processes using HTTP(S) just use libcurl + socket/ssl services.&lt;br /&gt;
&lt;br /&gt;
As of [[2.0.0]], the only sysmodule with a RomFS is [[HID_services|hid-sysmodule]].&lt;br /&gt;
&lt;br /&gt;
Decimal versions are shown here as an 8.8.8.8 bitfield, but the values fit a 6.10.16 bitfield better.&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000000 || [bundled with kernel] || FS&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000001 || [bundled with kernel] || Loader&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000002 || [bundled with kernel] || NCM&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000003 || [bundled with kernel] || ProcessMana&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000004 || [bundled with kernel] || sm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000005 || [bundled with kernel] || [[boot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000006 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || usb&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000007 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || tma&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000008 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || [[Boot2|boot2]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000009 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || settings&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || bus&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || bluetooth&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000C || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || bcat&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000D || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000E || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || friends&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000000F || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || nifm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000010 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ptm&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000011 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000012 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.3.0|v131092]] (0.2.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || bsdsockets&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000013 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || hid&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000014 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || audio&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000015 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || LogManager.Prod&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000016 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[2.2.0|v196608]] (0.3.0.0)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || wlan&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000017 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000018 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ldn&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000019 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[2.3.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (16.1.0.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || nvservices&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || pcv&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ppc&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001C || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || nvnflinger&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001D || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || pcie.withoutHb&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001E || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || account&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000001F || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ns&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000020 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.2.0|v131072]] (0.2.0.0)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || nfc&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000021 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || psc&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000022 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || capsrv&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000023 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || am&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000024 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ssl&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000025 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || nim&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000028 || [bundled with kernel] || spl&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000029 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || lbl&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || btm&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || erpt&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002D || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || vi&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002E || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || pctl&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000002F || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || npns&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000030 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || [[Eupld_services|eupld]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000031 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || glue&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000032 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || eclct&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000033 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || es&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000034 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || fatal&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000035 || [[4.0.0|v268435656]] (16.0.0.200) || grc, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000036 || [[2.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v65596]] (0.1.0.60)&amp;lt;br/&amp;gt; [[2.3.0|v131092]] (0.2.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || [[creport]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000037 || [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || ro&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000038 || || This title is referenced by [[3.0.0]] boot2.prodBoot, but does not exist on retail systems.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000039 || [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || sdb&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003A || [[4.0.0|v268435656]] (16.0.0.200) || migration, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003C || [[4.0.0|v268435656]] (16.0.0.200) || jpegdec, added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000003D || [[4.0.0|v268435656]] (16.0.0.200) || [[safemode]], added with [[4.0.0|4.0.0 System Update]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Debug Applets ==&lt;br /&gt;
Note: No 01000000000020XX titles exist on retail systems.&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002000 ||  || &amp;quot;BoardTest&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002001 ||  || &amp;quot;BoardWireless&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002002 ||  || C1LcdAndKey (&amp;quot;LcdAndKey&amp;quot;) - LCD/Keyboard testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002003 ||  || C2UsbHpmic (&amp;quot;UsbAndHPMicTest&amp;quot;) - USB and audio testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002004 ||  || C3Aging (&amp;quot;Aging&amp;quot;) - Graphics/Framerate testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002005 ||  || C4SixAxis (&amp;quot;6axisTest&amp;quot;) - Sixaxis (controller peripheral) testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002006 ||  || C5Wireless (&amp;quot;AssembledWireless&amp;quot;) - Wireless testing.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002007 ||  || &amp;quot;FinalCheck&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002044 ||  || &amp;quot;HB-TBIntegrationTest&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000204E ||  || A4BoardCalWriti (&amp;quot;BoardCalWriting&amp;quot;) - Writes calibration data to NAND.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000209B ||  || &amp;quot;am.debug&amp;quot; - Used by [[AM_services|AM]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000209C ||  || TestApplication (&amp;quot;TestApplicationLauncher&amp;quot;) - Factory qlaunch replacement. Used to launch other tests.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000002071 ||  || &amp;quot;snap_shot_dump&amp;quot; - Used by [[NS_Services|NS]].&lt;br /&gt;
|-&lt;br /&gt;
| 01000000000020F0 ||  || &amp;quot;devmenuapp_installer&amp;quot; - Launched by [[Boot2|boot2]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Data Archives ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000800 || [[1.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || SSL trusted certificates&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000801 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Stores the message strings for Support Error Codes. There&#039;s &amp;quot;/DatabaseInfo&amp;quot; at FS root, then the rest is stored at &amp;quot;/{first 4 error digits}/{last 4 error digits}/&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000802 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Random textures?&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000803 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Mounted as &amp;quot;shareddata:/&amp;quot;. Contains various browser data: emojis, OSS NROs, &amp;quot;buildinfo/buildinfo.dat&amp;quot;, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000804 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || HTML resources: Open-source licenses(&amp;quot;Intellectual Property Notices&amp;quot;) and seizure warnings(&amp;quot;Health &amp;amp; Safety Information&amp;quot;). The former is stored at FS &amp;quot;/legallines.htdocs/&amp;quot;&amp;lt;br/&amp;gt; while the latter is at &amp;quot;/safe.htdocs/&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000805 || [[1.0.0|v450]] (0.0.1.194) || Chinese and Korean dictionaries&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000806 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Bad words&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000807 || [[1.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || [[Hotspot List]]&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000808 || [[1.0.0|v450]] (0.0.1.194) || European, English, and Japanese dictionaries&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000809 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[2.3.0|v262164]] (0.4.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (16.1.0.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || [[System Version Title]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Chara?&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Tutorial images and strings. Used for the offline news by the News applet.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080C || [[1.0.0|v450]] (0.0.1.194) || EULA. Also accessed by [[NS_Services|NS]].&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080D || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Blacklist URL&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000080E || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Geo Zoneinfo&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000810 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Extended font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000811 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Standard font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000812 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Korean font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000813 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Taiwanese font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000814 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Chinese font&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000816 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt;  [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[2.2.0|v196628]] (0.3.0.20)&amp;lt;br/&amp;gt; [[2.3.0|v262164]] (0.4.0.20)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.0.1|v268501002]] (16.1.0.10)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || Contains the title-listing for the associated sysupdate in the [[NCA]]-type0 .cnmt.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000818 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.3.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || System config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000819 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || Firmware Package A: Normal Firmware.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || Firmware Package B: SafeMode Firmware.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131082]] (0.2.0.10)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || Firmware Package C: Normal Firmware (exFAT variant). Identical to 0100000000000819 with different package2. Requires a device ID to download from CDN.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081C || [[4.0.0|v268435656]] (16.0.0.200)&amp;lt;br/&amp;gt; [[4.1.0|v269484082]] (16.16.0.50) || Firmware Package D: SafeMode Firmware (exFAT variant). Identical to 010000000000081A with different package2.&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081D || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Errdisp strings&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081E || [[2.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Dummy file&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000081F || [[2.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Icosa system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000820 || [[2.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Copper system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000821 || [[2.0.0|v260]] (0.0.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Hoag system config&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000822 || [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.2|v201457684]] (12.2.0.20)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Firmware binaries for peripherals (hardware within Joy-Cons/etc).&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000000823 || [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || Contains version.dat and ac_*_nx files. All of the *_nx files stored under here are compressed with gzip.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Applets ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001000 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;[[qlaunch]]&amp;quot; System applet (Launched by NS with TID loaded from system-config-title)&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001001 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;auth&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001002 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;cabinet&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001003 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;controller&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001004 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;dataErase&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001005 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;error&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001006 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;netConnect&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001007 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;playerSelect&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001008 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131132]] (0.2.0.60)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;swkbd&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001009 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;miiEdit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100A || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;LibAppletWeb&amp;quot; [[Internet_Browser|WebApplet]]&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100B || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;LibAppletShop&amp;quot; [[Internet_Browser|ShopN]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100C || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;overlayDisp&amp;quot; Overlay applet (TID is loaded by NS from system-config-title)&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100D || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;photoViewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 010000000000100F || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;LibAppletOff&amp;quot; [[Internet_Browser|Offline]] web-applet&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001010 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;LibAppletLns&amp;quot; [[Internet_Browser|Whitelisted]] applet (LoginApplet+ShareApplet+LobbyApplet)&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001011 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[2.1.0|v131162]] (0.2.0.90)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[3.0.1|v201392178]] (12.1.0.50)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;LibAppletAuth&amp;quot; [[Internet_Browser|WifiWebAuth]] applet&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001012 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;starter&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001013 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;myPage&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001015 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[2.0.0|v65796]] (0.1.1.4)&amp;lt;br/&amp;gt; [[3.0.0|v201327002]] (12.0.1.154)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;maintenance&amp;quot; Initial applet displayed when booting into [[Recovery_Mode]]. This title is launched by [[NS_Services|NS]] when a state flag is val1 indicating that this title should be launched instead of the above &amp;quot;System applet&amp;quot; title.&lt;br /&gt;
|-&lt;br /&gt;
| 0100000000001016 || || TitleID used by [[NS_Services|NS]] when a certain flag is non-zero, in multiple places including around code using string &amp;quot;application_install&amp;quot;. This title doesn&#039;t seem to exist for retail.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Factory System Modules ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 100000000000B120 || || Launched by maintenance mode [[Boot2|boot2.manuBoot]], but not present in retail or [[Factory Setup|factory firmware]].&lt;br /&gt;
|-&lt;br /&gt;
| 100000000000B14A || || [[Manu Services|manu]] - installed in [[Factory Setup|factory firmware]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Target Tools ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000001 || || [[Factory Setup|SystemInitializ]]&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000004 || || [[Factory Setup|CalWriterManu]]&lt;br /&gt;
|-&lt;br /&gt;
| 1000000000000007 || || &amp;quot;ApplicationLauncer&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System Applications ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Title-id || Versions || Description&lt;br /&gt;
|-&lt;br /&gt;
| 01008BB00013C000 || [[1.0.0|v450]] (0.0.1.194)&amp;lt;br/&amp;gt; [[4.0.0|v268435656]] (16.0.0.200) || &amp;quot;[[flog]]&amp;quot; NES emulator.&lt;br /&gt;
|-&lt;br /&gt;
| 0100069000078000 || v0 || &amp;quot;Retail Interactive Display Menu&amp;quot;. This title can be launched by [[qlaunch]], but is not normally installed on retail systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== eShop Games / Applications ==&lt;br /&gt;
Note: Nintendo Switch game and application titles follow a higher entropy TitleID scheme than previous generation consoles. &amp;lt;br/&amp;gt; Refer to the [[Title_list/Games|Games List]] for more information.&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Audio_services&amp;diff=3310</id>
		<title>Audio services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Audio_services&amp;diff=3310"/>
		<updated>2017-12-30T21:09:56Z</updated>

		<summary type="html">&lt;p&gt;Hthh: Undo revision 3309 by Hthh (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= audout:u =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ListAudioOuts&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#OpenAudioOut]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenAudioOut ==&lt;br /&gt;
Takes two u64s (an interface ID and a PID placeholder?), a PID, a process handle, and the name of the interface you want to connect to. Returns an [[#IAudioOut]] object and four u32s: the sample rate, channel count, PCM format, and an unknown field. PCM format 2 is INT16.&lt;br /&gt;
&lt;br /&gt;
== IAudioOut ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAudioOutState]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartAudioOut&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopAudioOut&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#AppendAudioOutBuffer]] taking a type 0x5 (A descriptor) buffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#RegisterBufferEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetReleasedAudioOutBuffer]] taking a type 0x6 (B descriptor) buffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsAudioOutBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#AppendAudioOutBuffer]] taking a type 0x21 buffer&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#GetReleasedAudioOutBuffer]] taking a type 0x22 buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GetAudioOutState ===&lt;br /&gt;
&lt;br /&gt;
Returns an AudioOutState, 0x00=Started 0x01=Stopped&lt;br /&gt;
&lt;br /&gt;
=== AppendAudioOutBuffer ===&lt;br /&gt;
&lt;br /&gt;
Takes a u64 (not sure what this is, might act as some sort of identifier for the audio buffer? official applications seem to use the address of the audio buffer struct for this) and a buffer.&lt;br /&gt;
The format of said buffer is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || 8 || Pointer to the sample data pointer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || 8 || Pointer to sample data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 8 || Capacity of sample buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 8 || Size of data in sample buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 8 || Unknown. Zero works.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== RegisterBufferEvent ===&lt;br /&gt;
&lt;br /&gt;
Returns an event handle that is signalled when a buffer is released&lt;br /&gt;
&lt;br /&gt;
=== GetReleasedAudioOutBuffer ===&lt;br /&gt;
&lt;br /&gt;
Takes a buffer, which it will fill with the identifiers passed from [[#AppendAudioOutBuffer]] of audio buffers that have been released. Will return a u32 (may indicate how many buffers were released?)&lt;br /&gt;
&lt;br /&gt;
= audin:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ListAudioIns&lt;br /&gt;
|-&lt;br /&gt;
| 1 || OpenAudioIn&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAudioIn ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAudioInState]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartAudioIn&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopAudioIn&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AppendAudioInBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RegisterBufferEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetReleasedAudioInBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsAudioInBuffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GetAudioInState ===&lt;br /&gt;
&lt;br /&gt;
Returns an AudioInState, 0x00=Started 0x01=Stopped&lt;br /&gt;
&lt;br /&gt;
= audrec:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenFinalOutputRecorder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IFinalOutputRecorder ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetFinalOutputRecorderState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartFinalOutputRecorder&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopFinalOutputRecorder&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AppendFinalOutputRecorderBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RegisterBufferEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetReleasedFinalOutputRecorderBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsFinalOutputRecorderBuffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audren:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAudioRendererWorkBufferSize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAudioRenderersProcessMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetAudioRenderersProcessMasterVolume&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAudioRenderer ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetAudioRendererSampleRate&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAudioRendererSampleCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAudioRendererMixBufferCount&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioRendererState&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RequestUpdateAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 5 || StartAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || StopAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetAudioRendererRenderingTimeLimit&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetAudioRendererRenderingTimeLimit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audout:a, audin:a, audrec:a and audren:a =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestSuspend&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestResume&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audout:d, audin:d, audrec:d and audren:d =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestSuspendForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#RequestResumeForDebug]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestSuspendForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
== RequestResumeForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
= codecctl =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || InitializeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 1 || FinalizeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SleepCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 3 || WakeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#SetCodecVolume]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetCodecVolumeMax&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetCodecVolumeMin&lt;br /&gt;
|-&lt;br /&gt;
| 7 || SetCodecActiveTarget&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 9 || BindCodecHeadphoneMicJackInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10 || IsCodecHeadphoneMicJackInserted&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ClearCodecHeadphoneMicJackInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 12 || IsCodecDeviceRequested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetCodecVolume ==&lt;br /&gt;
&lt;br /&gt;
Takes a Volume (uint32)&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Audio_services&amp;diff=3309</id>
		<title>Audio services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Audio_services&amp;diff=3309"/>
		<updated>2017-12-30T20:13:52Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= audout:u =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ListAudioOuts&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#OpenAudioOut]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenAudioOut ==&lt;br /&gt;
Takes two u64s (an interface ID and a PID placeholder?), a PID, a process handle, and the name of the interface you want to connect to. Returns an [[#IAudioOut]] object.&lt;br /&gt;
&lt;br /&gt;
== IAudioOut ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAudioOutState]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartAudioOut&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopAudioOut&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AppendAudioOutBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RegisterBufferEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetReleasedAudioOutBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsAudioOutBuffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GetAudioOutState ===&lt;br /&gt;
&lt;br /&gt;
Returns an AudioOutState, 0x00=Started 0x01=Stopped&lt;br /&gt;
&lt;br /&gt;
= audout:a =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestSuspendAudioOuts&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestResumeAudioOuts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audout:d =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestSuspendAudioOutsForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#RequestResumeAudioOutsForDebug]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestSuspendAudioOutsForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
== RequestResumeAudioOutsForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
= audin:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ListAudioIns&lt;br /&gt;
|-&lt;br /&gt;
| 1 || OpenAudioIn&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAudioIn ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetAudioInState]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartAudioIn&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopAudioIn&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AppendAudioInBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RegisterBufferEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetReleasedAudioInBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsAudioInBuffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GetAudioInState ===&lt;br /&gt;
&lt;br /&gt;
Returns an AudioInState, 0x00=Started 0x01=Stopped&lt;br /&gt;
&lt;br /&gt;
= audin:a =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestSuspendAudioIns&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestResumeAudioIns&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audin:d =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestSuspendAudioInsForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#RequestResumeAudioInsForDebug]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestSuspendAudioInsForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
== RequestResumeAudioInsForDebug ==&lt;br /&gt;
&lt;br /&gt;
Takes an [[AM_services#AppletResourceUserId|AppletResourceUserId]]. (u64)&lt;br /&gt;
&lt;br /&gt;
= audrec:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenFinalOutputRecorder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IFinalOutputRecorder ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetFinalOutputRecorderState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || StartFinalOutputRecorder&lt;br /&gt;
|-&lt;br /&gt;
| 2 || StopFinalOutputRecorder&lt;br /&gt;
|-&lt;br /&gt;
| 3 || AppendFinalOutputRecorderBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RegisterBufferEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetReleasedFinalOutputRecorderBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContainsFinalOutputRecorderBuffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= audren:u =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAudioRendererWorkBufferSize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAudioRenderersProcessMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetAudioRenderersProcessMasterVolume&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IAudioRenderer ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetAudioRendererSampleRate&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAudioRendererSampleCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAudioRendererMixBufferCount&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAudioRendererState&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RequestUpdateAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 5 || StartAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 6 || StopAudioRenderer&lt;br /&gt;
|-&lt;br /&gt;
| 7 || QuerySystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetAudioRendererRenderingTimeLimit&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetAudioRendererRenderingTimeLimit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= codecctl =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || InitializeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 1 || FinalizeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SleepCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 3 || WakeCodecController&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#SetCodecVolume]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetCodecVolumeMax&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetCodecVolumeMin&lt;br /&gt;
|-&lt;br /&gt;
| 7 || SetCodecActiveTarget&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 9 || BindCodecHeadphoneMicJackInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10 || IsCodecHeadphoneMicJackInserted&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ClearCodecHeadphoneMicJackInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 12 || IsCodecDeviceRequested&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetCodecVolume ==&lt;br /&gt;
&lt;br /&gt;
Takes a Volume (uint32)&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3271</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3271"/>
		<updated>2017-12-26T02:53:30Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || MountCode || u64 TitleId + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsCodeMounted || u64 ProcessId || Returns a bool (1 if code is mounted).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] Initialize || PID descriptor ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#SetFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ClearFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] Initialize ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetFsPermissions ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== ClearFsPermissions ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying a RSA signature fails. This RSA signature seems to be the signature in the [[NPDM]] ACID. It then skips verifying what seems to be the second signature in the [[NCA_Format|NCA header]]. Note that if verifying the NPDM(?) signature is successful, and verifying that second signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#MountContent7]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystemImpl&lt;br /&gt;
|-&lt;br /&gt;
| 18 || MountSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] MountSaveDataReadOnly&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] ReadSaveDataFileSystemExtraDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 58 || ReadSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || OpenSaveDataInfoReader&lt;br /&gt;
|-&lt;br /&gt;
| 61 || OpenSaveDataIterator&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataThumbnailFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+] OpenSaveDataTransferManager&lt;br /&gt;
|-&lt;br /&gt;
| 100 || MountImageDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || Returns an [[#IStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdByPath2 (returns extra byte)&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+] GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+] SetSdCardAccessibility&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+] IsSdCardAccessible&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0+] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearFileSystemProxyErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+] RegisterUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] MountRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]],&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || MountContentType2 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || MountContentType5 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || MountContentType3 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || MountContentType4 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || MountContentType6 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || MountContentType7 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || ContentStorageAccess || 3 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || ImageDirectoryAccess || 3 || [[#MountImageDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000084 || MountBisType28 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000080 || MountBisType29 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000008080 || MountBisType30 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000008080 || MountBisType31 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000080 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0xC000000000200000 || SdCardAccess || 3 || [[#MountSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000010 || GameCardUser || 3 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000040020 || SaveDataAccess0 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000028 || SystemSaveDataAccess0 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000000020 || SaveDataAccess1 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000000020 || SystemSaveDataAccess1 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000010082 || BisPartition0 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000010080 || BisPartition10 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010080 || BisPartition20 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000010080 || BisPartition21 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000010080 || BisPartition22 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || BisPartition23 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || BisPartition24 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || BisPartition25 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000000080 || BisPartition26 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000000084 || BisPartition27 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000000084 || BisPartition28 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000000080 || BisPartition29 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000080 || BisPartition30 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000080 || BisPartition31 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || BisPartition32 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0xC000000000200000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000100 || GameCard_System || 3 || [[#OpenGameCardPartition]],  [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000100008 || MountContent_System || 1 || [[#MountContent]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000400000 || HostAccess || 3 || [[#OpenHostFileSystemImpl]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || BisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || EraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || GameCardCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || GameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || GameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || GameCardAsic || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || SaveDataCreate || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || SaveDataDelete0 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || SystemSaveDataCreate0 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || SystemSaveDataCreate1 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || SaveDataDelete1 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || SaveDataIterators0 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || SaveDataIterators1 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000020000 || SaveThumbnails || [[#OpenSaveDataThumbnailFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000400 || PosixTime || [[#SetCurrentPosixTime]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000004060 || SaveDataExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000080000 || GlobalMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || SpeedEmulation || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Invalid || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0xC000000000800000 || PaddingFiles || [[#CreatePaddingFile]], [[#DeletePaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000001000000 || SaveData_Debug || [[#CorruptSaveDataForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000002000000 || SaveData_SystemManagement || [[#CreateSaveData]], [[#MountSaveData]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000004000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000008000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0x8000000010000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000000000800 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000000004020 || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== MountContent7 ==&lt;br /&gt;
Takes an input u32 (same as [[#MountContent]]) and an u64 title-id. Web-applet loads the u32 from u32_table[inparam]. The in32 must be 4.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and the below &amp;quot;MountContent&amp;quot; as &amp;quot;MountContent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== MountContent ==&lt;br /&gt;
Takes a type-0x19 input buffer, an in32, and an input title-id.&lt;br /&gt;
&lt;br /&gt;
The in32 must be 5 if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The in32 must be 2..7.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from nsam [[NS_Services#GetContentNcaPath|GetContentNcaPath]].&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and in32=7.&lt;br /&gt;
&lt;br /&gt;
After the in32-specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When in32=5, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== MountBis ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 Bis partitionID(see below). Official user-process code sets instr[0] = 0 normally.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisPartition]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisPartition ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisPartition IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveData ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSystemSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardPartition ==&lt;br /&gt;
&lt;br /&gt;
Takes an input u32 (partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountGameCardPartition ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a gamecard [[Gamecard_Partition|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process can mount a given savedata at any given time (this includes systemsavedata).&lt;br /&gt;
&lt;br /&gt;
== MountSystemSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== MountContentStorage ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[Content_Manager_services#ReadEntryRaw]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveData ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes 0x10-bytes of input.&lt;br /&gt;
&lt;br /&gt;
Appears to be used to load the seed into FS-module state, since FS-module itself doesn&#039;t seem to have file-reading code to handle this itself.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module uses this with data read from a file.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || OpenFile&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || CleanDirectoryRecursively [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetFileTimeStampRaw [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] QueryEntry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
==OpenDirectory==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer and an input u64. Unknown what the u64 is for, doesn&#039;t(?) seem to affect output. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x300 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x300 || 0x4 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8? || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
s8 type: 0 = directory, 1 = file.&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+] SuspendMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+] ResumeMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] GetGameCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] Returns 0x40-bytes of output data.&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BindEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=BisPartitionID=&lt;br /&gt;
* 0: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 0.&lt;br /&gt;
* 10: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 1.&lt;br /&gt;
* Rest: see [[Flash_Filesystem|here]].&lt;br /&gt;
&lt;br /&gt;
=Save Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| ContentStorageId? 0 for SystemSaveData. 1 for SaveData. 2 for DeviceSaveData(with official user-processes all other fields are 0 for DeviceSaveData).&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=SaveCreate Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=DeviceSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
=BcatSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveData]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Services_API&amp;diff=3270</id>
		<title>Services API</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Services_API&amp;diff=3270"/>
		<updated>2017-12-26T02:16:32Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).&lt;br /&gt;
&lt;br /&gt;
Handles for services are retrieved from the service manager port, &amp;quot;sm:&amp;quot;, and are released via svcCloseHandle or when a process is terminated or crashes. Manager service &amp;quot;sm:m&amp;quot; also exists. Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC. Services are also able to limit the number of handles given to other processes.&lt;br /&gt;
&lt;br /&gt;
= sm: =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetService]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#RegisterService]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#UnregisterService]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
Takes a pid descriptor and a reserved input u64.&lt;br /&gt;
&lt;br /&gt;
== GetService ==&lt;br /&gt;
Takes a zero-padded service name encoded as an u64 integer. Returns a handle.&lt;br /&gt;
&lt;br /&gt;
== RegisterService ==&lt;br /&gt;
Takes a zero-padded service name encoded as an u64 integer, an u8 bool, and an u32 (session count) at the next word. Returns a handle.&lt;br /&gt;
&lt;br /&gt;
== UnregisterService ==&lt;br /&gt;
Takes a zero-padded service name encoded as an u64 integer.&lt;br /&gt;
&lt;br /&gt;
= sm:m =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RegisterProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#UnregisterProcess]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterProcess ==&lt;br /&gt;
Takes a pid and two A descriptors with the ACID and ACI0 service lists. That data originates from [[NPDM]].&lt;br /&gt;
&lt;br /&gt;
== UnregisterProcess ==&lt;br /&gt;
Takes a pid.&lt;br /&gt;
&lt;br /&gt;
= Service List =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Service names&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| acc:u0, acc:u1, acc:aa, acc:su&lt;br /&gt;
| [[Account services]]&lt;br /&gt;
| u0: System, u1: User, su: Admin, aa: Baas&lt;br /&gt;
|-&lt;br /&gt;
| ahid:cd, ahid:hdr, hid, hid:dbg, hid:sys, irs, irs:sys, xcd:sys&lt;br /&gt;
| [[HID services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| appletAE, appletOE, idle:sys, omm, spsm&lt;br /&gt;
| [[AM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0+] aoc:u, mii:u, mii:e, ns:am, ns:su, ns:dev, pl:u, ovln:rcv, ovln:snd, pdm:ntfy, pdm:qry&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] aoc:u, ns:am2, ns:dev, ns:ec, ns:rid, ns:rt, ns:su, ns:vm, ns:web, ovln:rcv, ovln:snd&lt;br /&gt;
| [[NS Services]]&lt;br /&gt;
| am: Application Manager, su: System Update&lt;br /&gt;
|-&lt;br /&gt;
| apm, apm:p, apm:sys, fgm, fgm:0, fgm:9, (fgm:dbg?), (aoc:apm??)&lt;br /&gt;
| [[APM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| arp:r, arp:w, bgtc:t, bgtc:sc&lt;br /&gt;
| [[Glue services]]&lt;br /&gt;
| r: Reader, w: Writer&lt;br /&gt;
|-&lt;br /&gt;
| audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl, codecctl, hwopus&lt;br /&gt;
| [[Audio services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;banana&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| ?&lt;br /&gt;
| Some games on [3.0.0+] have access to this service, but it doesn&#039;t appear to be present on retail devices.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;bcat:a, bcat:u, bcat:m, bcat:s, news:a, news:c, news:m, news:p, news:v, prepo:u, prepo:s, prepo:m, prepo:a&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| [[BCAT services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bpc, bpc:r, pcv, pcv:arb, pcv:imm, time:u, time:a, time:s&lt;br /&gt;
| [[PCV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bsd:u, bsd:s, bsdcfg, ethc:c, ethc:i, nsd:u, nsd:a, sfdnsres&lt;br /&gt;
| [[Sockets services]], [[NSD services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| btdrv&lt;br /&gt;
| [[Bluetooth Driver services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| btm, btm:dbg, btm:sys&lt;br /&gt;
| Battery services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| caps:a, caps:c&lt;br /&gt;
| [[Capture services]]&lt;br /&gt;
| a: AlbumAccessor, c: AlbumControl&lt;br /&gt;
|-&lt;br /&gt;
| caps:sc, caps:ss, mm:u, vi:m, vi:s, vi:u, cec-mgr&lt;br /&gt;
| [[Display services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| dispdrv&lt;br /&gt;
| [[Nvnflinger services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| erpt:c, erpt:r&lt;br /&gt;
| [[Error Report services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| es&lt;br /&gt;
| ETicket services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fan, psm, tc, ts&lt;br /&gt;
| [[PTM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fatal:u, fatal:p&lt;br /&gt;
| [[Fatal services]]&lt;br /&gt;
| u: User, p: Privileged&lt;br /&gt;
|-&lt;br /&gt;
| friend:u, friend:v, friend:m, friend:s, friend:a&lt;br /&gt;
| Friend services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fsp-srv, fsp-ldr, fsp-pr&lt;br /&gt;
| [[Filesystem services]]&lt;br /&gt;
| srv: Main, ldr: Loader, pr: Program Registry&lt;br /&gt;
|-&lt;br /&gt;
| gpio, i2c, i2c:pcv, pinmux, pwm, uart, [3.0.0+] sasbus&lt;br /&gt;
| [[Bus services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| htc, htcs, htc:tenv&lt;br /&gt;
| [[TMA services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lbl&lt;br /&gt;
| [[Backlight services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ldn:m, ldn:s, ldn:u&lt;br /&gt;
| [[LDN services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0+] ldr:pm, ldr:ro, ldr:shel, ldr:dmnt&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] ldr:pm, ldr:shel, ldr:dmnt&lt;br /&gt;
| [[Loader services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lm&lt;br /&gt;
| [[Log services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| manu&lt;br /&gt;
| [[Manu Services]]&lt;br /&gt;
| &amp;quot;Manufacturing&amp;quot;, present in factory firmware but not installed on retail systems.&lt;br /&gt;
|-&lt;br /&gt;
| lr, ncm, ncm:v&lt;br /&gt;
| [[NCM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nfc:am, nfc:mf:u, nfc:user, nfc:sys, nfp:user, nfp:dbg, nfp:sys&lt;br /&gt;
| NFC services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nifm:u, nifm:a, nifm:s&lt;br /&gt;
| [[Network Interface services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nim, nim:shp, ntc&lt;br /&gt;
| [[NIM services]]&lt;br /&gt;
| shp: eShop&lt;br /&gt;
|-&lt;br /&gt;
| npns:u, npns:s&lt;br /&gt;
| NPNS services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvgem:c, nvgem:cd, nvmemp&lt;br /&gt;
| [[NV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pcie&lt;br /&gt;
| [[PCIe services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pctl, pctl:a, pctl:s, pctl:r&lt;br /&gt;
| [[Parental Control services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pm:bm, pm:info, pm:shell&lt;br /&gt;
| [[Process Manager services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| psc:c, psc:m&lt;br /&gt;
| [[PSC services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] ldr:ro, ro:dmnt&lt;br /&gt;
| [[Loader services|RO services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| set, set:fd, set:cal, set:sys&lt;br /&gt;
| [[Settings services]]&lt;br /&gt;
| cal: calibration, sys: System Settings&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] mii:u, mii:e, pdm:ntfy, pdm:qry, pl:u&lt;br /&gt;
| [[Shared Database services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ssl&lt;br /&gt;
| [[SSL services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0+] csrng, spl:&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] csrng, spl:, spl:mig, spl:fs, spl:ssl, spl:es&lt;br /&gt;
| [[SPL services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm&lt;br /&gt;
| [[USB services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| wlan:inf, wlan:lcl, wlan:lg, wlan:lga, wlan:sg, wlan:soc&lt;br /&gt;
| WLAN services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] grc:c&lt;br /&gt;
| [[GRC services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] mig:usr&lt;br /&gt;
| [[Migration services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] caps:dc&lt;br /&gt;
| [[Jpegdec services]]&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Network_Interface_services&amp;diff=3269</id>
		<title>Network Interface services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Network_Interface_services&amp;diff=3269"/>
		<updated>2017-12-26T00:05:06Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= nifm:a =&lt;br /&gt;
This is &amp;quot;nn::nifm::detail::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== IStaticService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|- &lt;br /&gt;
| 4 || CreateGeneralService ([3.0.0+] CreateGeneralServiceOld) || Returns an [[#IGeneralService]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] CreateGeneralService || Returns an [[#IGeneralService]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IGeneralService ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetClientId ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateScanRequest || Returns an [[#IScanRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateRequest || Returns an [[#IRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetCurrentNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 || EnumerateNetworkInterfaces ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 || EnumerateNetworkProfiles ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || SetNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || RemoveNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| [1.0.0-3.0.2] GetScanData&lt;br /&gt;
[4.0.0+] GetScanDataOld&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetCurrentIpAddress ||&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| [1.0.0-3.0.2] GetCurrentAccessPoint&lt;br /&gt;
[4.0.0+] GetCurrentAccessPointOld&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 14 || CreateTemporaryNetworkProfile || Returns an [[#INetworkProfile]].&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetCurrentIpConfigInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetWirelessCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 17 || IsWirelessCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || GetInternetConnectionStatus ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 || SetEthernetCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || IsEthernetCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || IsAnyInternetRequestAccepted ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || IsAnyForegroundRequestAccepted ||&lt;br /&gt;
|-&lt;br /&gt;
| 23 || PutToSleep ||&lt;br /&gt;
|-&lt;br /&gt;
| 24 || WakeUp ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetSsidListVersion ||&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetExclusiveClient ||&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetDefaultIpSetting ||&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetDefaultIpSetting ||&lt;br /&gt;
|-&lt;br /&gt;
| 29 || SetWirelessCommunicationEnabledForTest ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetEthernetCommunicationEnabledForTest ||&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [2.0.0+] GetTelemetorySystemEventReadableHandle ||&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [2.0.0+] GetTelemetryInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [2.0.0+] ConfirmSystemAvailability ||&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [4.0.0+] SetBackgroundRequestEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [4.0.0+] GetScanData ||&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [4.0.0+] GetCurrentAccessPoint ||&lt;br /&gt;
|-&lt;br /&gt;
| 37 || [4.0.0+] Shutdown ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IScanRequest ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || Submit&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsProcessing&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetSystemEventReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IRequest ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || GetRequestState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSystemEventReadableHandles&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Submit&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SetRequirement&lt;br /&gt;
|-&lt;br /&gt;
| 6 || SetRequirementPreset&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetPriority&lt;br /&gt;
|-&lt;br /&gt;
| 9 || SetNetworkProfileId&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetRejectable&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetConnectionConfirmationOption&lt;br /&gt;
|-&lt;br /&gt;
| 12 || SetPersistent&lt;br /&gt;
|-&lt;br /&gt;
| 13 || SetInstant&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetSustainable&lt;br /&gt;
|-&lt;br /&gt;
| 15 || SetRawPriority&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetGreedy&lt;br /&gt;
|-&lt;br /&gt;
| 17 || SetSharable&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetRequirementByRevision&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetRequirement&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetRevision&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetAppletInfo&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetAdditionalInfo&lt;br /&gt;
|-&lt;br /&gt;
| 23 || SetKeptInSleep&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSocketDescriptor&lt;br /&gt;
|-&lt;br /&gt;
| 25 || UnregisterSocketDescriptor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== INetworkProfile ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || Update&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Persist ([3.0.0+] PersistOld)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [3.0.0+] Persist&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nifm:s =&lt;br /&gt;
Same as [[#nifm:a|nifm:a]].&lt;br /&gt;
&lt;br /&gt;
= nifm:u =&lt;br /&gt;
Same as [[#nifm:a|nifm:a]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Network_Interface_services&amp;diff=3268</id>
		<title>Network Interface services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Network_Interface_services&amp;diff=3268"/>
		<updated>2017-12-26T00:03:27Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= nifm:a =&lt;br /&gt;
This is &amp;quot;nn::nifm::detail::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== IStaticService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|- &lt;br /&gt;
| 4 || CreateGeneralService ([3.0.0+] CreateGeneralServiceOld) || Returns an [[#IGeneralService]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] CreateGeneralService || Returns an [[#IGeneralService]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IGeneralService ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetClientId ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateScanRequest || Returns an [[#IScanRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateRequest || Returns an [[#IRequest]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetCurrentNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 || EnumerateNetworkInterfaces ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 || EnumerateNetworkProfiles ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || SetNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || RemoveNetworkProfile ||&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| [1.0.0-3.0.2] GetScanData&lt;br /&gt;
[4.0.0+] GetScanDataOld&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetCurrentIpAddress ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetCurrentAccessPoint ||&lt;br /&gt;
|-&lt;br /&gt;
| 14 || CreateTemporaryNetworkProfile || Returns an [[#INetworkProfile]].&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetCurrentIpConfigInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetWirelessCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 17 || IsWirelessCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 18 || GetInternetConnectionStatus ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 || SetEthernetCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || IsEthernetCommunicationEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || IsAnyInternetRequestAccepted ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || IsAnyForegroundRequestAccepted ||&lt;br /&gt;
|-&lt;br /&gt;
| 23 || PutToSleep ||&lt;br /&gt;
|-&lt;br /&gt;
| 24 || WakeUp ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetSsidListVersion ||&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetExclusiveClient ||&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetDefaultIpSetting ||&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetDefaultIpSetting ||&lt;br /&gt;
|-&lt;br /&gt;
| 29 || SetWirelessCommunicationEnabledForTest ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetEthernetCommunicationEnabledForTest ||&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [2.0.0+] GetTelemetorySystemEventReadableHandle ||&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [2.0.0+] GetTelemetryInfo ||&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [2.0.0+] ConfirmSystemAvailability ||&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [4.0.0+] SetBackgroundRequestEnabled ||&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [4.0.0+] GetScanData ||&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [4.0.0+] GetCurrentAccessPoint ||&lt;br /&gt;
|-&lt;br /&gt;
| 37 || [4.0.0+] Shutdown ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IScanRequest ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || Submit&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsProcessing&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetSystemEventReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IRequest ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || GetRequestState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSystemEventReadableHandles&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Submit&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SetRequirement&lt;br /&gt;
|-&lt;br /&gt;
| 6 || SetRequirementPreset&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetPriority&lt;br /&gt;
|-&lt;br /&gt;
| 9 || SetNetworkProfileId&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetRejectable&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetConnectionConfirmationOption&lt;br /&gt;
|-&lt;br /&gt;
| 12 || SetPersistent&lt;br /&gt;
|-&lt;br /&gt;
| 13 || SetInstant&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetSustainable&lt;br /&gt;
|-&lt;br /&gt;
| 15 || SetRawPriority&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetGreedy&lt;br /&gt;
|-&lt;br /&gt;
| 17 || SetSharable&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetRequirementByRevision&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetRequirement&lt;br /&gt;
|-&lt;br /&gt;
| 20 || GetRevision&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetAppletInfo&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetAdditionalInfo&lt;br /&gt;
|-&lt;br /&gt;
| 23 || SetKeptInSleep&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSocketDescriptor&lt;br /&gt;
|-&lt;br /&gt;
| 25 || UnregisterSocketDescriptor&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== INetworkProfile ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|- &lt;br /&gt;
| 0 || Update&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Persist ([3.0.0+] PersistOld)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [3.0.0+] Persist&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nifm:s =&lt;br /&gt;
Same as [[#nifm:a|nifm:a]].&lt;br /&gt;
&lt;br /&gt;
= nifm:u =&lt;br /&gt;
Same as [[#nifm:a|nifm:a]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=3267</id>
		<title>Settings services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=3267"/>
		<updated>2017-12-25T23:26:09Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= set =&lt;br /&gt;
This is &amp;quot;nn::settings::ISettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAvailableLanguageCodes&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] MakeLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAvailableLanguageCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetRegionCode&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] GetAvailableLanguageCodes2&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetAvailableLanguageCodeCount2&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [4.0.0+] GetKeyCodeMap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:fd =&lt;br /&gt;
This is &amp;quot;nn::settings::IFirmwareDebugSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ResetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateSettingsItemKeyIterator || Returns an [[#ISettingsItemKeyIterator]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [4.0.0+] ReadSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [4.0.0+] ResetSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] SetWebInspectorFlag ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetAllowedSslHosts ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [4.0.0+] SetHostFsMountPoint ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISettingsItemKeyIterator ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GoNext&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetKeySize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:cal =&lt;br /&gt;
This is &amp;quot;nn::settings::IFactorySettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBluetoothBdAddress&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetConfigurationId1&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAccelerometerOffset&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAccelerometerScale&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetGyroscopeOffset&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGyroscopeScale&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetWirelessLanMacAddress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetWirelessLanCountryCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetWirelessLanCountryCodes&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSerialNumber&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#GetEciDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [[#GetEticketDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#GetSslKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#GetSslCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [[#GetGameCardKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#GetGameCardCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#GetEciDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetEticketDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetSpeakerParameter&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [4.0.0+] GetLcdVendorId&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Used for accessing data calibrated at the factory.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x180.&lt;br /&gt;
&lt;br /&gt;
Returns the device certificate (ECC signed). This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x240.&lt;br /&gt;
&lt;br /&gt;
Returns the ETicket certificate (RSA signed).&lt;br /&gt;
&lt;br /&gt;
== GetSslKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended SSL key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal SSL key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetSslCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x804.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the plaintext SSL certificate.&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetGameCardKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended GameCard key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal GameCard key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetGameCardCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x404.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the GameCard certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey ==&lt;br /&gt;
Returns the extended device ECC-B233 key (0x50 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal device ECC-B233 key (0x30 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x244.&lt;br /&gt;
&lt;br /&gt;
Returns the extended ETicket RSA-2048 key (0x240 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal ETicket RSA-2048 key (0x220 bytes).&lt;br /&gt;
&lt;br /&gt;
== setcal Container Structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Size (same size used for decryption if needed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| {above size}&lt;br /&gt;
| Actual data starts here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This container is used for returning data with variable sizes.&lt;br /&gt;
&lt;br /&gt;
= set:sys =&lt;br /&gt;
This is &amp;quot;nn::settings::ISystemSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetFirmwareVersion]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] GetFirmwareVersion2&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 20 || SetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 22 || SetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 23 || GetColorSetId&lt;br /&gt;
|-&lt;br /&gt;
| 24 || SetColorSetId&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 29 || GetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 32 || SetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 35 || GetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 36 || SetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 37 || GetSettingsItemValueSize&lt;br /&gt;
|-&lt;br /&gt;
| 38 || [[#GetSettingsItemValue]]&lt;br /&gt;
|-&lt;br /&gt;
| 39 || GetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 40 || SetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 42 || SetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 44 || SetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 45 || IsForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 46 || SetForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 47 || GetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 48 || SetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 50 || SetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 51 || GetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 53 || GetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 54 || SetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetWirelessCertificationFileSize&lt;br /&gt;
|-&lt;br /&gt;
| 56 || [[Flash_Filesystem#PRODINFOF|GetWirelessCertificationFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 57 || SetRegionCode&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 59 || SetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 60 || IsUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 61 || SetUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [[#GetDebugModeFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || GetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || SetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 66 || SetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 67 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [[#GetSerialNumber]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || GetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 70 || SetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 71 || GetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 72 || SetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 73 || GetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 74 || SetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 75 || GetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 76 || SetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 77 || GetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 78 || SetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 79 || GetProductModel&lt;br /&gt;
|-&lt;br /&gt;
| 80 || GetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 81 || SetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 82 || AcquireTelemetryDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 83 || GetTelemetryDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 84 || GetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 85 || SetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 86 || GetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 87 || SetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 88 || GetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 89 || SetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 90 || GetMiiAuthorId&lt;br /&gt;
|-&lt;br /&gt;
| 91 || SetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 92 || GetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 93 || AcquireFatalDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 94 || GetFatalDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [2.0.0+] GetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [2.0.0+] SetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [2.0.0+] GetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [2.0.0+] SetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [2.0.0+] GetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [2.0.0+] SetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [2.0.0+] GetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] SetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 103 || [3.0.0+] GetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 104 || [3.0.0+] SetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [3.0.0+] SetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 106 || [3.0.0+] GetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 107 || [3.0.0+] GetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 108 || [3.0.0+] SetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 109 || [3.0.0+] GetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [3.0.0+] SetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [3.0.0+] GetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [3.0.0+] SetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [3.0.0+] GetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [3.0.0+] SetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [3.0.0+] GetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [3.0.0+] SetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 117 || [3.0.0+] GetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 118 || [3.0.0+] SetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 119 || [3.0.0+] NeedsToUpdateHeadphoneVolume&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [3.0.0+] GetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 121 || [3.0.0+] SetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 122 || [4.0.0+] [[#GetServiceDiscoveryControlSettings]]&lt;br /&gt;
|-&lt;br /&gt;
| 123 || [4.0.0+] SetServiceDiscoveryControlSettings&lt;br /&gt;
|-&lt;br /&gt;
| 124 || [4.0.0+] GetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 125 || [4.0.0+] SetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 126 || [4.0.0+] GetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 127 || [4.0.0+] SetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 128 || [4.0.0+] GetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 129 || [4.0.0+] SetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 131 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 132 || [4.0.0+] GetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 133 || [4.0.0+] SetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 134 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 135 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 136 || [4.0.0+] GetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 137 || [4.0.0+] SetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 138 || [4.0.0+] GetWebInspectorFlag&lt;br /&gt;
|-&lt;br /&gt;
| 139 || [4.0.0+] GetAllowedSslHosts&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [4.0.0+] GetHostFsMountPoint&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Official user-processes get a new service session handle each time a set:sys cmd is used, with the session being closed aftewards.&lt;br /&gt;
&lt;br /&gt;
== GetFirmwareVersion ==&lt;br /&gt;
Takes a type-0x1A output buffer. User-processes use hard-coded size 0x100.&lt;br /&gt;
&lt;br /&gt;
If needed, reads the content of the [[System_Version_Title]] &amp;quot;/file&amp;quot; into state. This is only done once.&lt;br /&gt;
&lt;br /&gt;
Then the above 0x100-byte data is copied to the output buffer.&lt;br /&gt;
&lt;br /&gt;
== GetSettingsItemValue ==&lt;br /&gt;
Takes two type-0x19 input buffers and a type-0x6 output buffer. Returns an output u64 for the actual size written to the outbuf.&lt;br /&gt;
&lt;br /&gt;
The outbuf_size is compared with the config_size. When config_size is larger than outbuf_size, outbuf_size is used for the memcpy, otherwise config_size is used. Afterwards the size used for the memcpy is written to output(see above).&lt;br /&gt;
&lt;br /&gt;
If loading from main config fails, it will also attempt to load config from various state if the input strings match hard-coded strings.&lt;br /&gt;
&lt;br /&gt;
== GetDebugModeFlag ==&lt;br /&gt;
Returns an output u8.&lt;br /&gt;
&lt;br /&gt;
Loads the 1-byte config for &amp;lt;&amp;quot;settings_debug&amp;quot;, &amp;quot;is_debug_mode_enabled&amp;quot;&amp;gt;. If that fails, value 0x1 is written to output. This uses the same func as ReadSetting internally.&lt;br /&gt;
&lt;br /&gt;
Returned retval is always 0.&lt;br /&gt;
&lt;br /&gt;
== GetSerialNumber ==&lt;br /&gt;
Returns the 0x18-byte SerialNumber string.&lt;br /&gt;
&lt;br /&gt;
== GetServiceDiscoveryControlSettings ==&lt;br /&gt;
Returns 0x01 if [[Safemode|safemode]] needs to be launched.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=GRC_services&amp;diff=3257</id>
		<title>GRC services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=GRC_services&amp;diff=3257"/>
		<updated>2017-12-25T10:40:22Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;GRC (Game Recording) uses libstagefright and the NvMMLite TVMR library for writing [[4.0.0|recorded]] video to MP4s.&lt;br /&gt;
&lt;br /&gt;
Error reporting is done using the new [[NV_services#/dev/nverpt-ctrl|/dev/nverpt-ctrl]] ioctls.&lt;br /&gt;
&lt;br /&gt;
= grc:c =&lt;br /&gt;
&lt;br /&gt;
This is &amp;quot;nn::grcsrv::IGrcService&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetContinuousRecorder&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetGameMovieTrimmer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nn::grcsrv::IContinuousRecorder =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nn::grcsrv::IGameMovieTrimmer =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=3256</id>
		<title>Settings services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=3256"/>
		<updated>2017-12-24T23:11:33Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= set =&lt;br /&gt;
This is &amp;quot;nn::settings::ISettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAvailableLanguageCodes&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAvailableLanguageCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetRegionCode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:fd =&lt;br /&gt;
This is &amp;quot;nn::settings::IFirmwareDebugSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ResetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateSettingsItemKeyIterator || Returns an [[#ISettingsItemKeyIterator]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISettingsItemKeyIterator ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GoNext&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetKeySize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:cal =&lt;br /&gt;
This is &amp;quot;nn::settings::IFactorySettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBluetoothBdAddress&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetConfigurationId1&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAccelerometerOffset&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAccelerometerScale&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetGyroscopeOffset&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGyroscopeScale&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetWirelessLanMacAddress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetWirelessLanCountryCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetWirelessLanCountryCodes&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSerialNumber&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#GetEciDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [[#GetEticketDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#GetSslKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#GetSslCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [[#GetGameCardKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#GetGameCardCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#GetEciDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetEticketDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetSpeakerParameter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Used for accessing data calibrated at the factory.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x180.&lt;br /&gt;
&lt;br /&gt;
Returns the device certificate (ECC signed). This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x240.&lt;br /&gt;
&lt;br /&gt;
Returns the ETicket certificate (RSA signed).&lt;br /&gt;
&lt;br /&gt;
== GetSslKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended SSL key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal SSL key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetSslCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x804.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the plaintext SSL certificate.&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetGameCardKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended GameCard key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal GameCard key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetGameCardCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x404.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the GameCard certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey ==&lt;br /&gt;
Returns the extended device ECC-B233 key (0x50 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal device ECC-B233 key (0x30 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x244.&lt;br /&gt;
&lt;br /&gt;
Returns the extended ETicket RSA-2048 key (0x240 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal ETicket RSA-2048 key (0x220 bytes).&lt;br /&gt;
&lt;br /&gt;
== setcal Container Structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Size (same size used for decryption if needed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| {above size}&lt;br /&gt;
| Actual data starts here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This container is used for returning data with variable sizes.&lt;br /&gt;
&lt;br /&gt;
= set:sys =&lt;br /&gt;
This is &amp;quot;nn::settings::ISystemSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetFirmwareVersion]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetFirmwareVersion2&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 20 || SetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 22 || SetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 23 || GetColorSetId&lt;br /&gt;
|-&lt;br /&gt;
| 24 || SetColorSetId&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 29 || GetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 32 || SetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 35 || GetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 36 || SetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 37 || GetSettingsItemValueSize&lt;br /&gt;
|-&lt;br /&gt;
| 38 || [[#GetSettingsItemValue]]&lt;br /&gt;
|-&lt;br /&gt;
| 39 || GetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 40 || SetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 42 || SetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 44 || SetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 45 || IsForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 46 || SetForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 47 || GetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 48 || SetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 50 || SetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 51 || GetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 53 || GetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 54 || SetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetWirelessCertificationFileSize&lt;br /&gt;
|-&lt;br /&gt;
| 56 || [[Flash_Filesystem#PRODINFOF|GetWirelessCertificationFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 57 || SetRegionCode&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 59 || SetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 60 || IsUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 61 || SetUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [[#GetDebugModeFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || GetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || SetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 66 || SetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 67 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [[#GetSerialNumber]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || GetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 70 || SetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 71 || GetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 72 || SetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 73 || GetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 74 || SetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 75 || GetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 76 || SetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 77 || GetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 78 || SetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 79 || GetProductModel&lt;br /&gt;
|-&lt;br /&gt;
| 80 || GetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 81 || SetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 82 || AcquireTelemetryDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 83 || GetTelemetryDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 84 || GetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 85 || SetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 86 || GetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 87 || SetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 88 || GetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 89 || SetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 90 || GetMiiAuthorId&lt;br /&gt;
|-&lt;br /&gt;
| 91 || SetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 92 || GetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 93 || AcquireFatalDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 94 || GetFatalDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 95 || GetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 96 || SetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 97 || GetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 98 || SetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 99 || GetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 100 || SetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 102 || SetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 103 || GetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 104 || SetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 105 || SetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 106 || GetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 107 || GetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 108 || SetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 109 || GetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 110 || SetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 112 || SetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 113 || GetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 114 || SetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 115 || GetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 116 || SetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 117 || GetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 118 || SetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 119 || NeedsToUpdateHeadphoneVolume&lt;br /&gt;
|-&lt;br /&gt;
| 120 || GetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 121 || SetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 122 || [4.0.0+] GetServiceDiscoveryControlSettings (aka [[#GetSafemodeFlag]])&lt;br /&gt;
|-&lt;br /&gt;
| 123 || [4.0.0+] SetServiceDiscoveryControlSettings&lt;br /&gt;
|-&lt;br /&gt;
| 124 || [4.0.0+] GetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 125 || [4.0.0+] SetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 126 || [4.0.0+] GetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 127 || [4.0.0+] SetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 128 || [4.0.0+] GetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 129 || [4.0.0+] SetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 131 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 132 || [4.0.0+] GetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 133 || [4.0.0+] SetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 134 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 135 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 136 || [4.0.0+] GetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 137 || [4.0.0+] SetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 138 || [4.0.0+] GetWebInspectorFlag&lt;br /&gt;
|-&lt;br /&gt;
| 139 || [4.0.0+] GetAllowedSslHosts&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [4.0.0+] GetHostFsMountPoint&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Official user-processes get a new service session handle each time a set:sys cmd is used, with the session being closed aftewards.&lt;br /&gt;
&lt;br /&gt;
== GetFirmwareVersion ==&lt;br /&gt;
Takes a type-0x1A output buffer. User-processes use hard-coded size 0x100.&lt;br /&gt;
&lt;br /&gt;
If needed, reads the content of the [[System_Version_Title]] &amp;quot;/file&amp;quot; into state. This is only done once.&lt;br /&gt;
&lt;br /&gt;
Then the above 0x100-byte data is copied to the output buffer.&lt;br /&gt;
&lt;br /&gt;
== GetSettingsItemValue ==&lt;br /&gt;
Takes two type-0x19 input buffers and a type-0x6 output buffer. Returns an output u64 for the actual size written to the outbuf.&lt;br /&gt;
&lt;br /&gt;
The outbuf_size is compared with the config_size. When config_size is larger than outbuf_size, outbuf_size is used for the memcpy, otherwise config_size is used. Afterwards the size used for the memcpy is written to output(see above).&lt;br /&gt;
&lt;br /&gt;
If loading from main config fails, it will also attempt to load config from various state if the input strings match hard-coded strings.&lt;br /&gt;
&lt;br /&gt;
== GetDebugModeFlag ==&lt;br /&gt;
Returns an output u8.&lt;br /&gt;
&lt;br /&gt;
Loads the 1-byte config for &amp;lt;&amp;quot;settings_debug&amp;quot;, &amp;quot;is_debug_mode_enabled&amp;quot;&amp;gt;. If that fails, value 0x1 is written to output. This uses the same func as ReadSetting internally.&lt;br /&gt;
&lt;br /&gt;
Returned retval is always 0.&lt;br /&gt;
&lt;br /&gt;
== GetSerialNumber ==&lt;br /&gt;
Returns the 0x18-byte SerialNumber string.&lt;br /&gt;
&lt;br /&gt;
== GetSafemodeFlag ==&lt;br /&gt;
Returns 0x01 if [[Safemode|safemode]] needs to be launched. (officially &amp;quot;GetServiceDiscoveryControlSettings&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3238</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=3238"/>
		<updated>2017-12-24T01:17:31Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || MountCode || u64 TID + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsCodeMounted || u64 PID || Returns a bool (1 if code is mounted).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#SetFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ClearFsPermissions]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetFsPermissions ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== ClearFsPermissions ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying a RSA signature fails. This RSA signature seems to be the signature in the [[NPDM]] ACID. It then skips verifying what seems to be the second signature in the [[NCA_Format|NCA header]]. Note that if verifying the NPDM(?) signature is successful, and verifying that second signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#MountContent7]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystemImpl&lt;br /&gt;
|-&lt;br /&gt;
| 18 || MountSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] MountSaveDataReadOnly&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] ReadSaveDataFileSystemExtraDataWithSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 58 || ReadSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || OpenSaveDataInfoReader&lt;br /&gt;
|-&lt;br /&gt;
| 61 || OpenSaveDataIterator&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataThumbnailFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || MountImageDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || Returns an [[#IStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdByPath2 (returns extra byte)&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0+] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearFileSystemProxyErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] MountRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]],&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || MountContentType2 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || MountContentType5 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || MountContentType3 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || MountContentType4 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || MountContentType6 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || MountContentType7 || 1 || [[#MountContent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || ContentStorageAccess || 3 || [[#MountContentStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || ImageDirectoryAccess || 3 || [[#MountImageDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000084 || MountBisType28 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000080 || MountBisType29 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000008080 || MountBisType30 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000008080 || MountBisType31 || 3 || [[#MountBis]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000080 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0xC000000000200000 || SdCardAccess || 3 || [[#MountSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000010 || GameCardUser || 3 || [[#MountGameCardPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000040020 || SaveDataAccess0 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000028 || SystemSaveDataAccess0 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000000020 || SaveDataAccess1 || 3 || [[#MountSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000000020 || SystemSaveDataAccess1 || 3 || [[#MountSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000010082 || BisPartition0 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000010080 || BisPartition10 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010080 || BisPartition20 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000010080 || BisPartition21 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000010080 || BisPartition22 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || BisPartition23 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || BisPartition24 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || BisPartition25 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000000080 || BisPartition26 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000000084 || BisPartition27 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000000084 || BisPartition28 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000000080 || BisPartition29 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000080 || BisPartition30 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000080 || BisPartition31 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || BisPartition32 || 3 || [[#OpenBisPartition]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0xC000000000200000 || || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000100 || GameCard_System || 3 || [[#OpenGameCardPartition]],  [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000100008 || MountContent_System || 1 || [[#MountContent]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000400000 || HostAccess || 3 || [[#OpenHostFileSystemImpl]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || BisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || EraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || GameCardCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || GameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || GameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || GameCardAsic || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || SaveDataCreate || [[#CreateSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || SaveDataDelete0 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || SystemSaveDataCreate0 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || SystemSaveDataCreate1 || [[#CreateSystemSaveData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || SaveDataDelete1 || [[#DeleteSaveData]], [[#RegisterSaveDataAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || SaveDataIterators0 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || SaveDataIterators1 || [[#OpenSaveDataIterator]], [[#OpenSaveDataInfoIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000020000 || SaveThumbnails || [[#OpenSaveDataThumbnailFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000400 || PosixTime || [[#SetCurrentPosixTime]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000004060 || SaveDataExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000080000 || GlobalMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || SpeedEmulation || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Invalid || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0xC000000000800000 || PaddingFiles || [[#CreatePaddingFile]], [[#DeletePaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000001000000 || SaveData_Debug || [[#CorruptSaveDataForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000002000000 || SaveData_SystemManagement || [[#CreateSaveData]], [[#MountSaveData]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000004000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000008000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0x8000000010000000 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000000000800 || || &lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000000004020 || || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== MountContent7 ==&lt;br /&gt;
Takes an input u32 (same as [[#MountContent]]) and an u64 title-id. Web-applet loads the u32 from u32_table[inparam]. The in32 must be 4.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and the below &amp;quot;MountContent&amp;quot; as &amp;quot;MountContent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== MountContent ==&lt;br /&gt;
Takes a type-0x19 input buffer, an in32, and an input title-id.&lt;br /&gt;
&lt;br /&gt;
The in32 must be 5 if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The in32 must be 2..7.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from nsam [[NS_Services#GetContentNcaPath|GetContentNcaPath]].&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and in32=7.&lt;br /&gt;
&lt;br /&gt;
After the in32-specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When in32=5, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== MountBis ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 Bis partitionID(see below). Official user-process code sets instr[0] = 0 normally.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisPartition]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisPartition ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisPartition IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveData ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSystemSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardPartition ==&lt;br /&gt;
&lt;br /&gt;
Takes an input u32 (partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountGameCardPartition ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a gamecard [[Gamecard_Partition|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process can mount a given savedata at any given time (this includes systemsavedata).&lt;br /&gt;
&lt;br /&gt;
== MountSystemSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== MountContentStorage ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[Content_Manager_services#ReadEntryRaw]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveData ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes 0x10-bytes of input.&lt;br /&gt;
&lt;br /&gt;
Appears to be used to load the seed into FS-module state, since FS-module itself doesn&#039;t seem to have file-reading code to handle this itself.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module uses this with data read from a file.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || OpenFile&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || CleanDirectoryRecursively [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetFileTimeStampRaw [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
==OpenDirectory==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer and an input u64. Unknown what the u64 is for, doesn&#039;t(?) seem to affect output. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x300 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x300 || 0x4 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8? || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
s8 type: 0 = directory, 1 = file.&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] GetGameCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] Returns 0x40-bytes of output data.&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BindEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=BisPartitionID=&lt;br /&gt;
* 0: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 0.&lt;br /&gt;
* 10: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 1.&lt;br /&gt;
* Rest: see [[Flash_Filesystem|here]].&lt;br /&gt;
&lt;br /&gt;
=Save Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| ContentStorageId? 0 for SystemSaveData. 1 for SaveData. 2 for DeviceSaveData(with official user-processes all other fields are 0 for DeviceSaveData).&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=SaveCreate Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=DeviceSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
=BcatSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveData]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=GRC_services&amp;diff=3236</id>
		<title>GRC services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=GRC_services&amp;diff=3236"/>
		<updated>2017-12-24T01:06:07Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This appears to use libstagefright for writing [[4.0.0|recorded]] video to MP4s.&lt;br /&gt;
&lt;br /&gt;
=grc:c =&lt;br /&gt;
This is &amp;quot;nn::grcsrv::IContinuousRecorder&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Switch_System_Flaws&amp;diff=2829</id>
		<title>Switch System Flaws</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Switch_System_Flaws&amp;diff=2829"/>
		<updated>2017-10-17T17:59:52Z</updated>

		<summary type="html">&lt;p&gt;Hthh: Since you can discover bugs Nintendo found first :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
System Flaws are used to execute unofficial code (homebrew) on the Nintendo Switch. This page is a list of known and public Switch System Flaws.&lt;br /&gt;
&lt;br /&gt;
=List of Switch System Flaws=&lt;br /&gt;
&lt;br /&gt;
== Hardware == &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| No public hardware exploits &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System software ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Stage 1 Bootloader ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
|  Null-dereference in panic()&lt;br /&gt;
|  The Switch&#039;s stage 1 bootloader, on panic(), clears the stack and then attempts to clear the Security Engine. However, it does so by dereferencing a pointer to the SE in .bss (initially NULL), and this pointer doesn&#039;t get initialized until partway into the bootloader&#039;s main() after several functions that might panic() are called. Thus, a panic() caused prior to SE initialization would result in the SE pointer still being NULL when dereferenced. This would cause a data abort, causing the bootloader to clear the stack and then try to clear the security engine...dereferencing NULL again, over and over in a loop.&lt;br /&gt;
&lt;br /&gt;
In 3.0.0, this was fixed by moving the security engine initialization earlier in main(), before the first function that could potentially panic().&lt;br /&gt;
|  Infinite clear-the-stack-then-data-abort loop very early in boot, before SBK/other keyslots are cleared. Probably useless for anything more interesting.&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  Early July, 2017&lt;br /&gt;
|  July 30, 2017&lt;br /&gt;
|  Everyone who diff&#039;d 2.3.0 and 3.0.0 Package1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TrustZone ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
|  No public ARM TrustZone exploits &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| GetLastThreadInfo UAF&lt;br /&gt;
| GetLastThreadInfo syscall gets last-scheduled-KThread pointer from KScheduler object. This pointer is not reference counted, and can be pointing to a freed KThread.&lt;br /&gt;
| Nothing. There is a theoretical race that might leak from a KThread from a different process, but it&#039;s impossible to trigger practically.&lt;br /&gt;
| Unfixed&lt;br /&gt;
| &lt;br /&gt;
| 15 October&lt;br /&gt;
| 17 October&lt;br /&gt;
| plutoo&lt;br /&gt;
|-&lt;br /&gt;
| Bad irq_id check in CreateInterruptEvent&lt;br /&gt;
| CreateInterruptEvent syscall is designed to work only for irq_id &amp;gt;= 32. All irq_ids &amp;lt; 32 are &amp;quot;per-core&amp;quot; and reserved for kernel use (watchdog/scheduling/core communications).&lt;br /&gt;
On 1.0.0 you could supply irq_id &amp;lt; 32 and it would write outside the SharedIrqs table.&lt;br /&gt;
| You can register irq&#039;s in the Core3Irqs table, and thus register per-core irqs for core3, that are normally reserved for kernel. Useless.&lt;br /&gt;
| 2.0.0&lt;br /&gt;
| 2.0.0&lt;br /&gt;
| ~October&lt;br /&gt;
| 17 October&lt;br /&gt;
| plutoo&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== FIRM-package System Modules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Service access control bypass (sm:h, smhax, probably other names)&lt;br /&gt;
| Prior to [[3.0.1]], the &#039;&#039;service manager&#039;&#039; (sm) built-in system module treats a user as though it has full permissions if the user creates a new &amp;quot;sm:&amp;quot; port session but bypasses [[Services_API#Initialize|initialization]]. This is due to the other sm commands skipping the service ACL check for Pids &amp;lt;= 7 (i.e. all kernel bundled modules) and that skipping the initialization command leaves the Pid field uninitialized.&lt;br /&gt;
In [[3.0.1]], sm returns error code 0x415 if [[Services_API#Initialize|Initialize]] has not been called yet.&lt;br /&gt;
| Acquiring, registering, and unregistering arbitrary services&lt;br /&gt;
| [[3.0.1]]&lt;br /&gt;
| [[3.0.1]]&lt;br /&gt;
| May 2017&lt;br /&gt;
| August 17, 2017&lt;br /&gt;
| Everyone&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== System Modules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| Out-of-bounds array read for [[BCAT_Content_Container]] secret-data index&lt;br /&gt;
| The [[BCAT_Content_Container]] secret-data index is not validated at all. This is handled before the RSA-signature(?) is ever used. Since the field is an u8, a total of 0x800-bytes relative to the array start can be accessed.&lt;br /&gt;
This is not useful since the string loaded from this array is only involved with key-generation.&lt;br /&gt;
| &lt;br /&gt;
| Unknown&lt;br /&gt;
| [[2.0.0]]&lt;br /&gt;
| August 4, 2017&lt;br /&gt;
| August 6, 2017&lt;br /&gt;
| [[User: shinyquagsire23|Shiny Quagsire]], [[User:Yellows8|Yellows8]] (independently)&lt;br /&gt;
|-&lt;br /&gt;
|  OOB Read in NS system module (pl:utoohax, pl:utonium, maybe other names)&lt;br /&gt;
|  Prior to [[3.0.0]], pl:u (Shared Font services implemented in the NS sysmodule) service commands 1,2,3 took in a signed 32-bit index and returned that index of an array but did not check that index at all. This allowed for an arbitrary read within a 34-bit range (33-bit signed) from NS .bss. In [[3.0.0]], sending out of range indexes causes error code 0x60A to be returned.&lt;br /&gt;
|  Dumping full NS .text, .rodata and .data, infoleak, etc&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  April 2017&lt;br /&gt;
|  On exploit&#039;s fix in [[3.0.0]]&lt;br /&gt;
|  qlutoo, Reswitched team (independently)&lt;br /&gt;
|-&lt;br /&gt;
| Unchecked domain ID in common IPC code&lt;br /&gt;
| Prior to [[2.0.0]], object IDs in [[IPC_Marshalling#Domain_message|domain messages]] are not bounds checked. This out-of-bounds read could be exploited to brute-force ASLR and get PC control in some services that support domain messages.&lt;br /&gt;
|&lt;br /&gt;
| 2.0.0&lt;br /&gt;
| 2.0.0&lt;br /&gt;
| ~July 2017&lt;br /&gt;
| 20 July 2017‎&lt;br /&gt;
| hthh&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Bus_services&amp;diff=2690</id>
		<title>Bus services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Bus_services&amp;diff=2690"/>
		<updated>2017-10-06T07:07:11Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= gpio =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenSessionForDev]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#OpenSession]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#OpenSessionForTest]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || IsWakeEventActive &lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetWakeEventActiveFlagSet&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SetWakeEventActiveFlagSetForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenSessionForDev ==&lt;br /&gt;
Takes a raw GpioPadDescriptor and returns a [[#IPadSession]] session for it.&lt;br /&gt;
&lt;br /&gt;
== OpenSession ==&lt;br /&gt;
Same thing as OpenSessionForDev except the descriptor is looked up in the table below.&lt;br /&gt;
Returns an [[#IPadSession]] session.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GpioPadName || GpioPadDescriptor || Description || Direction || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0xCC || || || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x24 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || 0xDA || || || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || 0xDB || || || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || 0xDC || || || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || 0x25 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || 0x90 || || In || [[HID services]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || 0x91 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x96 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x97 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 6 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x78 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x93 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x7D || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x7C || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x7B || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x7A || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xBC || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xAE || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0xB9 || || In || [[HID services]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0xBD || || Out || [[HID services]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0xBE || Volume key || In || [[Boot2]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0xBF || Volume key || In || [[Boot2]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0xC0 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0xC1 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0xA9 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0xAA || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0xAD || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0xC8 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0xCA || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0xCB || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x4F || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x50 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0x51 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || 0x52 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || 0x54 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || 0x56 || || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2A || 0x57 || || || &lt;br /&gt;
|-&lt;br /&gt;
| .. || .. || .. || .. || ..&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenSessionForTest ==&lt;br /&gt;
Same as [[#OpenSession]] but panics on failure.&lt;br /&gt;
&lt;br /&gt;
== IPadSession ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDirection&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetDirection&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetInterruptMode&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetInterruptMode&lt;br /&gt;
|-&lt;br /&gt;
| 4 || SetInterruptEnable&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetInterruptEnable&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetInterruptStatus&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ClearInterruptStatus&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetValue&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetValue&lt;br /&gt;
|-&lt;br /&gt;
| 10 || BindInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 11 || UnbindInterrupt&lt;br /&gt;
|-&lt;br /&gt;
| 12 || SetDebounceEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetDebounceEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetDebounceTime&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetDebounceTime&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GpioPadDescriptor ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 7-5 || Controller index&lt;br /&gt;
|-&lt;br /&gt;
| 4-3 || Port index&lt;br /&gt;
|-&lt;br /&gt;
| 2-0 || Pin number&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= i2c =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenSessionForDev&lt;br /&gt;
|-&lt;br /&gt;
| 1 || OpenSession&lt;br /&gt;
|-&lt;br /&gt;
| 2 || HasDevice&lt;br /&gt;
|-&lt;br /&gt;
| 3 || HasDeviceForDev&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== II2cSession ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || Send&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Receive&lt;br /&gt;
|-&lt;br /&gt;
| 5 || ExecuteCommandList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= i2c:pcv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= uart =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Returns a u8/bool.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Returns a u8/bool.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Returns a u8/bool.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || || Returns a u8/bool.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || || Takes marshalled arguments.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || || Takes marshalled arguments.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetIPortSession ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 || || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IPortSession ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Takes marshalled arguments&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Takes marshalled arguments&lt;br /&gt;
|-&lt;br /&gt;
| 2 || || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || || Takes marshalled arguments&lt;br /&gt;
|-&lt;br /&gt;
| 4 || || Returns 2x u64. Both zero.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= pwm =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenSessionForDev&lt;br /&gt;
|-&lt;br /&gt;
| 1 || OpenSession&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IChannelSession ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetPeriod&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetPeriod&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetDuty&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetDuty&lt;br /&gt;
|-&lt;br /&gt;
| 4 || SetEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetEnabled&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2689</id>
		<title>Sockets services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2689"/>
		<updated>2017-10-06T06:54:38Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= bsd:u / bsd:s =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || RegisterClient (Initialize)&lt;br /&gt;
|-&lt;br /&gt;
| 1  || StartMonitoring&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Socket&lt;br /&gt;
|-&lt;br /&gt;
| 3  || SocketExempt&lt;br /&gt;
|-&lt;br /&gt;
| 4  || Open&lt;br /&gt;
|-&lt;br /&gt;
| 5  || Select&lt;br /&gt;
|-&lt;br /&gt;
| 6  || Poll&lt;br /&gt;
|-&lt;br /&gt;
| 7  || Sysctl&lt;br /&gt;
|-&lt;br /&gt;
| 8  || Recv&lt;br /&gt;
|-&lt;br /&gt;
| 9  || RecvFrom&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Send&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SendTo&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Accept&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Bind&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Connect&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetPeerName&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetSockName&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Listen&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Ioctl&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Fcntl&lt;br /&gt;
|-&lt;br /&gt;
| 21 || SetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Shutdown&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ShutdownAllSockets&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Close&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DuplicateSocket&lt;br /&gt;
|-&lt;br /&gt;
| 28 || GetResourceStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [3.0.0+] RecvMMsg&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [3.0.0+] SendMMsg&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= sfdnsres =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDnsAddressesPrivate&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetDnsAddressPrivate&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetHostByName&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetHostByAddr&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetHostStringError&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGaiStringError&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetAddrInfo&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetNameInfo&lt;br /&gt;
|-&lt;br /&gt;
| 8 || RequestCancelHandle&lt;br /&gt;
|-&lt;br /&gt;
| 9 || CancelSocketCall&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= nsd:u / nsd:a =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetSettingName&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetEnvironmentIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 13 || DeleteSettings&lt;br /&gt;
|-&lt;br /&gt;
| 14 || ImportSettings&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Resolve&lt;br /&gt;
|-&lt;br /&gt;
| 21 || ResolveEx&lt;br /&gt;
|-&lt;br /&gt;
| 30 || GetNasServiceSetting&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetNasServiceSettingEx&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetNasRequestFqdn&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetNasRequestFqdnEx&lt;br /&gt;
|-&lt;br /&gt;
| 42 || GetNasApiFqdn&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetNasApiFqdnEx&lt;br /&gt;
|-&lt;br /&gt;
| 50 || GetCurrentSetting&lt;br /&gt;
|-&lt;br /&gt;
| 60 || ReadSaveDataFromFsForTest&lt;br /&gt;
|-&lt;br /&gt;
| 61 || WriteSaveDataToFsForTest&lt;br /&gt;
|-&lt;br /&gt;
| 62 || DeleteSaveDataOfFsForTest&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2680</id>
		<title>Sockets services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2680"/>
		<updated>2017-10-05T01:06:47Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= bsd:u =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || RegisterClient (Initialize)&lt;br /&gt;
|-&lt;br /&gt;
| 1  || StartMonitoring&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Socket&lt;br /&gt;
|-&lt;br /&gt;
| 3  || SocketExempt&lt;br /&gt;
|-&lt;br /&gt;
| 4  || Open&lt;br /&gt;
|-&lt;br /&gt;
| 5  || Select&lt;br /&gt;
|-&lt;br /&gt;
| 6  || Poll&lt;br /&gt;
|-&lt;br /&gt;
| 7  || Sysctl&lt;br /&gt;
|-&lt;br /&gt;
| 8  || Recv&lt;br /&gt;
|-&lt;br /&gt;
| 9  || RecvFrom&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Send&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SendTo&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Accept&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Bind&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Connect&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetPeerName&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetSockName&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Listen&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Ioctl&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Fcntl&lt;br /&gt;
|-&lt;br /&gt;
| 21 || SetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Shutdown&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ShutdownAllSockets&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Close&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DuplicateSocket&lt;br /&gt;
|-&lt;br /&gt;
| 28 || GetResourceStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [3.0.0+] RecvMMsg&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [3.0.0+] SendMMsg&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2679</id>
		<title>Sockets services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=2679"/>
		<updated>2017-10-05T00:37:10Z</updated>

		<summary type="html">&lt;p&gt;Hthh: /* bsd:u */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= bsd:u =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || RegisterClient (Initialize)&lt;br /&gt;
|-&lt;br /&gt;
| 1  || StartMonitoring&lt;br /&gt;
|-&lt;br /&gt;
| 2  || Socket&lt;br /&gt;
|-&lt;br /&gt;
| 3  || SocketExempt&lt;br /&gt;
|-&lt;br /&gt;
| 4  || Open&lt;br /&gt;
|-&lt;br /&gt;
| 5  || Select&lt;br /&gt;
|-&lt;br /&gt;
| 6  || Poll&lt;br /&gt;
|-&lt;br /&gt;
| 7  || Sysctl&lt;br /&gt;
|-&lt;br /&gt;
| 8  || Recv&lt;br /&gt;
|-&lt;br /&gt;
| 9  || RecvFrom&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Send&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SendTo&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Accept&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Bind&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Connect&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetPeerName&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetSockName&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Listen&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Ioctl&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Fcntl&lt;br /&gt;
|-&lt;br /&gt;
| 21 || SetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Shutdown&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ShutdownAllSockets&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Close&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DuplicateSocket&lt;br /&gt;
|-&lt;br /&gt;
| 28 || GetResourceStatistics&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2571</id>
		<title>NV services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2571"/>
		<updated>2017-09-30T04:18:59Z</updated>

		<summary type="html">&lt;p&gt;Hthh: /* /dev/nvhost-dbg-gpu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Switch makes use of a customized NVIDIA driver.&lt;br /&gt;
&lt;br /&gt;
= nvdrv, nvdrv:a, nvdrv:s, nvdrv:t =&lt;br /&gt;
Main NVIDIA driver service.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Open]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Ioctl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#Close]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || QueryEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || MapSharedMem&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetStatus&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ForceSetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 9 || DumpGraphicsMemoryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] Ioctl2&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0+] Ioctl3&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Open ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
| 2-4 || Type 5 descriptor: Device path&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ioctl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x11100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000C0B&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x21 descriptor: Input buffer&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x22 descriptor: Output buffer&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (1)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Ioctl Cmd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Close ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000009&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (2)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x80000009&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Current process&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Shared memory mirror&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (3)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Shared memory size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Webkit applet creates the shared memory with perm = 0 and size 0x300000.&lt;br /&gt;
&lt;br /&gt;
= Ioctls =&lt;br /&gt;
The ioctl number is generated with the following primitive (see Linux kernel):&lt;br /&gt;
&lt;br /&gt;
 #define _IOC(inout, group, num, len) \&lt;br /&gt;
    (inout | ((len &amp;amp; IOCPARM_MASK) &amp;lt;&amp;lt; 16) | ((group) &amp;lt;&amp;lt; 8) | (num))&lt;br /&gt;
&lt;br /&gt;
The following table contains known ioctls.&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080014 || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040015 || In || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_INCR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0016 || Inout || 12 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080017 || In || 8 || [[#NVHOST_IOCTL_CTRL_MODULE_MUTEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180018 || Inout || 24 || [[#NVHOST_IOCTL_CTRL_MODULE_REGRDWR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100019 || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAITEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008001A || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC183001B || Inout || 387 || NVHOST_IOCTL_CTRL_GET_CONFIG ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_SIGNAL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_REGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_UNREGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_EVENT_KILL]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_INCR ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAIT ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_MUTEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __lock;        // in (0==unlock; 1==lock)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_REGRDWR ===&lt;br /&gt;
Identical to Linux driver. Uses 32-bit version and doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;           // in&lt;br /&gt;
    u32 __num_offsets;  // in&lt;br /&gt;
    u32 __block_size;   // in&lt;br /&gt;
    u32 __offsets;      // in&lt;br /&gt;
    u32 __values;       // in&lt;br /&gt;
    u32 __write;        // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAITEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
    u32 __value;       // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_SIGNAL ===&lt;br /&gt;
Signals an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT ===&lt;br /&gt;
Waits on an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC ===&lt;br /&gt;
Waits on an event (async version). Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_REGISTER ===&lt;br /&gt;
Registers an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_UNREGISTER ===&lt;br /&gt;
Unregisters an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_KILL ===&lt;br /&gt;
Kills events. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __events;      // in (64-bit flag where each bit represents one event)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvmap ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080101 || Inout || 8 || [[#NVMAP_IOC_CREATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000102 || - || 0 || NVMAP_IOC_CLAIM || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080103 || Inout || 8 || [[#NVMAP_IOC_FROM_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0200104 || Inout || 32 || [[#NVMAP_IOC_ALLOC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180105 || Inout || 24 || [[#NVMAP_IOC_FREE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280106 || Inout || 40 || NVMAP_IOC_MMAP || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280107 || Inout || 40 || NVMAP_IOC_WRITE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280108 || Inout || 40 || NVMAP_IOC_READ || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0109 || Inout || 12 || [[#NVMAP_IOC_PARAM]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010A || Inout || 16 || NVMAP_IOC_PIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010B || Inout || 16 || NVMAP_IOC_UNPIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010C || Inout || 8 || NVMAP_IOC_CACHE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010D || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010E || Inout || 8 || [[#NVMAP_IOC_GET_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010F || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040110 || In || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000111 || - || 0 || || Returns NotSupported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_CREATE ===&lt;br /&gt;
Creates an nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __size;   // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FROM_ID ===&lt;br /&gt;
Get handle to an existing nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_ALLOC ===&lt;br /&gt;
Allocate memory for the nvmap object. Nintendo extended this one with 16 bytes, and changed it from in to inout.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __heapmask; // in&lt;br /&gt;
    u32 __flags;    // in (0=read-only, 1=read-write)&lt;br /&gt;
    u32 __align;    // in&lt;br /&gt;
    u8  __kind;     // in&lt;br /&gt;
    u8  __pad[7];&lt;br /&gt;
    u64 __addr;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FREE ===&lt;br /&gt;
This one is completely custom. Partly because the Linux driver passed the handle as the ioctl &amp;quot;arg-ptr&amp;quot;, and HIPC can&#039;t handle that voodoo.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    u64 __refcount; // out&lt;br /&gt;
    u32 __size;     // out&lt;br /&gt;
    u32 __flags;    // out, 1=NOT_FREED_YET&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_PARAM ===&lt;br /&gt;
Returns info about a nvmap object. Identical to Linux driver, but extended with further params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
    u32 __param;  // in, 1=SIZE, 2=ALIGNMENT, 3=BASE (returns error), 4=HEAP (always 0x40000000), 5=KIND, 6=COMPR (unused)&lt;br /&gt;
    u32 __result; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_GET_ID ===&lt;br /&gt;
Returns an id for a nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // out&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040212 || Out || 4 || TEGRA_DC_EXT_CONTROL_GET_NUM_OUTPUTS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0140213 || Inout || 20 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_PROPERTIES ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC1100214 || Inout || 272 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040216 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040217 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100218 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100219 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040220 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT4 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040201 || In || 4 || TEGRA_DC_EXT_GET_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040202 || In || 4 || TEGRA_DC_EXT_PUT_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4C80203 || In || 1224 || TEGRA_DC_EXT_FLIP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80380204 || Out || 56 || TEGRA_DC_EXT_GET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40380205 || Out || 56 || TEGRA_DC_EXT_SET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x430C0206 || In || 780 || TEGRA_DC_EXT_SET_LUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010207 || In || 1 || TEGRA_DC_EXT_ENABLE_DISABLE_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040208 || Out || 4 || TEGRA_DC_EXT_GET_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040209 || Out || 4 || TEGRA_DC_EXT_GET_HEAD_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC038020A || Inout || 56 || TEGRA_DC_EXT_VALIDATE_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4018020B || In || 24 || TEGRA_DC_EXT_SET_CSC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020C || Inout || 4 || TEGRA_DC_EXT_GET_VBLANK_SYNCPT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8040020D || Out || 64 || TEGRA_DC_EXT_GET_UNDERFLOWS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC99A020E || Inout || 2458 || TEGRA_DC_EXT_SET_CMU ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020F || Inout || 4 || TEGRA_DC_EXT_DPMS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80600210 || Out || 96 || TEGRA_DC_EXT_GET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40600211 || In || 96 || TEGRA_DC_EXT_SET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEBFC0215 || Inout || 11260 || TEGRA_DC_EXT_GET_MODE_DB ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC003021A || Inout || 3 || TEGRA_DC_EXT_PANEL_GET_VENDOR_ID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C021B || Out || 60 || TEGRA_DC_EXT_GET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x403C021C || In || 60 || TEGRA_DC_EXT_SET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC03C021D || Inout || 60  || TEGRA_DC_EXT_VALIDATE_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEF20021E || Inout || 12064 || TEGRA_DC_EXT_GET_MODE_DB2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004021F || Inout || 4 || TEGRA_DC_EXT_GET_WINMASK ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvcec-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010300 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhdcp_up-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880401 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880402 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010403 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010501 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010502 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x42040503 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C0504 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvsched-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000601 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000602 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180603 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180604 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080605 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080606 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080607 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180608 || In || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100609 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010060A || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060B || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8001060C || Out || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8010060D || Out || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x400C060E || In || 12 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060F || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100610 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100611 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-as-gpu ==&lt;br /&gt;
Each fd opened to this device creates an address space. An address space is then later bound with a channel.&lt;br /&gt;
&lt;br /&gt;
Once a nvgpu channel has been bound to an address space it cannot be unbound. There is no support for allowing an nvgpu channel to change from one address space to another (or from one to none).&lt;br /&gt;
                                                                                                                              &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044101 || In || 4 || [[#NVGPU_AS_IOCTL_BIND_CHANNEL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184102 || Inout || 24 || [[#NVGPU_AS_IOCTL_ALLOC_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104103 || Inout || 16 || [[#NVGPU_AS_IOCTL_FREE_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184104 || Inout || 24 || [[#NVGPU_AS_IOCTL_MAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084105 || Inout || 8 || [[#NVGPU_AS_IOCTL_UNMAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_INITIALIZE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_INITIALIZE_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0144114 || Inout || 20 || NVGPU_AS_IOCTL_REMAP ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_BIND_CHANNEL ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __fd; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_ALLOC_SPACE ===&lt;br /&gt;
This one reserves pages in the device address space.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
    u32 __flags;     // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;  // out&lt;br /&gt;
      u64 __align;   // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_FREE_SPACE ===&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;        // in, 4 works&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u32 __nvmap_handle; // in&lt;br /&gt;
    u32 __page_size;    // inout, 0 means don&#039;t care&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;     // out&lt;br /&gt;
      u64 __align;      // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER_EX ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;          // in, 4 works&lt;br /&gt;
    u32 __kind;           // in, -1 is default&lt;br /&gt;
    u32 __nvmap_handle;   // in&lt;br /&gt;
    u32 __page_size;      // inout, 0 means don&#039;t care&lt;br /&gt;
    u64 __buffer_offset;  // in&lt;br /&gt;
    u64 __mapping_size;   // in&lt;br /&gt;
    u64 __offset;         // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_UNMAP_BUFFER ===&lt;br /&gt;
Doesn&#039;t do shit.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable).&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_GET_VA_REGIONS ===&lt;br /&gt;
Nintendo modified to get rid of pointer in struct.&lt;br /&gt;
&lt;br /&gt;
  struct va_region {&lt;br /&gt;
    u64 __offset;&lt;br /&gt;
    u32 __page_size;&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u64 __pages;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64              __not_used;   // (contained output user ptr on linux, ignored)&lt;br /&gt;
    u32              __bufsize;    // inout, forced to 2*sizeof(struct va_region)&lt;br /&gt;
    u32              __reserved;&lt;br /&gt;
    struct va_region __regions[2]; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE_EX ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable) with extra params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
    u64 __unk0;            // in&lt;br /&gt;
    u64 __unk1;            // in&lt;br /&gt;
    u64 __unk2;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-dbg-gpu ==&lt;br /&gt;
Not accessible, but there is code to invoke it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084401 || In || 8 || NVGPU_DBG_GPU_IOCTL_BIND_CHANNEL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4402 || Inout || Variable || NVGPU_DBG_GPU_IOCTL_REG_OPS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084403 || In || 8 || NVGPU_DBG_GPU_IOCTL_EVENTS_CTRL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044404 || In || 4 || NVGPU_DBG_GPU_IOCTL_POWERGATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044405 || In || 4 || NVGPU_DBG_GPU_IOCTL_SMPC_CTXSW_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184407 || Inout || 24 || NVGPU_DBG_GPU_IOCTL_PERFBUF_MAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084408 || In || 8 || NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084409 || In || 8 || NVGPU_DBG_GPU_IOCTL_PC_SAMPLING ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008440A || In || 8 || NVGPU_DBG_GPU_IOCTL_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8008440B || Out || 8 || NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8004440C || Out || 4 || NVGPU_DBG_GPU_IOCTL_GET_GR_CONTEXT_SIZE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000440D || ? || ? || NVGPU_DBG_GPU_IOCTL_GET_GR_CONTEXT (uses Ioctl3)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl-gpu ==&lt;br /&gt;
This device is for global (context independent) operations on the gpu.  &lt;br /&gt;
                                                                                                                                               &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044701 || Out || 4 || NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80284702 || Out || 40 || NVGPU_GPU_IOCTL_ZCULL_GET_INFO ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x402C4703 || In || 44 || NVGPU_GPU_IOCTL_ZBC_SET_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0344704 || Inout || 52 || NVGPU_GPU_IOCTL_ZBC_QUERY_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0B04705 || Inout || 176 || [[#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184706 || Inout || 24 || NVGPU_GPU_IOCTL_GET_TPC_MASKS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084707 || In || 8 || [[#NVGPU_GPU_IOCTL_FLUSH_L2]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008470E || In || 8 || NVGPU_GPU_IOCTL_SET_MMUDEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010470F || In || 16 || NVGPU_GPU_IOCTL_SET_SM_DEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084710 || Inout || 8 || NVGPU_GPU_IOCTL_WAIT_FOR_PAUSE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084711 || Out || 8 || NVGPU_GPU_IOCTL_GET_TPC_EXCEPTION_EN_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084712 || Out || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044713 || Inout || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084714 || Out || 8 || [[#NVGPU_GPU_IOCTL_GET_L2_STATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044715 || Out || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8018471A || Out || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008471B || Inout || 8 || NVGPU_GPU_IOCTL_GET_ERROR_CHANNEL_USER_DATA ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010471C || Inout || 16 || NVGPU_GPU_IOCTL_GET_GPU_TIME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC108471D || Inout || 264 || NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_CHARACTERISTICS ===&lt;br /&gt;
Returns the GPU characteristics. Modified to return inline data instead of using a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct __gpu_characteristics {&lt;br /&gt;
    u32 __arch;                           // 0x120 (NVGPU_GPU_ARCH_GM200)&lt;br /&gt;
    u32 __impl;                           // 0xB (NVGPU_GPU_IMPL_GM20B)&lt;br /&gt;
    u32 __rev;                            // 0xA1 (Revision A1)&lt;br /&gt;
    u32 __num_gpc;                        // 0x1&lt;br /&gt;
    u64 __L2_cache_size;                  // 0x40000&lt;br /&gt;
    u64 __on_board_video_memory_size;     // 0x0 (not used)&lt;br /&gt;
    u32 __num_tpc_per_gpc;                // 0x2&lt;br /&gt;
    u32 __bus_type;                       // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)&lt;br /&gt;
    u32 __big_page_size;                  // 0x20000&lt;br /&gt;
    u32 __compression_page_size;          // 0x20000&lt;br /&gt;
    u32 __pde_coverage_bit_count;         // 0x1B&lt;br /&gt;
    u32 __available_big_page_sizes;       // 0x30000&lt;br /&gt;
    u32 __gpc_mask;                       // 0x1&lt;br /&gt;
    u32 __sm_arch_sm_version;             // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_spa_version;            // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_warp_count;             // 0x80&lt;br /&gt;
    u32 __gpu_va_bit_count;               // 0x28&lt;br /&gt;
    u32 __reserved;                       // NULL&lt;br /&gt;
    u64 __flags;                          // 0x55&lt;br /&gt;
    u32 __twod_class;                     // 0x902D (FERMI_TWOD_A)&lt;br /&gt;
    u32 __threed_class;                   // 0xB197 (MAXWELL_B)&lt;br /&gt;
    u32 __compute_class;                  // 0xB1C0 (MAXWELL_COMPUTE_B)&lt;br /&gt;
    u32 __gpfifo_class;                   // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)&lt;br /&gt;
    u32 __inline_to_memory_class;         // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)&lt;br /&gt;
    u32 __dma_copy_class;                 // 0xB0B5 (MAXWELL_DMA_COPY_A)&lt;br /&gt;
    u32 __max_fbps_count;                 // 0x1&lt;br /&gt;
    u32 __fbp_en_mask;                    // 0x0 (disabled)&lt;br /&gt;
    u32 __max_ltc_per_fbp;                // 0x2&lt;br /&gt;
    u32 __max_lts_per_ltc;                // 0x1&lt;br /&gt;
    u32 __max_tex_per_tpc;                // 0x0 (not supported)&lt;br /&gt;
    u32 __max_gpc_count;                  // 0x1&lt;br /&gt;
    u32 __rop_l2_en_mask_0;               // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)&lt;br /&gt;
    u32 __rop_l2_en_mask_1;               // 0x0&lt;br /&gt;
    u64 __chipname;                       // 0x6230326D67 (&amp;quot;gm20b&amp;quot;)&lt;br /&gt;
    u64 __gr_compbit_store_base_hw;       // 0x0 (not supported)&lt;br /&gt;
  };&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpu_characteristics_buf_size;   // in/out (must not be NULL, but gets overwritten with 0xA0=max_size)&lt;br /&gt;
    u64 __gpu_characteristics_buf_addr;   // in (ignored, but must not be NULL)&lt;br /&gt;
    struct __gpu_characteristics gc;      // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_FLUSH_L2 ===&lt;br /&gt;
Flushes the GPU L2 cache.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flush;          // in (l2_flush | l2_invalidate &amp;lt;&amp;lt; 1 | fb_flush &amp;lt;&amp;lt; 2)&lt;br /&gt;
    u32 __reserved;       // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_L2_STATE ===&lt;br /&gt;
Returns the GPU L2 cache state.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __mask;        // out (always 0x07)&lt;br /&gt;
    u32 __flush;       // out (active flush bit field)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Channels ==&lt;br /&gt;
Channels are a concept for  NVIDIA hardware blocks that share a common interface.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Path || Name&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-gpu ||&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-vic || Video Image Compositor&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvdec || Video Decoder&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvjpg || JPEG Decoder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Channel Ioctls ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0001 || Variable || NVHOST_IOCTL_CHANNEL_SUBMIT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080002 || 8 || NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080003 || 8 || NVHOST_IOCTL_CHANNEL_GET_WAITBASE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080004 || 8 || NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040007 || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080008 || 8 || NVHOST_IOCTL_CHANNEL_SET_CLK_RATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0009 || Variable || NVHOST_IOCTL_CHANNEL_MAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??000A || Variable || NVHOST_IOCTL_CHANNEL_UNMAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || 0 || ||&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40044801 || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044803 || 4 || NVGPU_IOCTL_CHANNEL_SET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084805 || 8 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044807 || 4 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4808 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104809 || 16 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010480B || 16 || NVGPU_IOCTL_CHANNEL_ZCULL_BIND ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC018480C || 24 || [[#NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4004480D || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_PRIORITY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480E || 0 || [[#NVGPU_IOCTL_CHANNEL_ENABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480F || 0 || [[#NVGPU_IOCTL_CHANNEL_DISABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004810 || 0 || [[#NVGPU_IOCTL_CHANNEL_PREEMPT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004811 || 0 || [[#NVGPU_IOCTL_CHANNEL_FORCE_RESET]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084812 || 8 || [[#NVGPU_IOCTL_CHANNEL_EVENTS_CTRL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104813 || 16 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80804816 || 128 || NVGPU_IOCTL_CHANNEL_GET_ERROR_INFO || Only works when the channel is busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104817 || 16 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40204818 || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4819 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC020481A || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2]] ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40084714 || 8 || NVGPU_IOCTL_CHANNEL_SET_USER_DATA || Sets an unknown user context address&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084715 || 8 || NVGPU_IOCTL_CHANNEL_GET_USER_DATA || Gets an unknown user context address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD ===&lt;br /&gt;
Binds a nvmap object to this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __nvmap_fd;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO ===&lt;br /&gt;
Allocates gpfifo entries. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO ===&lt;br /&gt;
Submits a gpfifo object. Modified to take inline entry objects instead of a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct fence {&lt;br /&gt;
    u32 __id;&lt;br /&gt;
    u32 __value;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct gpfifo_entry {&lt;br /&gt;
    u32 __entry0;&lt;br /&gt;
    u32 __entry1;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX ===&lt;br /&gt;
Allocates a graphics context object. Modified to ignore object&#039;s ID.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __class_num;    // in (0x902D=2d, 0xB197=3d, 0xB1C0=compute, 0xA140=kepler, 0xB0B5=DMA, 0xB06F=channel_gpfifo)&lt;br /&gt;
    u32 __flags;        // in&lt;br /&gt;
    u64 __obj_id;       // out (ignored; used for FREE_OBJ_CTX ioctl, which is not supported)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER ===&lt;br /&gt;
Initializes the error notifier for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u64 __size;      // in&lt;br /&gt;
    u32 __mem;       // in (nvmap object handle)&lt;br /&gt;
    u32 __padding;   // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_PRIORITY ===&lt;br /&gt;
Change channel&#039;s priority. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __priority;    // in (0x32 is low, 0x64 is medium and 0x96 is high)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ENABLE ===&lt;br /&gt;
Enables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_DISABLE ===&lt;br /&gt;
Disables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_PREEMPT ===&lt;br /&gt;
Clears the FIFO pipe for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_FORCE_RESET ===&lt;br /&gt;
Forces the channel to reset. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_EVENTS_CTRL ===&lt;br /&gt;
Controls event notifications. Modified to take an additional argument.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __cmd;    // in (0=disable, 1=enable, 2=clear)&lt;br /&gt;
    u32 __unk;    // in (accepts 1 or 2)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_GET_ERROR ===&lt;br /&gt;
Returns the current error notification caught by the error notifier. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __timestamp;    // out (nanoseconds since Jan. 1, 1970)&lt;br /&gt;
    u32 __info32;       // out (error code)&lt;br /&gt;
    u16 __info16;       // out (additional error info)&lt;br /&gt;
    u16 __status;       // inout (always 0xFFFF)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
    u32 __unk0;            // in (1 works)&lt;br /&gt;
    u32 __unk1;            // in&lt;br /&gt;
    u32 __unk2;            // in&lt;br /&gt;
    u32 __unk3;            // in&lt;br /&gt;
    u32 __unk4;            // in&lt;br /&gt;
    u32 __unk5;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_EX ===&lt;br /&gt;
Submits a gpfifo object (async version). Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2 ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters and returns a fence. Exclusive to the Switch.&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;         // in&lt;br /&gt;
    u32 __flags;               // in&lt;br /&gt;
    u32 __unk0;                // in (1 works)&lt;br /&gt;
    struct fence __fence_out;  // out&lt;br /&gt;
    u32 __unk1;                // in&lt;br /&gt;
    u32 __unk2;                // in&lt;br /&gt;
    u32 __unk3;                // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
= nvmemp =&lt;br /&gt;
NVIDIA memory profiler (this service is not available on retail units).&lt;br /&gt;
&lt;br /&gt;
= nvdrvdbg =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#CloseLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#ReadLog]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenLog ==&lt;br /&gt;
Takes process handle. Returns an fd.&lt;br /&gt;
&lt;br /&gt;
== CloseLog ==&lt;br /&gt;
Takes fd and closes it.&lt;br /&gt;
&lt;br /&gt;
== ReadLog ==&lt;br /&gt;
Takes fd and reads log into a type-6 buffer.&lt;br /&gt;
&lt;br /&gt;
= Errors =&lt;br /&gt;
Most nvidia driver commands return an error code apart from the normal return code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Success&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NotImplemented&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NotInitialized&lt;br /&gt;
|-&lt;br /&gt;
| 4 || BadParameter&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Timeout&lt;br /&gt;
|-&lt;br /&gt;
| 6 || InsufficientMemory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ReadOnlyAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 8 || InvalidState&lt;br /&gt;
|-&lt;br /&gt;
| 9 || InvalidAddress&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || InvalidSize&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || BadValue&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || AlreadyAllocated&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || Busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || ResourceError&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || CountMismatch&lt;br /&gt;
|-&lt;br /&gt;
| 0x1000 || SharedMemoryTooSmall&lt;br /&gt;
|-&lt;br /&gt;
| 0x30003 || FileOperationFailed&lt;br /&gt;
|-&lt;br /&gt;
| 0x3000F || IoctlFailed                        &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2570</id>
		<title>NV services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2570"/>
		<updated>2017-09-30T01:35:20Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Switch makes use of a customized NVIDIA driver.&lt;br /&gt;
&lt;br /&gt;
= nvdrv, nvdrv:a, nvdrv:s, nvdrv:t =&lt;br /&gt;
Main NVIDIA driver service.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Open]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Ioctl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#Close]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || QueryEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || MapSharedMem&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetStatus&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ForceSetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 9 || DumpGraphicsMemoryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] Ioctl2&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0+] Ioctl3&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Open ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
| 2-4 || Type 5 descriptor: Device path&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ioctl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x11100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000C0B&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x21 descriptor: Input buffer&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x22 descriptor: Output buffer&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (1)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Ioctl Cmd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Close ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000009&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (2)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x80000009&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Current process&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Shared memory mirror&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (3)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Shared memory size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Webkit applet creates the shared memory with perm = 0 and size 0x300000.&lt;br /&gt;
&lt;br /&gt;
= Ioctls =&lt;br /&gt;
The ioctl number is generated with the following primitive (see Linux kernel):&lt;br /&gt;
&lt;br /&gt;
 #define _IOC(inout, group, num, len) \&lt;br /&gt;
    (inout | ((len &amp;amp; IOCPARM_MASK) &amp;lt;&amp;lt; 16) | ((group) &amp;lt;&amp;lt; 8) | (num))&lt;br /&gt;
&lt;br /&gt;
The following table contains known ioctls.&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080014 || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040015 || In || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_INCR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0016 || Inout || 12 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080017 || In || 8 || [[#NVHOST_IOCTL_CTRL_MODULE_MUTEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180018 || Inout || 24 || [[#NVHOST_IOCTL_CTRL_MODULE_REGRDWR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100019 || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAITEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008001A || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC183001B || Inout || 387 || NVHOST_IOCTL_CTRL_GET_CONFIG ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_SIGNAL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_REGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_UNREGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_EVENT_KILL]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_INCR ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAIT ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_MUTEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __lock;        // in (0==unlock; 1==lock)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_REGRDWR ===&lt;br /&gt;
Identical to Linux driver. Uses 32-bit version and doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;           // in&lt;br /&gt;
    u32 __num_offsets;  // in&lt;br /&gt;
    u32 __block_size;   // in&lt;br /&gt;
    u32 __offsets;      // in&lt;br /&gt;
    u32 __values;       // in&lt;br /&gt;
    u32 __write;        // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAITEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
    u32 __value;       // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_SIGNAL ===&lt;br /&gt;
Signals an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT ===&lt;br /&gt;
Waits on an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC ===&lt;br /&gt;
Waits on an event (async version). Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_REGISTER ===&lt;br /&gt;
Registers an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_UNREGISTER ===&lt;br /&gt;
Unregisters an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_KILL ===&lt;br /&gt;
Kills events. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __events;      // in (64-bit flag where each bit represents one event)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvmap ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080101 || Inout || 8 || [[#NVMAP_IOC_CREATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000102 || - || 0 || NVMAP_IOC_CLAIM || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080103 || Inout || 8 || [[#NVMAP_IOC_FROM_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0200104 || Inout || 32 || [[#NVMAP_IOC_ALLOC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180105 || Inout || 24 || [[#NVMAP_IOC_FREE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280106 || Inout || 40 || NVMAP_IOC_MMAP || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280107 || Inout || 40 || NVMAP_IOC_WRITE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280108 || Inout || 40 || NVMAP_IOC_READ || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0109 || Inout || 12 || [[#NVMAP_IOC_PARAM]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010A || Inout || 16 || NVMAP_IOC_PIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010B || Inout || 16 || NVMAP_IOC_UNPIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010C || Inout || 8 || NVMAP_IOC_CACHE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010D || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010E || Inout || 8 || [[#NVMAP_IOC_GET_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010F || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040110 || In || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000111 || - || 0 || || Returns NotSupported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_CREATE ===&lt;br /&gt;
Creates an nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __size;   // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FROM_ID ===&lt;br /&gt;
Get handle to an existing nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_ALLOC ===&lt;br /&gt;
Allocate memory for the nvmap object. Nintendo extended this one with 16 bytes, and changed it from in to inout.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __heapmask; // in&lt;br /&gt;
    u32 __flags;    // in (0=read-only, 1=read-write)&lt;br /&gt;
    u32 __align;    // in&lt;br /&gt;
    u8  __kind;     // in&lt;br /&gt;
    u8  __pad[7];&lt;br /&gt;
    u64 __addr;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FREE ===&lt;br /&gt;
This one is completely custom. Partly because the Linux driver passed the handle as the ioctl &amp;quot;arg-ptr&amp;quot;, and HIPC can&#039;t handle that voodoo.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    u64 __refcount; // out&lt;br /&gt;
    u32 __size;     // out&lt;br /&gt;
    u32 __flags;    // out, 1=NOT_FREED_YET&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_PARAM ===&lt;br /&gt;
Returns info about a nvmap object. Identical to Linux driver, but extended with further params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
    u32 __param;  // in, 1=SIZE, 2=ALIGNMENT, 3=BASE (returns error), 4=HEAP (always 0x40000000), 5=KIND, 6=COMPR (unused)&lt;br /&gt;
    u32 __result; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_GET_ID ===&lt;br /&gt;
Returns an id for a nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // out&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040212 || Out || 4 || TEGRA_DC_EXT_CONTROL_GET_NUM_OUTPUTS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0140213 || Inout || 20 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_PROPERTIES ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC1100214 || Inout || 272 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040216 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040217 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100218 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100219 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040220 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT4 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040201 || In || 4 || TEGRA_DC_EXT_GET_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040202 || In || 4 || TEGRA_DC_EXT_PUT_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4C80203 || In || 1224 || TEGRA_DC_EXT_FLIP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80380204 || Out || 56 || TEGRA_DC_EXT_GET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40380205 || Out || 56 || TEGRA_DC_EXT_SET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x430C0206 || In || 780 || TEGRA_DC_EXT_SET_LUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010207 || In || 1 || TEGRA_DC_EXT_ENABLE_DISABLE_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040208 || Out || 4 || TEGRA_DC_EXT_GET_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040209 || Out || 4 || TEGRA_DC_EXT_GET_HEAD_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC038020A || Inout || 56 || TEGRA_DC_EXT_VALIDATE_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4018020B || In || 24 || TEGRA_DC_EXT_SET_CSC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020C || Inout || 4 || TEGRA_DC_EXT_GET_VBLANK_SYNCPT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8040020D || Out || 64 || TEGRA_DC_EXT_GET_UNDERFLOWS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC99A020E || Inout || 2458 || TEGRA_DC_EXT_SET_CMU ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020F || Inout || 4 || TEGRA_DC_EXT_DPMS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80600210 || Out || 96 || TEGRA_DC_EXT_GET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40600211 || In || 96 || TEGRA_DC_EXT_SET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEBFC0215 || Inout || 11260 || TEGRA_DC_EXT_GET_MODE_DB ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC003021A || Inout || 3 || TEGRA_DC_EXT_PANEL_GET_VENDOR_ID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C021B || Out || 60 || TEGRA_DC_EXT_GET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x403C021C || In || 60 || TEGRA_DC_EXT_SET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC03C021D || Inout || 60  || TEGRA_DC_EXT_VALIDATE_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEF20021E || Inout || 12064 || TEGRA_DC_EXT_GET_MODE_DB2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004021F || Inout || 4 || TEGRA_DC_EXT_GET_WINMASK ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvcec-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010300 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhdcp_up-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880401 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880402 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010403 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010501 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010502 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x42040503 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C0504 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvsched-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000601 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000602 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180603 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180604 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080605 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080606 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080607 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180608 || In || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100609 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010060A || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060B || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8001060C || Out || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8010060D || Out || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x400C060E || In || 12 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060F || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100610 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100611 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-as-gpu ==&lt;br /&gt;
Each fd opened to this device creates an address space. An address space is then later bound with a channel.&lt;br /&gt;
&lt;br /&gt;
Once a nvgpu channel has been bound to an address space it cannot be unbound. There is no support for allowing an nvgpu channel to change from one address space to another (or from one to none).&lt;br /&gt;
                                                                                                                              &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044101 || In || 4 || [[#NVGPU_AS_IOCTL_BIND_CHANNEL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184102 || Inout || 24 || [[#NVGPU_AS_IOCTL_ALLOC_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104103 || Inout || 16 || [[#NVGPU_AS_IOCTL_FREE_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184104 || Inout || 24 || [[#NVGPU_AS_IOCTL_MAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084105 || Inout || 8 || [[#NVGPU_AS_IOCTL_UNMAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_INITIALIZE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_INITIALIZE_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0144114 || Inout || 20 || NVGPU_AS_IOCTL_REMAP ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_BIND_CHANNEL ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __fd; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_ALLOC_SPACE ===&lt;br /&gt;
This one reserves pages in the device address space.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
    u32 __flags;     // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;  // out&lt;br /&gt;
      u64 __align;   // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_FREE_SPACE ===&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;        // in, 4 works&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u32 __nvmap_handle; // in&lt;br /&gt;
    u32 __page_size;    // inout, 0 means don&#039;t care&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;     // out&lt;br /&gt;
      u64 __align;      // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER_EX ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;          // in, 4 works&lt;br /&gt;
    u32 __kind;           // in, -1 is default&lt;br /&gt;
    u32 __nvmap_handle;   // in&lt;br /&gt;
    u32 __page_size;      // inout, 0 means don&#039;t care&lt;br /&gt;
    u64 __buffer_offset;  // in&lt;br /&gt;
    u64 __mapping_size;   // in&lt;br /&gt;
    u64 __offset;         // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_UNMAP_BUFFER ===&lt;br /&gt;
Doesn&#039;t do shit.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable).&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_GET_VA_REGIONS ===&lt;br /&gt;
Nintendo modified to get rid of pointer in struct.&lt;br /&gt;
&lt;br /&gt;
  struct va_region {&lt;br /&gt;
    u64 __offset;&lt;br /&gt;
    u32 __page_size;&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u64 __pages;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64              __not_used;   // (contained output user ptr on linux, ignored)&lt;br /&gt;
    u32              __bufsize;    // inout, forced to 2*sizeof(struct va_region)&lt;br /&gt;
    u32              __reserved;&lt;br /&gt;
    struct va_region __regions[2]; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE_EX ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable) with extra params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
    u64 __unk0;            // in&lt;br /&gt;
    u64 __unk1;            // in&lt;br /&gt;
    u64 __unk2;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-dbg-gpu ==&lt;br /&gt;
Not accessible, but there is code to invoke it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084401 || In || 8 || NVGPU_DBG_GPU_IOCTL_BIND_CHANNEL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4402 || Inout || Variable || NVGPU_DBG_GPU_IOCTL_REG_OPS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084403 || In || 8 || NVGPU_DBG_GPU_IOCTL_EVENTS_CTRL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044404 || In || 4 || NVGPU_DBG_GPU_IOCTL_POWERGATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044405 || In || 4 || NVGPU_DBG_GPU_IOCTL_SMPC_CTXSW_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184407 || Inout || 24 || NVGPU_DBG_GPU_IOCTL_PERFBUF_MAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084408 || In || 8 || NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084409 || In || 8 || NVGPU_DBG_GPU_IOCTL_PC_SAMPLING ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008440A || In || 8 || NVGPU_DBG_GPU_IOCTL_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8008440B || Out || 8 || NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8004440C || Out || 8 || NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000440D || ? || ? || NVGPU_DBG_GPU_IOCTL_GET_GR_CONTEXT (uses Ioctl3)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl-gpu ==&lt;br /&gt;
This device is for global (context independent) operations on the gpu.  &lt;br /&gt;
                                                                                                                                               &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044701 || Out || 4 || NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80284702 || Out || 40 || NVGPU_GPU_IOCTL_ZCULL_GET_INFO ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x402C4703 || In || 44 || NVGPU_GPU_IOCTL_ZBC_SET_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0344704 || Inout || 52 || NVGPU_GPU_IOCTL_ZBC_QUERY_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0B04705 || Inout || 176 || [[#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184706 || Inout || 24 || NVGPU_GPU_IOCTL_GET_TPC_MASKS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084707 || In || 8 || [[#NVGPU_GPU_IOCTL_FLUSH_L2]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008470E || In || 8 || NVGPU_GPU_IOCTL_SET_MMUDEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010470F || In || 16 || NVGPU_GPU_IOCTL_SET_SM_DEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084710 || Inout || 8 || NVGPU_GPU_IOCTL_WAIT_FOR_PAUSE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084711 || Out || 8 || NVGPU_GPU_IOCTL_GET_TPC_EXCEPTION_EN_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084712 || Out || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044713 || Inout || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084714 || Out || 8 || [[#NVGPU_GPU_IOCTL_GET_L2_STATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044715 || Out || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8018471A || Out || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008471B || Inout || 8 || NVGPU_GPU_IOCTL_GET_ERROR_CHANNEL_USER_DATA ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010471C || Inout || 16 || NVGPU_GPU_IOCTL_GET_GPU_TIME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC108471D || Inout || 264 || NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_CHARACTERISTICS ===&lt;br /&gt;
Returns the GPU characteristics. Modified to return inline data instead of using a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct __gpu_characteristics {&lt;br /&gt;
    u32 __arch;                           // 0x120 (NVGPU_GPU_ARCH_GM200)&lt;br /&gt;
    u32 __impl;                           // 0xB (NVGPU_GPU_IMPL_GM20B)&lt;br /&gt;
    u32 __rev;                            // 0xA1 (Revision A1)&lt;br /&gt;
    u32 __num_gpc;                        // 0x1&lt;br /&gt;
    u64 __L2_cache_size;                  // 0x40000&lt;br /&gt;
    u64 __on_board_video_memory_size;     // 0x0 (not used)&lt;br /&gt;
    u32 __num_tpc_per_gpc;                // 0x2&lt;br /&gt;
    u32 __bus_type;                       // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)&lt;br /&gt;
    u32 __big_page_size;                  // 0x20000&lt;br /&gt;
    u32 __compression_page_size;          // 0x20000&lt;br /&gt;
    u32 __pde_coverage_bit_count;         // 0x1B&lt;br /&gt;
    u32 __available_big_page_sizes;       // 0x30000&lt;br /&gt;
    u32 __gpc_mask;                       // 0x1&lt;br /&gt;
    u32 __sm_arch_sm_version;             // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_spa_version;            // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_warp_count;             // 0x80&lt;br /&gt;
    u32 __gpu_va_bit_count;               // 0x28&lt;br /&gt;
    u32 __reserved;                       // NULL&lt;br /&gt;
    u64 __flags;                          // 0x55&lt;br /&gt;
    u32 __twod_class;                     // 0x902D (FERMI_TWOD_A)&lt;br /&gt;
    u32 __threed_class;                   // 0xB197 (MAXWELL_B)&lt;br /&gt;
    u32 __compute_class;                  // 0xB1C0 (MAXWELL_COMPUTE_B)&lt;br /&gt;
    u32 __gpfifo_class;                   // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)&lt;br /&gt;
    u32 __inline_to_memory_class;         // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)&lt;br /&gt;
    u32 __dma_copy_class;                 // 0xB0B5 (MAXWELL_DMA_COPY_A)&lt;br /&gt;
    u32 __max_fbps_count;                 // 0x1&lt;br /&gt;
    u32 __fbp_en_mask;                    // 0x0 (disabled)&lt;br /&gt;
    u32 __max_ltc_per_fbp;                // 0x2&lt;br /&gt;
    u32 __max_lts_per_ltc;                // 0x1&lt;br /&gt;
    u32 __max_tex_per_tpc;                // 0x0 (not supported)&lt;br /&gt;
    u32 __max_gpc_count;                  // 0x1&lt;br /&gt;
    u32 __rop_l2_en_mask_0;               // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)&lt;br /&gt;
    u32 __rop_l2_en_mask_1;               // 0x0&lt;br /&gt;
    u64 __chipname;                       // 0x6230326D67 (&amp;quot;gm20b&amp;quot;)&lt;br /&gt;
    u64 __gr_compbit_store_base_hw;       // 0x0 (not supported)&lt;br /&gt;
  };&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpu_characteristics_buf_size;   // in/out (must not be NULL, but gets overwritten with 0xA0=max_size)&lt;br /&gt;
    u64 __gpu_characteristics_buf_addr;   // in (ignored, but must not be NULL)&lt;br /&gt;
    struct __gpu_characteristics gc;      // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_FLUSH_L2 ===&lt;br /&gt;
Flushes the GPU L2 cache.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flush;          // in (l2_flush | l2_invalidate &amp;lt;&amp;lt; 1 | fb_flush &amp;lt;&amp;lt; 2)&lt;br /&gt;
    u32 __reserved;       // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_L2_STATE ===&lt;br /&gt;
Returns the GPU L2 cache state.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __mask;        // out (always 0x07)&lt;br /&gt;
    u32 __flush;       // out (active flush bit field)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Channels ==&lt;br /&gt;
Channels are a concept for  NVIDIA hardware blocks that share a common interface.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Path || Name&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-gpu ||&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-vic || Video Image Compositor&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvdec || Video Decoder&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvjpg || JPEG Decoder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Channel Ioctls ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0001 || Variable || NVHOST_IOCTL_CHANNEL_SUBMIT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080002 || 8 || NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080003 || 8 || NVHOST_IOCTL_CHANNEL_GET_WAITBASE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080004 || 8 || NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040007 || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080008 || 8 || NVHOST_IOCTL_CHANNEL_SET_CLK_RATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0009 || Variable || NVHOST_IOCTL_CHANNEL_MAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??000A || Variable || NVHOST_IOCTL_CHANNEL_UNMAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || 0 || ||&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40044801 || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044803 || 4 || NVGPU_IOCTL_CHANNEL_SET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084805 || 8 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044807 || 4 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4808 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104809 || 16 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010480B || 16 || NVGPU_IOCTL_CHANNEL_ZCULL_BIND ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC018480C || 24 || [[#NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4004480D || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_PRIORITY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480E || 0 || [[#NVGPU_IOCTL_CHANNEL_ENABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480F || 0 || [[#NVGPU_IOCTL_CHANNEL_DISABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004810 || 0 || [[#NVGPU_IOCTL_CHANNEL_PREEMPT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004811 || 0 || [[#NVGPU_IOCTL_CHANNEL_FORCE_RESET]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084812 || 8 || [[#NVGPU_IOCTL_CHANNEL_EVENTS_CTRL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104813 || 16 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80804816 || 128 || NVGPU_IOCTL_CHANNEL_GET_ERROR_INFO || Only works when the channel is busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104817 || 16 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40204818 || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4819 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC020481A || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2]] ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40084714 || 8 || NVGPU_IOCTL_CHANNEL_SET_USER_DATA || Sets an unknown user context address&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084715 || 8 || NVGPU_IOCTL_CHANNEL_GET_USER_DATA || Gets an unknown user context address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD ===&lt;br /&gt;
Binds a nvmap object to this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __nvmap_fd;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO ===&lt;br /&gt;
Allocates gpfifo entries. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO ===&lt;br /&gt;
Submits a gpfifo object. Modified to take inline entry objects instead of a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct fence {&lt;br /&gt;
    u32 __id;&lt;br /&gt;
    u32 __value;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct gpfifo_entry {&lt;br /&gt;
    u32 __entry0;&lt;br /&gt;
    u32 __entry1;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX ===&lt;br /&gt;
Allocates a graphics context object. Modified to ignore object&#039;s ID.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __class_num;    // in (0x902D=2d, 0xB197=3d, 0xB1C0=compute, 0xA140=kepler, 0xB0B5=DMA, 0xB06F=channel_gpfifo)&lt;br /&gt;
    u32 __flags;        // in&lt;br /&gt;
    u64 __obj_id;       // out (ignored; used for FREE_OBJ_CTX ioctl, which is not supported)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER ===&lt;br /&gt;
Initializes the error notifier for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u64 __size;      // in&lt;br /&gt;
    u32 __mem;       // in (nvmap object handle)&lt;br /&gt;
    u32 __padding;   // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_PRIORITY ===&lt;br /&gt;
Change channel&#039;s priority. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __priority;    // in (0x32 is low, 0x64 is medium and 0x96 is high)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ENABLE ===&lt;br /&gt;
Enables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_DISABLE ===&lt;br /&gt;
Disables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_PREEMPT ===&lt;br /&gt;
Clears the FIFO pipe for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_FORCE_RESET ===&lt;br /&gt;
Forces the channel to reset. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_EVENTS_CTRL ===&lt;br /&gt;
Controls event notifications. Modified to take an additional argument.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __cmd;    // in (0=disable, 1=enable, 2=clear)&lt;br /&gt;
    u32 __unk;    // in (accepts 1 or 2)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_GET_ERROR ===&lt;br /&gt;
Returns the current error notification caught by the error notifier. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __timestamp;    // out (nanoseconds since Jan. 1, 1970)&lt;br /&gt;
    u32 __info32;       // out (error code)&lt;br /&gt;
    u16 __info16;       // out (additional error info)&lt;br /&gt;
    u16 __status;       // inout (always 0xFFFF)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
    u32 __unk0;            // in (1 works)&lt;br /&gt;
    u32 __unk1;            // in&lt;br /&gt;
    u32 __unk2;            // in&lt;br /&gt;
    u32 __unk3;            // in&lt;br /&gt;
    u32 __unk4;            // in&lt;br /&gt;
    u32 __unk5;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_EX ===&lt;br /&gt;
Submits a gpfifo object (async version). Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2 ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters and returns a fence. Exclusive to the Switch.&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;         // in&lt;br /&gt;
    u32 __flags;               // in&lt;br /&gt;
    u32 __unk0;                // in (1 works)&lt;br /&gt;
    struct fence __fence_out;  // out&lt;br /&gt;
    u32 __unk1;                // in&lt;br /&gt;
    u32 __unk2;                // in&lt;br /&gt;
    u32 __unk3;                // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
= nvmemp =&lt;br /&gt;
NVIDIA memory profiler (this service is not available on retail units).&lt;br /&gt;
&lt;br /&gt;
= nvdrvdbg =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#CloseLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#ReadLog]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenLog ==&lt;br /&gt;
Takes process handle. Returns an fd.&lt;br /&gt;
&lt;br /&gt;
== CloseLog ==&lt;br /&gt;
Takes fd and closes it.&lt;br /&gt;
&lt;br /&gt;
== ReadLog ==&lt;br /&gt;
Takes fd and reads log into a type-6 buffer.&lt;br /&gt;
&lt;br /&gt;
= Errors =&lt;br /&gt;
Most nvidia driver commands return an error code apart from the normal return code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Success&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NotImplemented&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NotInitialized&lt;br /&gt;
|-&lt;br /&gt;
| 4 || BadParameter&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Timeout&lt;br /&gt;
|-&lt;br /&gt;
| 6 || InsufficientMemory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ReadOnlyAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 8 || InvalidState&lt;br /&gt;
|-&lt;br /&gt;
| 9 || InvalidAddress&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || InvalidSize&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || BadValue&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || AlreadyAllocated&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || Busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || ResourceError&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || CountMismatch&lt;br /&gt;
|-&lt;br /&gt;
| 0x1000 || SharedMemoryTooSmall&lt;br /&gt;
|-&lt;br /&gt;
| 0x30003 || FileOperationFailed&lt;br /&gt;
|-&lt;br /&gt;
| 0x3000F || IoctlFailed                        &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2569</id>
		<title>NV services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NV_services&amp;diff=2569"/>
		<updated>2017-09-30T01:12:57Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Switch makes use of a customized NVIDIA driver.&lt;br /&gt;
&lt;br /&gt;
= nvdrv, nvdrv:a, nvdrv:s, nvdrv:t =&lt;br /&gt;
Main NVIDIA driver service.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Open]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Ioctl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#Close]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || QueryEvent&lt;br /&gt;
|-&lt;br /&gt;
| 5 || MapSharedMem&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetStatus&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ForceSetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetClientPID&lt;br /&gt;
|-&lt;br /&gt;
| 9 || DumpGraphicsMemoryInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Open ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
| 2-4 || Type 5 descriptor: Device path&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ioctl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x11100004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000C0B&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x21 descriptor: Input buffer&lt;br /&gt;
|-&lt;br /&gt;
| ? || Type 0x22 descriptor: Output buffer&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (1)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Ioctl Cmd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Close ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000009&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (2)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Device fd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x80000009&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Current process&lt;br /&gt;
|-&lt;br /&gt;
| ? || Handle descriptor: Shared memory mirror&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2-3 || Cmd id (3)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Shared memory size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Webkit applet creates the shared memory with perm = 0 and size 0x300000.&lt;br /&gt;
&lt;br /&gt;
= Ioctls =&lt;br /&gt;
The ioctl number is generated with the following primitive (see Linux kernel):&lt;br /&gt;
&lt;br /&gt;
 #define _IOC(inout, group, num, len) \&lt;br /&gt;
    (inout | ((len &amp;amp; IOCPARM_MASK) &amp;lt;&amp;lt; 16) | ((group) &amp;lt;&amp;lt; 8) | (num))&lt;br /&gt;
&lt;br /&gt;
The following table contains known ioctls.&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080014 || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040015 || In || 4 || [[#NVHOST_IOCTL_CTRL_SYNCPT_INCR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0016 || Inout || 12 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080017 || In || 8 || [[#NVHOST_IOCTL_CTRL_MODULE_MUTEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180018 || Inout || 24 || [[#NVHOST_IOCTL_CTRL_MODULE_REGRDWR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100019 || Inout || 16 || [[#NVHOST_IOCTL_CTRL_SYNCPT_WAITEX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008001A || Inout || 8 || [[#NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC183001B || Inout || 387 || NVHOST_IOCTL_CTRL_GET_CONFIG ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001C || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_SIGNAL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001D || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010001E || Inout || 16 || [[#NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004001F || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_REGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040020 || Inout || 4 || [[#NVHOST_IOCTL_CTRL_EVENT_UNREGISTER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080021 || In || 8 || [[#NVHOST_IOCTL_CTRL_EVENT_KILL]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_INCR ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAIT ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_MUTEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __lock;        // in (0==unlock; 1==lock)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_MODULE_REGRDWR ===&lt;br /&gt;
Identical to Linux driver. Uses 32-bit version and doesn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;           // in&lt;br /&gt;
    u32 __num_offsets;  // in&lt;br /&gt;
    u32 __block_size;   // in&lt;br /&gt;
    u32 __offsets;      // in&lt;br /&gt;
    u32 __values;       // in&lt;br /&gt;
    u32 __write;        // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_WAITEX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;          // in&lt;br /&gt;
    u32 __thresh;      // in&lt;br /&gt;
    s32 __timeout;     // in&lt;br /&gt;
    u32 __value;       // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_SYNCPT_READ_MAX ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;      // in&lt;br /&gt;
    u32 __value;   // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_SIGNAL ===&lt;br /&gt;
Signals an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT ===&lt;br /&gt;
Waits on an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_WAIT_ASYNC ===&lt;br /&gt;
Waits on an event (async version). Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __unk0;         // in&lt;br /&gt;
    u32 __unk1;         // in&lt;br /&gt;
    s32 __timeout;      // in&lt;br /&gt;
    u32 __event;        // inout (in=event_id; out=result)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_REGISTER ===&lt;br /&gt;
Registers an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_UNREGISTER ===&lt;br /&gt;
Unregisters an event. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __event_id;      // in (ranges from 0x01 to 0x3F)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVHOST_IOCTL_CTRL_EVENT_KILL ===&lt;br /&gt;
Kills events. Exclusive to the Switch. &lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __events;      // in (64-bit flag where each bit represents one event)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvmap ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080101 || Inout || 8 || [[#NVMAP_IOC_CREATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000102 || - || 0 || NVMAP_IOC_CLAIM || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080103 || Inout || 8 || [[#NVMAP_IOC_FROM_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0200104 || Inout || 32 || [[#NVMAP_IOC_ALLOC]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0180105 || Inout || 24 || [[#NVMAP_IOC_FREE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280106 || Inout || 40 || NVMAP_IOC_MMAP || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280107 || Inout || 40 || NVMAP_IOC_WRITE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0280108 || Inout || 40 || NVMAP_IOC_READ || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC00C0109 || Inout || 12 || [[#NVMAP_IOC_PARAM]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010A || Inout || 16 || NVMAP_IOC_PIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010010B || Inout || 16 || NVMAP_IOC_UNPIN_MULT || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010C || Inout || 8 || NVMAP_IOC_CACHE || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010D || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008010E || Inout || 8 || [[#NVMAP_IOC_GET_ID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004010F || Inout || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040110 || In || 4 || || Returns NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000111 || - || 0 || || Returns NotSupported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_CREATE ===&lt;br /&gt;
Creates an nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __size;   // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FROM_ID ===&lt;br /&gt;
Get handle to an existing nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // in&lt;br /&gt;
    u32 __handle; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_ALLOC ===&lt;br /&gt;
Allocate memory for the nvmap object. Nintendo extended this one with 16 bytes, and changed it from in to inout.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __heapmask; // in&lt;br /&gt;
    u32 __flags;    // in (0=read-only, 1=read-write)&lt;br /&gt;
    u32 __align;    // in&lt;br /&gt;
    u8  __kind;     // in&lt;br /&gt;
    u8  __pad[7];&lt;br /&gt;
    u64 __addr;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_FREE ===&lt;br /&gt;
This one is completely custom. Partly because the Linux driver passed the handle as the ioctl &amp;quot;arg-ptr&amp;quot;, and HIPC can&#039;t handle that voodoo.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle;   // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    u64 __refcount; // out&lt;br /&gt;
    u32 __size;     // out&lt;br /&gt;
    u32 __flags;    // out, 1=NOT_FREED_YET&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_PARAM ===&lt;br /&gt;
Returns info about a nvmap object. Identical to Linux driver, but extended with further params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
    u32 __param;  // in, 1=SIZE, 2=ALIGNMENT, 3=BASE (returns error), 4=HEAP (always 0x40000000), 5=KIND, 6=COMPR (unused)&lt;br /&gt;
    u32 __result; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVMAP_IOC_GET_ID ===&lt;br /&gt;
Returns an id for a nvmap object. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __id;     // out&lt;br /&gt;
    u32 __handle; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040212 || Out || 4 || TEGRA_DC_EXT_CONTROL_GET_NUM_OUTPUTS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0140213 || Inout || 20 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_PROPERTIES ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC1100214 || Inout || 272 || TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040216 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040217 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100218 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0100219 || Inout || 16 || TEGRA_DC_EXT_CONTROL_SET_EVENT3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0040220 || Inout || 4 || TEGRA_DC_EXT_CONTROL_SET_EVENT4 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdisp-disp0, /dev/nvdisp-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040201 || In || 4 || TEGRA_DC_EXT_GET_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040202 || In || 4 || TEGRA_DC_EXT_PUT_WINDOW ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4C80203 || In || 1224 || TEGRA_DC_EXT_FLIP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80380204 || Out || 56 || TEGRA_DC_EXT_GET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40380205 || Out || 56 || TEGRA_DC_EXT_SET_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x430C0206 || In || 780 || TEGRA_DC_EXT_SET_LUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010207 || In || 1 || TEGRA_DC_EXT_ENABLE_DISABLE_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040208 || Out || 4 || TEGRA_DC_EXT_GET_CRC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80040209 || Out || 4 || TEGRA_DC_EXT_GET_HEAD_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC038020A || Inout || 56 || TEGRA_DC_EXT_VALIDATE_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4018020B || In || 24 || TEGRA_DC_EXT_SET_CSC ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020C || Inout || 4 || TEGRA_DC_EXT_GET_VBLANK_SYNCPT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8040020D || Out || 64 || TEGRA_DC_EXT_GET_UNDERFLOWS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC99A020E || Inout || 2458 || TEGRA_DC_EXT_SET_CMU ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004020F || Inout || 4 || TEGRA_DC_EXT_DPMS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80600210 || Out || 96 || TEGRA_DC_EXT_GET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40600211 || In || 96 || TEGRA_DC_EXT_SET_AVI_INFOFRAME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEBFC0215 || Inout || 11260 || TEGRA_DC_EXT_GET_MODE_DB ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC003021A || Inout || 3 || TEGRA_DC_EXT_PANEL_GET_VENDOR_ID ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C021B || Out || 60 || TEGRA_DC_EXT_GET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x403C021C || In || 60 || TEGRA_DC_EXT_SET_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC03C021D || Inout || 60  || TEGRA_DC_EXT_VALIDATE_MODE2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xEF20021E || Inout || 12064 || TEGRA_DC_EXT_GET_MODE_DB2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC004021F || Inout || 4 || TEGRA_DC_EXT_GET_WINMASK ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvcec-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010300 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010301 || In || 1 || NVCEC_CTRL_ENABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0302 || Out || 76 || NVCEC_CTRL_GET_PADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040303 || In || 4 || NVCEC_CTRL_SET_LADDR ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0304 || Inout || 76 || NVCEC_CTRL_WRITE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC04C0305 || Inout || 76 || NVCEC_CTRL_READ ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0306 || Out || 76 || NVCEC_CTRL_GET_CONNECTION_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x804C0307 || Out || 76 || NVCEC_CTRL_GET_WRITE_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhdcp_up-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880401 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC4880402 || Inout || 1160 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010403 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvdcutil-disp0, /dev/nvdcutil-disp1 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010501 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40010502 || In || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x42040503 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x803C0504 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvsched-ctrl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000601 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000602 || - || 0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180603 || In || 1056 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180604 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080605 || In || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080606 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80080607 || Out || 60 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40180608 || In || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100609 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010060A || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060B || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8001060C || Out || 1 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8010060D || Out || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x400C060E || In || 12 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008060F || In || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100610 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40100611 || In || 16 || ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-as-gpu ==&lt;br /&gt;
Each fd opened to this device creates an address space. An address space is then later bound with a channel.&lt;br /&gt;
&lt;br /&gt;
Once a nvgpu channel has been bound to an address space it cannot be unbound. There is no support for allowing an nvgpu channel to change from one address space to another (or from one to none).&lt;br /&gt;
                                                                                                                              &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044101 || In || 4 || [[#NVGPU_AS_IOCTL_BIND_CHANNEL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184102 || Inout || 24 || [[#NVGPU_AS_IOCTL_ALLOC_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104103 || Inout || 16 || [[#NVGPU_AS_IOCTL_FREE_SPACE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184104 || Inout || 24 || [[#NVGPU_AS_IOCTL_MAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084105 || Inout || 8 || [[#NVGPU_AS_IOCTL_UNMAP_BUFFER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0284106 || Inout || 40 || [[#NVGPU_AS_IOCTL_MAP_BUFFER_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40104107 || In || 16 || [[#NVGPU_AS_IOCTL_INITIALIZE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0404108 || Inout || 64 || [[#NVGPU_AS_IOCTL_GET_VA_REGIONS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40284109 || In || 40 || [[#NVGPU_AS_IOCTL_INITIALIZE_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0144114 || Inout || 20 || NVGPU_AS_IOCTL_REMAP ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_BIND_CHANNEL ===&lt;br /&gt;
Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __fd; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_ALLOC_SPACE ===&lt;br /&gt;
This one reserves pages in the device address space.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
    u32 __flags;     // in&lt;br /&gt;
    u32 __pad;&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;  // out&lt;br /&gt;
      u64 __align;   // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_FREE_SPACE ===&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u32 __pages;     // in&lt;br /&gt;
    u32 __page_size; // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;        // in, 4 works&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u32 __nvmap_handle; // in&lt;br /&gt;
    u32 __page_size;    // inout, 0 means don&#039;t care&lt;br /&gt;
    union {&lt;br /&gt;
      u64 __offset;     // out&lt;br /&gt;
      u64 __align;      // in&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_MAP_BUFFER_EX ===&lt;br /&gt;
Map a memory region in the device address space. Identical to Linux driver pretty much.&lt;br /&gt;
&lt;br /&gt;
On success, the mapped memory region is locked by having [[SVC#MemoryState]] bit34 set.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flags;          // in, 4 works&lt;br /&gt;
    u32 __kind;           // in, -1 is default&lt;br /&gt;
    u32 __nvmap_handle;   // in&lt;br /&gt;
    u32 __page_size;      // inout, 0 means don&#039;t care&lt;br /&gt;
    u64 __buffer_offset;  // in&lt;br /&gt;
    u64 __mapping_size;   // in&lt;br /&gt;
    u64 __offset;         // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_UNMAP_BUFFER ===&lt;br /&gt;
Doesn&#039;t do shit.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable).&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_GET_VA_REGIONS ===&lt;br /&gt;
Nintendo modified to get rid of pointer in struct.&lt;br /&gt;
&lt;br /&gt;
  struct va_region {&lt;br /&gt;
    u64 __offset;&lt;br /&gt;
    u32 __page_size;&lt;br /&gt;
    u32 __reserved;&lt;br /&gt;
    u64 __pages;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64              __not_used;   // (contained output user ptr on linux, ignored)&lt;br /&gt;
    u32              __bufsize;    // inout, forced to 2*sizeof(struct va_region)&lt;br /&gt;
    u32              __reserved;&lt;br /&gt;
    struct va_region __regions[2]; // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_AS_IOCTL_INITIALIZE_EX ===&lt;br /&gt;
Nintendo&#039;s custom implementation of NVGPU_GPU_IOCTL_ALLOC_AS (unavailable) with extra params.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __big_page_size;   // in (depends on GPU&#039;s available_big_page_sizes; 0=default)&lt;br /&gt;
    s32 __as_fd;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __flags;           // in (ignored; passes 0)&lt;br /&gt;
    u32 __reserved;        // in (ignored; passes 0)&lt;br /&gt;
    u64 __unk0;            // in&lt;br /&gt;
    u64 __unk1;            // in&lt;br /&gt;
    u64 __unk2;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-dbg-gpu ==&lt;br /&gt;
Not accessible, but there is code to invoke it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084401 || In || 8 || NVGPU_DBG_GPU_IOCTL_BIND_CHANNEL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4402 || Inout || Variable || NVGPU_DBG_GPU_IOCTL_REG_OPS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084403 || In || 8 || NVGPU_DBG_GPU_IOCTL_EVENTS_CTRL ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044404 || In || 4 || NVGPU_DBG_GPU_IOCTL_POWERGATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044405 || In || 4 || NVGPU_DBG_GPU_IOCTL_SMPC_CTXSW_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184407 || Inout || 24 || NVGPU_DBG_GPU_IOCTL_PERFBUF_MAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084408 || In || 8 || NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084409 || In || 8 || NVGPU_DBG_GPU_IOCTL_PC_SAMPLING ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008440A || In || 8 || NVGPU_DBG_GPU_IOCTL_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8008440B || Out || 8 || NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8004440C || Out || 8 || NVGPU_DBG_GPU_IOCTL_GET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== /dev/nvhost-ctrl-gpu ==&lt;br /&gt;
This device is for global (context independent) operations on the gpu.  &lt;br /&gt;
                                                                                                                                               &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Direction || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044701 || Out || 4 || NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80284702 || Out || 40 || NVGPU_GPU_IOCTL_ZCULL_GET_INFO ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x402C4703 || In || 44 || NVGPU_GPU_IOCTL_ZBC_SET_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0344704 || Inout || 52 || NVGPU_GPU_IOCTL_ZBC_QUERY_TABLE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0B04705 || Inout || 176 || [[#NVGPU_GPU_IOCTL_GET_CHARACTERISTICS]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0184706 || Inout || 24 || NVGPU_GPU_IOCTL_GET_TPC_MASKS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084707 || In || 8 || [[#NVGPU_GPU_IOCTL_FLUSH_L2]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4008470E || In || 8 || NVGPU_GPU_IOCTL_SET_MMUDEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4010470F || In || 16 || NVGPU_GPU_IOCTL_SET_SM_DEBUG_MODE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0084710 || Inout || 8 || NVGPU_GPU_IOCTL_WAIT_FOR_PAUSE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084711 || Out || 8 || NVGPU_GPU_IOCTL_GET_TPC_EXCEPTION_EN_STATUS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084712 || Out || 8 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044713 || Inout || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084714 || Out || 8 || [[#NVGPU_GPU_IOCTL_GET_L2_STATE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80044715 || Out || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8018471A || Out || 24 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC008471B || Inout || 8 || NVGPU_GPU_IOCTL_GET_ERROR_CHANNEL_USER_DATA ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010471C || Inout || 16 || NVGPU_GPU_IOCTL_GET_GPU_TIME ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC108471D || Inout || 264 || NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_CHARACTERISTICS ===&lt;br /&gt;
Returns the GPU characteristics. Modified to return inline data instead of using a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct __gpu_characteristics {&lt;br /&gt;
    u32 __arch;                           // 0x120 (NVGPU_GPU_ARCH_GM200)&lt;br /&gt;
    u32 __impl;                           // 0xB (NVGPU_GPU_IMPL_GM20B)&lt;br /&gt;
    u32 __rev;                            // 0xA1 (Revision A1)&lt;br /&gt;
    u32 __num_gpc;                        // 0x1&lt;br /&gt;
    u64 __L2_cache_size;                  // 0x40000&lt;br /&gt;
    u64 __on_board_video_memory_size;     // 0x0 (not used)&lt;br /&gt;
    u32 __num_tpc_per_gpc;                // 0x2&lt;br /&gt;
    u32 __bus_type;                       // 0x20 (NVGPU_GPU_BUS_TYPE_AXI)&lt;br /&gt;
    u32 __big_page_size;                  // 0x20000&lt;br /&gt;
    u32 __compression_page_size;          // 0x20000&lt;br /&gt;
    u32 __pde_coverage_bit_count;         // 0x1B&lt;br /&gt;
    u32 __available_big_page_sizes;       // 0x30000&lt;br /&gt;
    u32 __gpc_mask;                       // 0x1&lt;br /&gt;
    u32 __sm_arch_sm_version;             // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_spa_version;            // 0x503 (Maxwell Generation 5.0.3?)&lt;br /&gt;
    u32 __sm_arch_warp_count;             // 0x80&lt;br /&gt;
    u32 __gpu_va_bit_count;               // 0x28&lt;br /&gt;
    u32 __reserved;                       // NULL&lt;br /&gt;
    u64 __flags;                          // 0x55&lt;br /&gt;
    u32 __twod_class;                     // 0x902D (FERMI_TWOD_A)&lt;br /&gt;
    u32 __threed_class;                   // 0xB197 (MAXWELL_B)&lt;br /&gt;
    u32 __compute_class;                  // 0xB1C0 (MAXWELL_COMPUTE_B)&lt;br /&gt;
    u32 __gpfifo_class;                   // 0xB06F (MAXWELL_CHANNEL_GPFIFO_A)&lt;br /&gt;
    u32 __inline_to_memory_class;         // 0xA140 (KEPLER_INLINE_TO_MEMORY_B)&lt;br /&gt;
    u32 __dma_copy_class;                 // 0xB0B5 (MAXWELL_DMA_COPY_A)&lt;br /&gt;
    u32 __max_fbps_count;                 // 0x1&lt;br /&gt;
    u32 __fbp_en_mask;                    // 0x0 (disabled)&lt;br /&gt;
    u32 __max_ltc_per_fbp;                // 0x2&lt;br /&gt;
    u32 __max_lts_per_ltc;                // 0x1&lt;br /&gt;
    u32 __max_tex_per_tpc;                // 0x0 (not supported)&lt;br /&gt;
    u32 __max_gpc_count;                  // 0x1&lt;br /&gt;
    u32 __rop_l2_en_mask_0;               // 0x21D70 (fuse_status_opt_rop_l2_fbp_r)&lt;br /&gt;
    u32 __rop_l2_en_mask_1;               // 0x0&lt;br /&gt;
    u64 __chipname;                       // 0x6230326D67 (&amp;quot;gm20b&amp;quot;)&lt;br /&gt;
    u64 __gr_compbit_store_base_hw;       // 0x0 (not supported)&lt;br /&gt;
  };&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpu_characteristics_buf_size;   // in/out (must not be NULL, but gets overwritten with 0xA0=max_size)&lt;br /&gt;
    u64 __gpu_characteristics_buf_addr;   // in (ignored, but must not be NULL)&lt;br /&gt;
    struct __gpu_characteristics gc;      // out&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_FLUSH_L2 ===&lt;br /&gt;
Flushes the GPU L2 cache.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __flush;          // in (l2_flush | l2_invalidate &amp;lt;&amp;lt; 1 | fb_flush &amp;lt;&amp;lt; 2)&lt;br /&gt;
    u32 __reserved;       // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_GPU_IOCTL_GET_L2_STATE ===&lt;br /&gt;
Returns the GPU L2 cache state.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __mask;        // out (always 0x07)&lt;br /&gt;
    u32 __flush;       // out (active flush bit field)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Channels ==&lt;br /&gt;
Channels are a concept for  NVIDIA hardware blocks that share a common interface.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Path || Name&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-gpu ||&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-vic || Video Image Compositor&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvdec || Video Decoder&lt;br /&gt;
|-&lt;br /&gt;
| /dev/nvhost-nvjpg || JPEG Decoder&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Channel Ioctls ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Value || Size || Description || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0001 || Variable || NVHOST_IOCTL_CHANNEL_SUBMIT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080002 || 8 || NVHOST_IOCTL_CHANNEL_GET_SYNCPOINT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080003 || 8 || NVHOST_IOCTL_CHANNEL_GET_WAITBASE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0080004 || 8 || NVHOST_IOCTL_CHANNEL_SET_TIMEOUT_EX ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40040007 || 4 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40080008 || 8 || NVHOST_IOCTL_CHANNEL_SET_CLK_RATE ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??0009 || Variable || NVHOST_IOCTL_CHANNEL_MAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??000A || Variable || NVHOST_IOCTL_CHANNEL_UNMAP_BUFFER ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || 0 || ||&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40044801 || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40044803 || 4 || NVGPU_IOCTL_CHANNEL_SET_TIMEOUT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084805 || 8 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0044807 || 4 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4808 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104809 || 16 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC010480B || 16 || NVGPU_IOCTL_CHANNEL_ZCULL_BIND ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC018480C || 24 || [[#NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x4004480D || 4 || [[#NVGPU_IOCTL_CHANNEL_SET_PRIORITY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480E || 0 || [[#NVGPU_IOCTL_CHANNEL_ENABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000480F || 0 || [[#NVGPU_IOCTL_CHANNEL_DISABLE]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004810 || 0 || [[#NVGPU_IOCTL_CHANNEL_PREEMPT]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x00004811 || 0 || [[#NVGPU_IOCTL_CHANNEL_FORCE_RESET]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40084812 || 8 || [[#NVGPU_IOCTL_CHANNEL_EVENTS_CTRL]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104813 || 16 || NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x80804816 || 128 || NVGPU_IOCTL_CHANNEL_GET_ERROR_INFO || Only works when the channel is busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0104817 || 16 || [[#NVGPU_IOCTL_CHANNEL_GET_ERROR]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x40204818 || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0??4819 || Variable || [[#NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC020481A || 32 || [[#NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2]] ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0x40084714 || 8 || NVGPU_IOCTL_CHANNEL_SET_USER_DATA || Sets an unknown user context address&lt;br /&gt;
|-&lt;br /&gt;
| 0x80084715 || 8 || NVGPU_IOCTL_CHANNEL_GET_USER_DATA || Gets an unknown user context address&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD ===&lt;br /&gt;
Binds a nvmap object to this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __nvmap_fd;     // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO ===&lt;br /&gt;
Allocates gpfifo entries. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO ===&lt;br /&gt;
Submits a gpfifo object. Modified to take inline entry objects instead of a pointer.&lt;br /&gt;
&lt;br /&gt;
  struct fence {&lt;br /&gt;
    u32 __id;&lt;br /&gt;
    u32 __value;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct gpfifo_entry {&lt;br /&gt;
    u32 __entry0;&lt;br /&gt;
    u32 __entry1;&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_OBJ_CTX ===&lt;br /&gt;
Allocates a graphics context object. Modified to ignore object&#039;s ID.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __class_num;    // in (0x902D=2d, 0xB197=3d, 0xB1C0=compute, 0xA140=kepler, 0xB0B5=DMA, 0xB06F=channel_gpfifo)&lt;br /&gt;
    u32 __flags;        // in&lt;br /&gt;
    u64 __obj_id;       // out (ignored; used for FREE_OBJ_CTX ioctl, which is not supported)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER ===&lt;br /&gt;
Initializes the error notifier for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __offset;    // in&lt;br /&gt;
    u64 __size;      // in&lt;br /&gt;
    u32 __mem;       // in (nvmap object handle)&lt;br /&gt;
    u32 __padding;   // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SET_PRIORITY ===&lt;br /&gt;
Change channel&#039;s priority. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __priority;    // in (0x32 is low, 0x64 is medium and 0x96 is high)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ENABLE ===&lt;br /&gt;
Enables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_DISABLE ===&lt;br /&gt;
Disables the current channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_PREEMPT ===&lt;br /&gt;
Clears the FIFO pipe for this channel. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_FORCE_RESET ===&lt;br /&gt;
Forces the channel to reset. Identical to Linux driver.&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_EVENTS_CTRL ===&lt;br /&gt;
Controls event notifications. Modified to take an additional argument.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __cmd;    // in (0=disable, 1=enable, 2=clear)&lt;br /&gt;
    u32 __unk;    // in (accepts 1 or 2)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_GET_ERROR ===&lt;br /&gt;
Returns the current error notification caught by the error notifier. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __timestamp;    // out (nanoseconds since Jan. 1, 1970)&lt;br /&gt;
    u32 __info32;       // out (error code)&lt;br /&gt;
    u16 __info16;       // out (additional error info)&lt;br /&gt;
    u16 __status;       // inout (always 0xFFFF)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_RETRY ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters. Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;     // in&lt;br /&gt;
    u32 __flags;           // in&lt;br /&gt;
    u32 __unk0;            // in (1 works)&lt;br /&gt;
    u32 __unk1;            // in&lt;br /&gt;
    u32 __unk2;            // in&lt;br /&gt;
    u32 __unk3;            // in&lt;br /&gt;
    u32 __unk4;            // in&lt;br /&gt;
    u32 __unk5;            // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO_EX ===&lt;br /&gt;
Submits a gpfifo object (async version). Exclusive to the Switch.&lt;br /&gt;
&lt;br /&gt;
  struct {&lt;br /&gt;
    u64 __gpfifo;                     // in (pointer to gpfifo fence structs; ignored)&lt;br /&gt;
    u32 __num_entries;                // in (number of fence objects being submitted)&lt;br /&gt;
    u32 __flags;                      // in&lt;br /&gt;
    struct fence        __fence_out;  // out (returned new fence object for others to wait on)&lt;br /&gt;
    struct gpfifo_entry __entries[];  // in (depends on __num_entries)&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
=== NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX2 ===&lt;br /&gt;
Allocates gpfifo entries with additional parameters and returns a fence. Exclusive to the Switch.&lt;br /&gt;
 &lt;br /&gt;
  struct {&lt;br /&gt;
    u32 __num_entries;         // in&lt;br /&gt;
    u32 __flags;               // in&lt;br /&gt;
    u32 __unk0;                // in (1 works)&lt;br /&gt;
    struct fence __fence_out;  // out&lt;br /&gt;
    u32 __unk1;                // in&lt;br /&gt;
    u32 __unk2;                // in&lt;br /&gt;
    u32 __unk3;                // in&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
= nvmemp =&lt;br /&gt;
NVIDIA memory profiler (this service is not available on retail units).&lt;br /&gt;
&lt;br /&gt;
= nvdrvdbg =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#CloseLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#ReadLog]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenLog ==&lt;br /&gt;
Takes process handle. Returns an fd.&lt;br /&gt;
&lt;br /&gt;
== CloseLog ==&lt;br /&gt;
Takes fd and closes it.&lt;br /&gt;
&lt;br /&gt;
== ReadLog ==&lt;br /&gt;
Takes fd and reads log into a type-6 buffer.&lt;br /&gt;
&lt;br /&gt;
= Errors =&lt;br /&gt;
Most nvidia driver commands return an error code apart from the normal return code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Success&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NotImplemented&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotSupported&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NotInitialized&lt;br /&gt;
|-&lt;br /&gt;
| 4 || BadParameter&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Timeout&lt;br /&gt;
|-&lt;br /&gt;
| 6 || InsufficientMemory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ReadOnlyAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 8 || InvalidState&lt;br /&gt;
|-&lt;br /&gt;
| 9 || InvalidAddress&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || InvalidSize&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || BadValue&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || AlreadyAllocated&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || Busy&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || ResourceError&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || CountMismatch&lt;br /&gt;
|-&lt;br /&gt;
| 0x1000 || SharedMemoryTooSmall&lt;br /&gt;
|-&lt;br /&gt;
| 0x30003 || FileOperationFailed&lt;br /&gt;
|-&lt;br /&gt;
| 0x3000F || IoctlFailed                        &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2523</id>
		<title>HIPC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2523"/>
		<updated>2017-09-25T10:25:13Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IPC Command Structure ==&lt;br /&gt;
This is an array of u32&#039;s, usually located in [[Thread Local Storage]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-0 || Type. 4=Request, 5=Control&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 19-16 || Number of buf X descriptors (each: 2 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 23-20 || Number of buf A descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 27-24 || Number of buf B descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 9-0 || Size of raw data section in u32s.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 13-10 || Flags for buf C descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31 || Enable handle descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Handle descriptor|Handle descriptor]], if enabled.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor X &amp;quot;Pointer&amp;quot;|Buf X descriptors]], each one 2 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf A descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf B descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Type W descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Raw_data_section|Raw data section]] (including padding before and after aligned data section).&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor C &amp;quot;ReceiveList&amp;quot;|Buf C descriptors]], each one 2 words.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Handle descriptor ===&lt;br /&gt;
There can only be one of this descriptor type. It is enabled by bit31 of the second word.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Send current PID.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4-1 || Number of handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-5 || Number of handles to move&lt;br /&gt;
|-&lt;br /&gt;
| ... || || 8-byte PID if enabled&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to move&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor X &amp;quot;Pointer&amp;quot; ===&lt;br /&gt;
This one is packed even worse than A, they inserted the bit38-36 of the address &#039;&#039;on top&#039;&#039; of the counter field.&lt;br /&gt;
&lt;br /&gt;
Officially, the counter is known as &amp;quot;receive index&amp;quot;. This one writes to the buffer described in the ReceiveList.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 5-0 || Bits 5-0 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-6 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 11-9 || Bits 11-9 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-12 || Bit 35-32 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Size&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot; ===&lt;br /&gt;
This packing is so unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1-0 || Flags. Always set to 0, 1 or 3. Determines what [[SVC|MemoryState]] to use with the mapped memory in the sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 4-2 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 27-24 || Bit 35-32 of size.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 31-28 || Bit 35-32 of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor C &amp;quot;ReceiveList&amp;quot; ===&lt;br /&gt;
There&#039;s a 4-bit flag in the main header controlling the behavior of C descriptors.&lt;br /&gt;
&lt;br /&gt;
If it has value 0, the C descriptor functionality is disabled. If it has value 1, there is no C descriptor. If it has value 2, there is a single C descriptor.&lt;br /&gt;
&lt;br /&gt;
Otherwise it has (flag-2) C descriptors.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15-0 || Rest of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31-16 || Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IPC buffers ===&lt;br /&gt;
Buffer descriptor A/B/... map memory into the sysmodule process. For the mapped memory in the sysmodule the permissions are: desc-A = R--, desc-B = RW-. The buffer is automatically unmapped while the kernel handles the cmdreply, the sysmodule doesn&#039;t need to specify anything in the cmdreply to trigger this.&lt;br /&gt;
&lt;br /&gt;
This memory is mapped in the sysmodule to the same vaddr from the original user-process cmd-request, except with with bits &amp;gt;=(~28(?)) changed to a different ASLR&#039;d region.&lt;br /&gt;
&lt;br /&gt;
== Raw data section ==&lt;br /&gt;
&lt;br /&gt;
[[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type A lengths is padded to fill up a whole word.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding to align to 16 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| ... || If sent to an object domain, a [[#Domain_message|domain message]], otherwise a [[#Data payload|data payload]]&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding&lt;br /&gt;
|-&lt;br /&gt;
| ... || Buffer type 0xA lengths (u16 array)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total amount of padding within the raw data section is always 0x10 bytes. This means that if no padding is required before the message, there will be 0x10 bytes of padding after the message (before the buffer type 0xA lengths).&lt;br /&gt;
&lt;br /&gt;
=== Domain message ===&lt;br /&gt;
This header is used to wrap up requests sent to domains instead of sessions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 7-0 || Command. 1=send message, 2=close virtual handle&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).&lt;br /&gt;
|-&lt;br /&gt;
  | 2&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;| Padding to align to u64&lt;br /&gt;
|-&lt;br /&gt;
  | 3&lt;br /&gt;
|-&lt;br /&gt;
| 4... || || [[#Data payload|Data payload]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data payload ===&lt;br /&gt;
&lt;br /&gt;
This is an array of u32&#039;s, but individual parameters are generally stored as u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Magic (&amp;quot;SFCI&amp;quot; for requests, &amp;quot;SFCO&amp;quot; for responses) as u64.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses.&lt;br /&gt;
|-&lt;br /&gt;
| 4... || Input parameters or return values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Many messages which require the PID also require a placeholder u64 value passed in the input parameters. In these cases the OverwriteClientProcessId method is called to replace the value before it is used.&lt;br /&gt;
&lt;br /&gt;
== Official marshalling code ==&lt;br /&gt;
The official marshalling function takes an array of (buf_ptr, size) pairs and a type-field for each such pair.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 seems to indicate null-terminated strings, but that flag is ignored by the marshalling code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type Mask || Description || Direction&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 1 || Creates a A descriptor with flags=0. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 1 || Creates a A descriptor with flags=1. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 1 || Creates a A descriptor with flags=3. || In&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 2 || Creates a B descriptor with flags=0. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 2 || Creates a B descriptor with flags=1. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 2 || Creates a B descriptor with flags=3. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 1 || Creates an X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 2 || Creates a C descriptor, and writes the u16 size to an offset into raw data. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 + 8 + 2 || Creates a C descriptor || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 1 || Creates both an A and X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 2 || Creates both an B and C descriptor || Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
C and X (Pointer and ReceiveList) descriptors are backed by the &amp;quot;pointer buffer&amp;quot;, a buffer in the service process. Its size is a u16, which is retrieved using the &amp;quot;QueryPointerBufferSize&amp;quot; control message. If the client code determines all buffers with flag 8 do not fit in the pointer buffer, it returns error 0x11A0B.&lt;br /&gt;
&lt;br /&gt;
For buffers with flag 0x20 it creates two descriptors (A+X or B+C), but one descriptor is NULL (zero size and pointer), while the other holds the expected values. X/C descriptors are used as the non-NULL descriptor where possible, but if they don&#039;t fit in the pointer buffer, A/B descriptors are used instead. The code defers processing of type 0x20 buffers with sizes that fit in a u16 (and may therefore fit in the pointer buffer). This ensures all type 8 buffers get pointer-buffer space before any type 0x20.&lt;br /&gt;
&lt;br /&gt;
(The order in which the deferred type 0x20 buffers are processed is determined by a convoluted loop.)&lt;br /&gt;
&lt;br /&gt;
== Official IPC Cmd Structure ==&lt;br /&gt;
Official struct that is stored for each IPC command. It contains precalculated offsets for different portions of the command structure.&lt;br /&gt;
&lt;br /&gt;
All offsets are given is in number of u32 words.&lt;br /&gt;
&lt;br /&gt;
 struct IpcCmdStruct {&lt;br /&gt;
   u8  unk0;&lt;br /&gt;
   u8  has_handle_descriptor;&lt;br /&gt;
   u8  pad0[2];&lt;br /&gt;
   u32 cmd0;&lt;br /&gt;
   u32 cmd1;&lt;br /&gt;
   u32 offset_handle_descriptor;&lt;br /&gt;
   u32 pad1;&lt;br /&gt;
   u32 offset_handles;          &lt;br /&gt;
   u32 pad2;&lt;br /&gt;
   u32 offset_x_descriptors;&lt;br /&gt;
   u32 offset_a_descriptors;&lt;br /&gt;
   u32 offset_b_descriptors;&lt;br /&gt;
   u32 offset_w_descriptors; /* this is a guess */&lt;br /&gt;
   u32 offset_raw_data;&lt;br /&gt;
   u32 offset_c_descriptors;&lt;br /&gt;
   u32 unk2;&lt;br /&gt;
   u32 unk3;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
When type == 5 you are talking to the IPC manager.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ConvertSessionToDomain || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ConvertDomainToSession || u32 domain&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DuplicateSession || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || QueryPointerBufferSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DuplicateSessionEx || u32 unknown&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2522</id>
		<title>HIPC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2522"/>
		<updated>2017-09-25T10:24:37Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IPC Command Structure ==&lt;br /&gt;
This is an array of u32&#039;s, usually located in [[Thread Local Storage]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-0 || Type. 4=Request, 5=Control&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 19-16 || Number of buf X descriptors (each: 2 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 23-20 || Number of buf A descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 27-24 || Number of buf B descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 9-0 || Size of raw data section in u32s.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 13-10 || Flags for buf C descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31 || Enable handle descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Handle descriptor|Handle descriptor]], if enabled.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor X &amp;quot;Pointer&amp;quot;|Buf X descriptors]], each one 2 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf A descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf B descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Type W descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Raw_data_section|Raw data section]] (including padding before and after aligned data section).&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor C &amp;quot;ReceiveList&amp;quot;|Buf C descriptors]], each one 2 words.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Handle descriptor ===&lt;br /&gt;
There can only be one of this descriptor type. It is enabled by bit31 of the second word.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Send current PID.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4-1 || Number of handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-5 || Number of handles to move&lt;br /&gt;
|-&lt;br /&gt;
| ... || || 8-byte PID if enabled&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to move&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor X &amp;quot;Pointer&amp;quot; ===&lt;br /&gt;
This one is packed even worse than A, they inserted the bit38-36 of the address &#039;&#039;on top&#039;&#039; of the counter field.&lt;br /&gt;
&lt;br /&gt;
Officially, the counter is known as &amp;quot;receive index&amp;quot;. This one writes to the buffer described in the ReceiveList.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 5-0 || Bits 5-0 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-6 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 11-9 || Bits 11-9 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-12 || Bit 35-32 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Size&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot; ===&lt;br /&gt;
This packing is so unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1-0 || Flags. Always set to 0, 1 or 3. Determines what [[SVC|MemoryState]] to use with the mapped memory in the sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 4-2 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 27-24 || Bit 35-32 of size.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 31-28 || Bit 35-32 of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor C &amp;quot;ReceiveList&amp;quot; ===&lt;br /&gt;
There&#039;s a 4-bit flag in the main header controlling the behavior of C descriptors.&lt;br /&gt;
&lt;br /&gt;
If it has value 0, the C descriptor functionality is disabled. If it has value 1, there is no C descriptor. If it has value 2, there is a single C descriptor.&lt;br /&gt;
&lt;br /&gt;
Otherwise it has (flag-2) C descriptors.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15-0 || Rest of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31-16 || Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IPC buffers ===&lt;br /&gt;
Buffer descriptor A/B/... map memory into the sysmodule process. For the mapped memory in the sysmodule the permissions are: desc-A = R--, desc-B = RW-. The buffer is automatically unmapped while the kernel handles the cmdreply, the sysmodule doesn&#039;t need to specify anything in the cmdreply to trigger this.&lt;br /&gt;
&lt;br /&gt;
This memory is mapped in the sysmodule to the same vaddr from the original user-process cmd-request, except with with bits &amp;gt;=(~28(?)) changed to a different ASLR&#039;d region.&lt;br /&gt;
&lt;br /&gt;
== Raw data section ==&lt;br /&gt;
&lt;br /&gt;
[[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type A lengths is padded to fill up a whole word.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding to align to 16 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| ... || If sent to an object domain, a [[#Domain_message|domain message]], otherwise a [[#Data payload|data payload]]&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding&lt;br /&gt;
|-&lt;br /&gt;
| ... || Buffer type 0xA lengths (u16 array)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total amount of padding within the raw data section is always 0x10 bytes. This means that if no padding is required before the message, there will be 0x10 bytes of padding after the message (before the buffer type 0xA lengths).&lt;br /&gt;
&lt;br /&gt;
=== Domain message ===&lt;br /&gt;
This header is used to wrap up requests sent to domains instead of sessions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 7-0 || Command. 1=send message, 2=close virtual handle&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).&lt;br /&gt;
|-&lt;br /&gt;
  | 2&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;| Padding to align to u64&lt;br /&gt;
|-&lt;br /&gt;
  | 3&lt;br /&gt;
|-&lt;br /&gt;
| 4... || || [[#Data payload|Data payload]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data payload ===&lt;br /&gt;
&lt;br /&gt;
This is an array of u32&#039;s, but individual parameters are generally stored as u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Magic (&amp;quot;SFCI&amp;quot; for requests, &amp;quot;SFCO&amp;quot; for responses) as u64.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses.&lt;br /&gt;
|-&lt;br /&gt;
| 4... || Input parameters or return values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Many messages which require the PID also require a placeholder u64 value passed in the input parameters. In these cases the OverwriteClientProcessId method is called to replace the value before it is used.&lt;br /&gt;
&lt;br /&gt;
== Official marshalling code ==&lt;br /&gt;
The official marshalling function takes an array of (buf_ptr, size) pairs and a type-field for each such pair.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 seems to indicate null-terminated strings, but that flag is ignored by the marshalling code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type Mask || Description || Direction&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 1 || Creates a A descriptor with flags=0. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 1 || Creates a A descriptor with flags=1. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 1 || Creates a A descriptor with flags=3. || In&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 2 || Creates a B descriptor with flags=0. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 2 || Creates a B descriptor with flags=1. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 2 || Creates a B descriptor with flags=3. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 1 || Creates an X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 2 || Creates a C descriptor, and writes the u16 size to an offset into raw data. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 + 8 + 2 || Creates a C descriptor || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 1 || Creates both an A and X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 2 || Creates both an B and C descriptor || Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
C and X (Pointer and ReceiveList) descriptors are backed by the &amp;quot;pointer buffer&amp;quot;, a buffer in the service process. Its size is a u16, which is retrieved using the &amp;quot;QueryPointerBufferSize&amp;quot; control message. If the client code determines all buffers with flag 8 do not fit in the pointer buffer, it returns error 0x11A0B.&lt;br /&gt;
&lt;br /&gt;
For buffers with flag 0x20 it creates two descriptors (A+X or B+C), but one descriptor is NULL (zero size and pointer), while the other holds the expected values. X/C descriptors are used as the non-NULL descriptor where possible, but if they don&#039;t fit in the pointer buffer, A/B descriptors are used instead. The code defers processing of type 0x20 buffers with sizes that fit in a u16 (and may therefore fit in the pointer buffer). This ensures all type 8 buffers get pointer-buffer space before any type 0x20.&lt;br /&gt;
&lt;br /&gt;
(The order in which the deferred type 0x20 buffers are processed is determined by a convoluted loop.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Official IPC Cmd Structure ==&lt;br /&gt;
Official struct that is stored for each IPC command. It contains precalculated offsets for different portions of the command structure.&lt;br /&gt;
&lt;br /&gt;
All offsets are given is in number of u32 words.&lt;br /&gt;
&lt;br /&gt;
 struct IpcCmdStruct {&lt;br /&gt;
   u8  unk0;&lt;br /&gt;
   u8  has_handle_descriptor;&lt;br /&gt;
   u8  pad0[2];&lt;br /&gt;
   u32 cmd0;&lt;br /&gt;
   u32 cmd1;&lt;br /&gt;
   u32 offset_handle_descriptor;&lt;br /&gt;
   u32 pad1;&lt;br /&gt;
   u32 offset_handles;          &lt;br /&gt;
   u32 pad2;&lt;br /&gt;
   u32 offset_x_descriptors;&lt;br /&gt;
   u32 offset_a_descriptors;&lt;br /&gt;
   u32 offset_b_descriptors;&lt;br /&gt;
   u32 offset_w_descriptors; /* this is a guess */&lt;br /&gt;
   u32 offset_raw_data;&lt;br /&gt;
   u32 offset_c_descriptors;&lt;br /&gt;
   u32 unk2;&lt;br /&gt;
   u32 unk3;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
When type == 5 you are talking to the IPC manager.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ConvertSessionToDomain || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ConvertDomainToSession || u32 domain&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DuplicateSession || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || QueryPointerBufferSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DuplicateSessionEx || u32 unknown&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2515</id>
		<title>HIPC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=HIPC&amp;diff=2515"/>
		<updated>2017-09-24T10:28:00Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IPC Command Structure ==&lt;br /&gt;
This is an array of u32&#039;s, usually located in [[Thread Local Storage]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-0 || Type. 4=Request, 5=Control&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 19-16 || Number of buf X descriptors (each: 2 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 23-20 || Number of buf A descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 27-24 || Number of buf B descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 9-0 || Size of raw data section in u32s.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 13-10 || Flags for buf C descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31 || Enable handle descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Handle descriptor|Handle descriptor]], if enabled.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor X &amp;quot;Pointer&amp;quot;|Buf X descriptors]], each one 2 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf A descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Buf B descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot;|Type W descriptors]], each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Raw_data_section|Raw data section]] (including padding before and after aligned data section).&lt;br /&gt;
|-&lt;br /&gt;
| ... || || [[#Buffer descriptor C &amp;quot;ReceiveList&amp;quot;|Buf C descriptors]], each one 2 words.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Handle descriptor ===&lt;br /&gt;
There can only be one of this descriptor type. It is enabled by bit31 of the second word.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Send current PID.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4-1 || Number of handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-5 || Number of handles to move&lt;br /&gt;
|-&lt;br /&gt;
| ... || || 8-byte PID if enabled&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to move&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor X &amp;quot;Pointer&amp;quot; ===&lt;br /&gt;
This one is packed even worse than A, they inserted the bit38-36 of the address &#039;&#039;on top&#039;&#039; of the counter field.&lt;br /&gt;
&lt;br /&gt;
Officially, the counter is known as &amp;quot;receive index&amp;quot;. This one writes to the buffer described in the ReceiveList.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 5-0 || Bits 5-0 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-6 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 11-9 || Bits 11-9 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-12 || Bit 35-32 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Size&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot; ===&lt;br /&gt;
This packing is so unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1-0 || Flags. Always set to 0, 1 or 3. Determines what [[SVC|MemoryState]] to use with the mapped memory in the sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 4-2 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 27-24 || Bit 35-32 of size.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 31-28 || Bit 35-32 of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor C &amp;quot;ReceiveList&amp;quot; ===&lt;br /&gt;
There&#039;s a 4-bit flag in the main header controlling the behavior of C descriptors.&lt;br /&gt;
&lt;br /&gt;
If it has value 0, the C descriptor functionality is disabled. If it has value 1, there is no C descriptor. If it has value 2, there is a single C descriptor.&lt;br /&gt;
&lt;br /&gt;
Otherwise it has (flag-2) C descriptors.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15-0 || Rest of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31-16 || Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IPC buffers ===&lt;br /&gt;
Buffer descriptor A/B/... map memory into the sysmodule process. For the mapped memory in the sysmodule the permissions are: desc-A = R--, desc-B = RW-. The buffer is automatically unmapped while the kernel handles the cmdreply, the sysmodule doesn&#039;t need to specify anything in the cmdreply to trigger this.&lt;br /&gt;
&lt;br /&gt;
This memory is mapped in the sysmodule to the same vaddr from the original user-process cmd-request, except with with bits &amp;gt;=(~28(?)) changed to a different ASLR&#039;d region.&lt;br /&gt;
&lt;br /&gt;
== Raw data section ==&lt;br /&gt;
&lt;br /&gt;
[[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type A lengths is padded to fill up a whole word.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding to align to 16 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| ... || If sent to an object domain, a [[#Domain_message|domain message]], otherwise a [[#Data payload|data payload]]&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding&lt;br /&gt;
|-&lt;br /&gt;
| ... || Buffer type 0xA lengths (u16 array)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The total amount of padding within the raw data section is always 0x10 bytes. This means that if no padding is required before the message, there will be 0x10 bytes of padding after the message (before the buffer type 0xA lengths).&lt;br /&gt;
&lt;br /&gt;
=== Domain message ===&lt;br /&gt;
This header is used to wrap up requests sent to domains instead of sessions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 7-0 || Command. 1=send message, 2=close virtual handle&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).&lt;br /&gt;
|-&lt;br /&gt;
  | 2&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
  |rowspan=&amp;quot;2&amp;quot;| Padding to align to u64&lt;br /&gt;
|-&lt;br /&gt;
  | 3&lt;br /&gt;
|-&lt;br /&gt;
| 4... || || [[#Data payload|Data payload]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data payload ===&lt;br /&gt;
&lt;br /&gt;
This is an array of u32&#039;s, but individual parameters are generally stored as u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Magic (&amp;quot;SFCI&amp;quot; for requests, &amp;quot;SFCO&amp;quot; for responses) as u64.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses.&lt;br /&gt;
|-&lt;br /&gt;
| 4... || Input parameters or return values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Many messages which require the PID also require a placeholder u64 value passed in the input parameters. In these cases the OverwriteClientProcessId method is called to replace the value before it is used.&lt;br /&gt;
&lt;br /&gt;
== Official marshalling code ==&lt;br /&gt;
The official marshalling function takes an array of (buf_ptr, size) pairs and a type-field for each such pair.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 seems to indicate null-terminated strings, but that flag is ignored by the marshalling code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type Mask || Description || Direction&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 1 || Creates a A descriptor with flags=0. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 1 || Creates a A descriptor with flags=1. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 1 || Creates a A descriptor with flags=3. || In&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 2 || Creates a B descriptor with flags=0. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 2 || Creates a B descriptor with flags=1. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 2 || Creates a B descriptor with flags=3. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 1 || Creates an X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 2 || Creates a C descriptor, and writes the u16 size to an offset into raw data. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 + 8 + 2 || Creates a C descriptor || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 1 || Creates both an A and X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 2 || Creates both an B and C descriptor || Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For types 0x21, 0x22 if size doesn&#039;t fit in u16, it&#039;s added to a list. Some magic shit happens to that list.&lt;br /&gt;
&lt;br /&gt;
== Official IPC Cmd Structure ==&lt;br /&gt;
Official struct that is stored for each IPC command. It contains precalculated offsets for different portions of the command structure.&lt;br /&gt;
&lt;br /&gt;
All offsets are given is in number of u32 words.&lt;br /&gt;
&lt;br /&gt;
 struct IpcCmdStruct {&lt;br /&gt;
   u8  unk0;&lt;br /&gt;
   u8  has_handle_descriptor;&lt;br /&gt;
   u8  pad0[2];&lt;br /&gt;
   u32 cmd0;&lt;br /&gt;
   u32 cmd1;&lt;br /&gt;
   u32 offset_handle_descriptor;&lt;br /&gt;
   u32 pad1;&lt;br /&gt;
   u32 offset_handles;          &lt;br /&gt;
   u32 pad2;&lt;br /&gt;
   u32 offset_x_descriptors;&lt;br /&gt;
   u32 offset_a_descriptors;&lt;br /&gt;
   u32 offset_b_descriptors;&lt;br /&gt;
   u32 offset_w_descriptors; /* this is a guess */&lt;br /&gt;
   u32 offset_raw_data;&lt;br /&gt;
   u32 offset_c_descriptors;&lt;br /&gt;
   u32 unk2;&lt;br /&gt;
   u32 unk3;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
When type == 5 you are talking to the IPC manager.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ConvertSessionToDomain || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ConvertDomainToSession || u32 domain&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DuplicateSession || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || QueryPointerBufferSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DuplicateSessionEx || u32 unknown&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NS_services&amp;diff=2436</id>
		<title>NS services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NS_services&amp;diff=2436"/>
		<updated>2017-09-20T02:16:48Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ns:am =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SubmitArpData&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 ||&lt;br /&gt;
|-&lt;br /&gt;
| 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetTitlePatchContentNcaPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 ||&lt;br /&gt;
|-&lt;br /&gt;
| 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 ||&lt;br /&gt;
|-&lt;br /&gt;
| 27 ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || GetIAsyncValue&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetIAsyncResult&lt;br /&gt;
|-&lt;br /&gt;
| 33 ||&lt;br /&gt;
|-&lt;br /&gt;
| 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| 36 ||&lt;br /&gt;
|-&lt;br /&gt;
| 37 ||&lt;br /&gt;
|-&lt;br /&gt;
| 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| 39 ||&lt;br /&gt;
|-&lt;br /&gt;
| 40 ||&lt;br /&gt;
|-&lt;br /&gt;
| 41 ||&lt;br /&gt;
|-&lt;br /&gt;
| 42 ||&lt;br /&gt;
|-&lt;br /&gt;
| 43 ||&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetFreeSpace]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetTotalSpace]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 ||&lt;br /&gt;
|-&lt;br /&gt;
| 54 ||&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetApplicationDesiredLanguage&lt;br /&gt;
|-&lt;br /&gt;
| 56 ||&lt;br /&gt;
|-&lt;br /&gt;
| 57 ||&lt;br /&gt;
|-&lt;br /&gt;
| 58 ||&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#GetLanguageIdFromString]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 ||&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetIGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 ||&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetIRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || DeleteUserContent2&lt;br /&gt;
|-&lt;br /&gt;
| 200 ||&lt;br /&gt;
|-&lt;br /&gt;
| 201 ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 ||&lt;br /&gt;
|-&lt;br /&gt;
| 220 ||&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 ||&lt;br /&gt;
|-&lt;br /&gt;
| 303 ||&lt;br /&gt;
|-&lt;br /&gt;
| 304 ||&lt;br /&gt;
|-&lt;br /&gt;
| 305 ||&lt;br /&gt;
|-&lt;br /&gt;
| 306 ||&lt;br /&gt;
|-&lt;br /&gt;
| 307 ||&lt;br /&gt;
|-&lt;br /&gt;
| 401 ||&lt;br /&gt;
|-&lt;br /&gt;
| 402 ||&lt;br /&gt;
|-&lt;br /&gt;
| 403 ||&lt;br /&gt;
|-&lt;br /&gt;
| 404 ||&lt;br /&gt;
|-&lt;br /&gt;
| 405 ||&lt;br /&gt;
|-&lt;br /&gt;
| 502 ||&lt;br /&gt;
|-&lt;br /&gt;
| 503 ||&lt;br /&gt;
|-&lt;br /&gt;
| 504 ||&lt;br /&gt;
|-&lt;br /&gt;
| 600 ||&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [[#GetTitleInfo1]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 ||&lt;br /&gt;
|-&lt;br /&gt;
| 603 ||&lt;br /&gt;
|-&lt;br /&gt;
| 604 ||&lt;br /&gt;
|-&lt;br /&gt;
| 605 || Used same way as [[#GetTitleInfo1]].&lt;br /&gt;
|-&lt;br /&gt;
| 700 ||&lt;br /&gt;
|-&lt;br /&gt;
| 701 ||&lt;br /&gt;
|-&lt;br /&gt;
| 702 ||&lt;br /&gt;
|-&lt;br /&gt;
| 703 ||&lt;br /&gt;
|-&lt;br /&gt;
| 704 ||&lt;br /&gt;
|-&lt;br /&gt;
| 705 ||&lt;br /&gt;
|-&lt;br /&gt;
| 800 ||&lt;br /&gt;
|-&lt;br /&gt;
| 801 ||&lt;br /&gt;
|-&lt;br /&gt;
| 900 ||&lt;br /&gt;
|-&lt;br /&gt;
| 901 ||&lt;br /&gt;
|-&lt;br /&gt;
| 902 ||&lt;br /&gt;
|-&lt;br /&gt;
| 903 ||&lt;br /&gt;
|-&lt;br /&gt;
| 904 ||&lt;br /&gt;
|-&lt;br /&gt;
| 905 ||&lt;br /&gt;
|-&lt;br /&gt;
| 906 ||&lt;br /&gt;
|-&lt;br /&gt;
| 907 ||&lt;br /&gt;
|-&lt;br /&gt;
| 908 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1000 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1001 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1200 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1300 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1301 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1302 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1400 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1500 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1501 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1502 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1503 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1600 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1700 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1800 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1801 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1802 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetTitlePatchContentNcaPath ==&lt;br /&gt;
Takes a 0x16-type output buffer, an u8 [[NCA|type]], and an u64 titleID.&lt;br /&gt;
&lt;br /&gt;
The input titleID is used with the application-title table like various other cmds, anything not in that table can&#039;t be used with this.&lt;br /&gt;
&lt;br /&gt;
Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn&#039;t exist for this title. Starts with &amp;quot;@{SdCardContent,UserContent}://&amp;quot; and ends in &amp;quot;.nca&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For gamecard content, the output path is: &amp;quot;@GcSXXXXXXXX:/&amp;lt;NcaId&amp;gt;.nca&amp;quot;. NCA-type0 with gamecard returns 0 with an empty output string.&lt;br /&gt;
&lt;br /&gt;
The output string is then used by the user-process with [[Filesystem_services|FS]] to mount the content.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpace ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpace ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd23.&lt;br /&gt;
&lt;br /&gt;
== GetLanguageIdFromString ==&lt;br /&gt;
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for &#039;en-US&#039;).&lt;br /&gt;
&lt;br /&gt;
Returns 0 if an ID was successfully found, otherwise returns 0x25810.&lt;br /&gt;
&lt;br /&gt;
== ListApplicationRecord ==&lt;br /&gt;
Takes a type-6 output buffer and an u64.&lt;br /&gt;
&lt;br /&gt;
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.&lt;br /&gt;
&lt;br /&gt;
== GetTitleInfo1 ==&lt;br /&gt;
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is &amp;gt;= totalentries, this will return 0 with out_entrycount=0.&lt;br /&gt;
&lt;br /&gt;
Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;type&amp;quot;. [[Content_Manager_services|Title type]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;installedStorage&amp;quot; / [[Filesystem_services|StorageId]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. Non-zero with output from cmd 605, differs for app/update titles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32 Title-version&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 titleID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:su =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetISystemUpdateControl&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetNsSuWaitEvent&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:dev =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#LaunchTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateTitleByPid]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#TerminateTitleByTitleId]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetNsDevWaitEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetNsDevEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#TerminateCrashingTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#InstallTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || SetEventState6&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetEventState&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchTitle ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#LaunchProcess|LaunchProcess]].&lt;br /&gt;
&lt;br /&gt;
== TerminateTitleByPid ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== TerminateTitleByTitleId ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].&lt;br /&gt;
&lt;br /&gt;
== GetNsDevWaitEvent ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].&lt;br /&gt;
&lt;br /&gt;
== GetNsDevEventType ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].&lt;br /&gt;
&lt;br /&gt;
== TerminateCrashingTitle ==&lt;br /&gt;
Calls &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== InstallTitle ==&lt;br /&gt;
Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NS_services&amp;diff=2420</id>
		<title>NS services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NS_services&amp;diff=2420"/>
		<updated>2017-09-19T06:02:46Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ns:am =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SubmitArpData&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 ||&lt;br /&gt;
|-&lt;br /&gt;
| 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetTitlePatchContentNcaPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 ||&lt;br /&gt;
|-&lt;br /&gt;
| 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| 25 ||&lt;br /&gt;
|-&lt;br /&gt;
| 27 ||&lt;br /&gt;
|-&lt;br /&gt;
| 30 || GetIAsyncValue&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetIAsyncResult&lt;br /&gt;
|-&lt;br /&gt;
| 33 ||&lt;br /&gt;
|-&lt;br /&gt;
| 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| 36 ||&lt;br /&gt;
|-&lt;br /&gt;
| 37 ||&lt;br /&gt;
|-&lt;br /&gt;
| 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| 39 ||&lt;br /&gt;
|-&lt;br /&gt;
| 40 ||&lt;br /&gt;
|-&lt;br /&gt;
| 41 ||&lt;br /&gt;
|-&lt;br /&gt;
| 42 ||&lt;br /&gt;
|-&lt;br /&gt;
| 43 ||&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 ||&lt;br /&gt;
|-&lt;br /&gt;
| 46 ||&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetFreeSpace]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetTotalSpace]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 ||&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 ||&lt;br /&gt;
|-&lt;br /&gt;
| 54 ||&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetApplicationDesiredLanguage&lt;br /&gt;
|-&lt;br /&gt;
| 56 ||&lt;br /&gt;
|-&lt;br /&gt;
| 57 ||&lt;br /&gt;
|-&lt;br /&gt;
| 58 ||&lt;br /&gt;
|-&lt;br /&gt;
| 59 ||&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#GetLanguageIdFromString]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 ||&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetIGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 ||&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetIRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || DeleteUserContent1&lt;br /&gt;
|-&lt;br /&gt;
| 102 || DeleteUserContent2&lt;br /&gt;
|-&lt;br /&gt;
| 200 ||&lt;br /&gt;
|-&lt;br /&gt;
| 201 ||&lt;br /&gt;
|-&lt;br /&gt;
| 210 ||&lt;br /&gt;
|-&lt;br /&gt;
| 220 ||&lt;br /&gt;
|-&lt;br /&gt;
| 300 ||&lt;br /&gt;
|-&lt;br /&gt;
| 301 ||&lt;br /&gt;
|-&lt;br /&gt;
| 302 ||&lt;br /&gt;
|-&lt;br /&gt;
| 303 ||&lt;br /&gt;
|-&lt;br /&gt;
| 304 ||&lt;br /&gt;
|-&lt;br /&gt;
| 305 ||&lt;br /&gt;
|-&lt;br /&gt;
| 306 ||&lt;br /&gt;
|-&lt;br /&gt;
| 307 ||&lt;br /&gt;
|-&lt;br /&gt;
| 401 ||&lt;br /&gt;
|-&lt;br /&gt;
| 402 ||&lt;br /&gt;
|-&lt;br /&gt;
| 403 ||&lt;br /&gt;
|-&lt;br /&gt;
| 404 ||&lt;br /&gt;
|-&lt;br /&gt;
| 405 ||&lt;br /&gt;
|-&lt;br /&gt;
| 502 ||&lt;br /&gt;
|-&lt;br /&gt;
| 503 ||&lt;br /&gt;
|-&lt;br /&gt;
| 504 ||&lt;br /&gt;
|-&lt;br /&gt;
| 600 ||&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [[#GetTitleInfo1]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 ||&lt;br /&gt;
|-&lt;br /&gt;
| 603 ||&lt;br /&gt;
|-&lt;br /&gt;
| 604 ||&lt;br /&gt;
|-&lt;br /&gt;
| 605 || Used same way as [[#GetTitleInfo1]].&lt;br /&gt;
|-&lt;br /&gt;
| 700 ||&lt;br /&gt;
|-&lt;br /&gt;
| 701 ||&lt;br /&gt;
|-&lt;br /&gt;
| 702 ||&lt;br /&gt;
|-&lt;br /&gt;
| 703 ||&lt;br /&gt;
|-&lt;br /&gt;
| 704 ||&lt;br /&gt;
|-&lt;br /&gt;
| 705 ||&lt;br /&gt;
|-&lt;br /&gt;
| 800 ||&lt;br /&gt;
|-&lt;br /&gt;
| 801 ||&lt;br /&gt;
|-&lt;br /&gt;
| 900 ||&lt;br /&gt;
|-&lt;br /&gt;
| 901 ||&lt;br /&gt;
|-&lt;br /&gt;
| 902 ||&lt;br /&gt;
|-&lt;br /&gt;
| 903 ||&lt;br /&gt;
|-&lt;br /&gt;
| 904 ||&lt;br /&gt;
|-&lt;br /&gt;
| 905 ||&lt;br /&gt;
|-&lt;br /&gt;
| 906 ||&lt;br /&gt;
|-&lt;br /&gt;
| 907 ||&lt;br /&gt;
|-&lt;br /&gt;
| 908 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1000 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1001 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1200 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1300 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1301 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1302 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1400 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1500 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1501 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1502 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1503 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1600 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1700 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1800 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1801 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1802 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetTitlePatchContentNcaPath ==&lt;br /&gt;
Takes a 0x16-type output buffer, an u8 [[NCA|type]], and an u64 titleID.&lt;br /&gt;
&lt;br /&gt;
The input titleID is used with the application-title table like various other cmds, anything not in that table can&#039;t be used with this.&lt;br /&gt;
&lt;br /&gt;
Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn&#039;t exist for this title. Starts with &amp;quot;@{SdCardContent,UserContent}://&amp;quot; and ends in &amp;quot;.nca&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For gamecard content, the output path is: &amp;quot;@GcSXXXXXXXX:/&amp;lt;NcaId&amp;gt;.nca&amp;quot;. NCA-type0 with gamecard returns 0 with an empty output string.&lt;br /&gt;
&lt;br /&gt;
The output string is then used by the user-process with [[Filesystem_services|FS]] to mount the content.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpace ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpace ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd23.&lt;br /&gt;
&lt;br /&gt;
== GetLanguageIdFromString ==&lt;br /&gt;
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for &#039;en-US&#039;).&lt;br /&gt;
&lt;br /&gt;
Returns 0 if an ID was successfully found, otherwise returns 0x25810.&lt;br /&gt;
&lt;br /&gt;
== ListApplicationRecord ==&lt;br /&gt;
Takes a type-6 output buffer and an u64.&lt;br /&gt;
&lt;br /&gt;
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.&lt;br /&gt;
&lt;br /&gt;
== GetTitleInfo1 ==&lt;br /&gt;
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is &amp;gt;= totalentries, this will return 0 with out_entrycount=0.&lt;br /&gt;
&lt;br /&gt;
Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;type&amp;quot;. [[Content_Manager_services|Title type]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;installedStorage&amp;quot; / [[Filesystem_services|StorageId]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. Non-zero with output from cmd 605, differs for app/update titles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32 Title-version&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 titleID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:su =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetISystemUpdateControl&lt;br /&gt;
|-&lt;br /&gt;
| 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetNsSuWaitEvent&lt;br /&gt;
|-&lt;br /&gt;
| 10 ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:dev =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#LaunchTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateTitleByPid]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#TerminateTitleByTitleId]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetNsDevWaitEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetNsDevEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#TerminateCrashingTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#InstallTitle]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || SetEventState6&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetEventState&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchTitle ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#LaunchProcess|LaunchProcess]].&lt;br /&gt;
&lt;br /&gt;
== TerminateTitleByPid ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== TerminateTitleByTitleId ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].&lt;br /&gt;
&lt;br /&gt;
== GetNsDevWaitEvent ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].&lt;br /&gt;
&lt;br /&gt;
== GetNsDevEventType ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].&lt;br /&gt;
&lt;br /&gt;
== TerminateCrashingTitle ==&lt;br /&gt;
Calls &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== InstallTitle ==&lt;br /&gt;
Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Bluetooth_Driver_services&amp;diff=2418</id>
		<title>Bluetooth Driver services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Bluetooth_Driver_services&amp;diff=2418"/>
		<updated>2017-09-19T00:47:42Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= btdrv =&lt;br /&gt;
The bluetooth driver implements the bluetooth protocol over h4/uart.&lt;br /&gt;
&lt;br /&gt;
It interfaces with the [[Bus_services#uart|uart]] service to actually talk with the bluetooth hardware.&lt;br /&gt;
&lt;br /&gt;
The code seems to be derived from a broadcom stack. A good starting point for similar source code can be found in the MICO project: https://github.com/yinhongxing/mico/tree/ea67ff3659f12d730d4dc3b8d547b093bd2ee2ee/MICO/bluetooth_bte Note that the library files contain many (symbolized) functions which match btdrv.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Init&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Enable&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Disable&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CleanupAndShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAdapterProperties&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetAdapterProperty&lt;br /&gt;
|-&lt;br /&gt;
| 7 || SetAdapterProperty&lt;br /&gt;
|-&lt;br /&gt;
| 8 || StartDiscovery&lt;br /&gt;
|-&lt;br /&gt;
| 9 || CancelDiscovery&lt;br /&gt;
|-&lt;br /&gt;
| 10 || CreateBond&lt;br /&gt;
|-&lt;br /&gt;
| 11 || RemoveBond&lt;br /&gt;
|-&lt;br /&gt;
| 12 || CancelBond&lt;br /&gt;
|-&lt;br /&gt;
| 13 || PinReply&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SspReply&lt;br /&gt;
|-&lt;br /&gt;
| 15 ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 || InitInterfaces&lt;br /&gt;
|-&lt;br /&gt;
| 17 || HidHostInterface_Connect&lt;br /&gt;
|-&lt;br /&gt;
| 18 || HidHostInterface_Disconnect&lt;br /&gt;
|-&lt;br /&gt;
| 19 || HidHostInterface_SendData&lt;br /&gt;
|-&lt;br /&gt;
| 20 || HidHostInterface_SendData2&lt;br /&gt;
|-&lt;br /&gt;
| 21 || HidHostInterface_SetReport&lt;br /&gt;
|-&lt;br /&gt;
| 22 || HidHostInterface_GetReport&lt;br /&gt;
|-&lt;br /&gt;
| 23 || HidHostInterface_WakeController&lt;br /&gt;
|-&lt;br /&gt;
| 24 || HidHostInterface_AddPairedDevice&lt;br /&gt;
|-&lt;br /&gt;
| 25 || HidHostInterface_GetPairedDevice&lt;br /&gt;
|-&lt;br /&gt;
| 26 || HidHostInterface_CleanupAndShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 27 || &lt;br /&gt;
|-&lt;br /&gt;
| 28 || ExtInterface_SetTSI&lt;br /&gt;
|-&lt;br /&gt;
| 29 || ExtInterface_SetBurstMode&lt;br /&gt;
|-&lt;br /&gt;
| 30 || ExtInterface_SetZeroRetran&lt;br /&gt;
|-&lt;br /&gt;
| 31 || ExtInterface_SetMcMode&lt;br /&gt;
|-&lt;br /&gt;
| 32 || ExtInterface_StartLlrMode&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ExtInterface_ExitLlrMode&lt;br /&gt;
|-&lt;br /&gt;
| 34 || ExtInterface_SetRadio&lt;br /&gt;
|-&lt;br /&gt;
| 35 || ExtInterface_SetVisibility&lt;br /&gt;
|-&lt;br /&gt;
| 36 || &lt;br /&gt;
|-&lt;br /&gt;
| 37 || &lt;br /&gt;
|-&lt;br /&gt;
| 38 || HidHostInterface_GetLatestPlr&lt;br /&gt;
|-&lt;br /&gt;
| 39 || ExtInterface_GetPendingConnections&lt;br /&gt;
|-&lt;br /&gt;
| 40 || HidHostInterface_GetChannelMap&lt;br /&gt;
|-&lt;br /&gt;
| 41 || SetIsBluetoothBoostEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 42 || GetIsBluetoothBoostEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 43 || SetIsBluetoothAfhEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetIsBluetoothAfhEnabled&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Services_API&amp;diff=2265</id>
		<title>Services API</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Services_API&amp;diff=2265"/>
		<updated>2017-09-01T09:20:29Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).&lt;br /&gt;
&lt;br /&gt;
Handles for services are retrieved from the service manager port, &amp;quot;sm:&amp;quot;. Manager service &amp;quot;sm:m&amp;quot; also exists. Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.&lt;br /&gt;
&lt;br /&gt;
= sm: =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetService]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#RegisterService]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#UnregisterService]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x8000000A&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x00000001&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || Pid&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Always 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000A&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000C&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Max sessions? 32-bit integer.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Unknown bool&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UnregisterService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000A&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000003&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= sm:m =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RegisterProcess || u32 PID + 2 A Descriptors (unknown, probably service access lists of some kind) ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UnregisterProcess || u32 PID ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Service List =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Service names&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| acc:u0, acc:u1, acc:aa, acc:su&lt;br /&gt;
| [[Account services]]&lt;br /&gt;
| u0: System, u1: User, su: Admin, aa: Baas&lt;br /&gt;
|-&lt;br /&gt;
| ahid:cd, ahid:hdr, hid, hid:dbg, hid:sys, irs, irs:sys, xcd:sys&lt;br /&gt;
| [[HID services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| appletAE, appletOE, idle:sys, omm, spsm&lt;br /&gt;
| [[AM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [ [[1.0.0]] +] aoc:u, mii:u, mii:e, ns:am, ns:su, ns:dev, pl:u, ovln:rcv, ovln:snd, pdm:ntfy, pdm:qry&lt;br /&gt;
&lt;br /&gt;
[ [[3.0.0]] +] aoc:u, ns:am2, ns:dev, ns:ec, ns:rid, ns:rt, ns:su, ns:vm, ns:web, ovln:rcv, ovln:snd&lt;br /&gt;
| [[NS Services]]&lt;br /&gt;
| am: Application Manager, su: System Update&lt;br /&gt;
|-&lt;br /&gt;
| apm, apm:p, apm:sys, fgm, fgm:0, fgm:9, (fgm:dbg?)&lt;br /&gt;
| [[APM services]]&lt;br /&gt;
| fgm: Fuel guage?&lt;br /&gt;
|-&lt;br /&gt;
| arp:r, arp:w, bgtc:t, bgtc:sc&lt;br /&gt;
| [[Glue services]]&lt;br /&gt;
| r: Reader, w: Writer&lt;br /&gt;
|-&lt;br /&gt;
| audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl, codecctl, hwopus&lt;br /&gt;
| Audio services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;bcat:a, bcat:u, bcat:m, bcat:s, news:a, news:c, news:m, news:p, news:v, prepo:u, prepo:s, prepo:m, prepo:a&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| [[BCAT services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bpc, bpc:r, pcv, pcv:arb, pcv:imm, time:u, time:a, time:s&lt;br /&gt;
| [[PCV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bsd:u, bsd:s, bsdcfg, ethc:c, ethc:i, nsd:u, nsd:a, sfdnsres&lt;br /&gt;
| [[Sockets services]], [[NSD services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| btdrv&lt;br /&gt;
| [[Bluetooth Driver services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| btm, btm:dbg, btm:sys&lt;br /&gt;
| Battery services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| caps:a, caps:c&lt;br /&gt;
| [[Capture services]]&lt;br /&gt;
| a: AlbumAccessor, c: AlbumControl&lt;br /&gt;
|-&lt;br /&gt;
| caps:sc, caps:ss, mm:u, vi:m, vi:s, vi:u, cec-mgr&lt;br /&gt;
| [[Display services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| dispdrv&lt;br /&gt;
| Nvnflinger services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| erpt:c, erpt:r&lt;br /&gt;
| [[Error Report services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| es&lt;br /&gt;
| ETicket services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fan, psm, tc, ts&lt;br /&gt;
| [[PTM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fatal:u, fatal:p&lt;br /&gt;
| Fatal Error services&lt;br /&gt;
| u: User, p: Privileged&lt;br /&gt;
|-&lt;br /&gt;
| friend:u, friend:v, friend:m, friend:s, friend:a&lt;br /&gt;
| Friend services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fsp-srv, fsp-ldr, fsp-pr&lt;br /&gt;
| [[Filesystem services]]&lt;br /&gt;
| srv: Main, ldr: Loader, pr: Program Registry&lt;br /&gt;
|-&lt;br /&gt;
| gpio, i2c, i2c:pcv, pinmux, pwm, uart&lt;br /&gt;
| [[Bus services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| htc, htcs, htc:tenv&lt;br /&gt;
| [[TMA services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lbl&lt;br /&gt;
| [[Backlight services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ldn:m, ldn:s, ldn:u&lt;br /&gt;
| [[LDN services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [ [[1.0.0]]+ ] ldr:pm, ldr:ro, ldr:shel, ldr:dmnt&lt;br /&gt;
&lt;br /&gt;
[ [[3.0.0]]+ ] ldr:pm, ldr:shel, ldr:dmnt&lt;br /&gt;
| [[Loader services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lm&lt;br /&gt;
| [[Log services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| manu&lt;br /&gt;
| [[Manu Services]]&lt;br /&gt;
| &amp;quot;Manufacturing&amp;quot;, present in factory firmware but not installed on retail systems.&lt;br /&gt;
|-&lt;br /&gt;
| lr, ncm, ncm:v&lt;br /&gt;
| [[NCM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nfc:am, nfc:mf:u, nfc:user, nfc:sys&lt;br /&gt;
| NFC services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nifm:u, nifm:a, nifm:s&lt;br /&gt;
| [[Network Interface services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nim, nim:shp, ntc&lt;br /&gt;
| [[NIM services]]&lt;br /&gt;
| shp: eShop&lt;br /&gt;
|-&lt;br /&gt;
| npns:u, npns:s&lt;br /&gt;
| NPNS services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvgem:c, nvgem:cd, nvmemp&lt;br /&gt;
| [[NV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pcie&lt;br /&gt;
| [[PCIe services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pctl, pctl:a, pctl:s, pctl:r&lt;br /&gt;
| [[Parental Control services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pm:bm, pm:info, pm:shell&lt;br /&gt;
| [[Process Manager services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| psc:c, psc:m&lt;br /&gt;
| PSC services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [ [[3.0.0]]+ ] ldr:ro, ro:dmnt&lt;br /&gt;
| [[Loader services|RO services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| set, set:fd, set:cal, set:sys&lt;br /&gt;
| [[Settings services]]&lt;br /&gt;
| cal: calibration, sys: System Settings&lt;br /&gt;
|-&lt;br /&gt;
| [ [[3.0.0]]+ ] mii:u, mii:e, pdm:ntfy, pdm:qry, pl:u&lt;br /&gt;
| [[Shared Database services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ssl&lt;br /&gt;
| [[SSL services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| csrng, spl:&lt;br /&gt;
| [[SPL services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm&lt;br /&gt;
| [[USB services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| wlan:inf, wlan:lcl, wlan:lg, wlan:lga, wlan:sg, wlan:soc&lt;br /&gt;
| WLAN services&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Services_API&amp;diff=2264</id>
		<title>Services API</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Services_API&amp;diff=2264"/>
		<updated>2017-09-01T09:20:10Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Services are system processes running in the background which wait for incoming requests. When a process wants to communicate with a service, it first needs to get a handle to the named service, and then it can communicate with the service via inter-process communication (each service has a name up to 8 characters).&lt;br /&gt;
&lt;br /&gt;
Handles for services are retrieved from the service manager port, &amp;quot;sm:&amp;quot;. Manager service &amp;quot;sm:m&amp;quot; also exists. Services are an abstraction of ports, they operate the same way except regular ports can have their handles retrieved directly from a SVC.&lt;br /&gt;
&lt;br /&gt;
= sm: =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Initialize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetService]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#RegisterService]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#UnregisterService]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x8000000A&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x00000001&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || Pid&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Always 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000A&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000C&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Max sessions? 32-bit integer.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Unknown bool&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UnregisterService ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x0000000A&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || &amp;quot;SFCI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x00000003&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Service name, zero padded and casted to u64.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= sm:m =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RegisterProcess || u32 PID + 2 A Descriptors (unknown, probably service access lists of some kind) ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UnregisterProcess || u32 PID ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Service List =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Service names&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;200&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| acc:u0, acc:u1, acc:aa, acc:su&lt;br /&gt;
| [[Account services]]&lt;br /&gt;
| u0: System, u1: User, su: Admin, aa: Baas&lt;br /&gt;
|-&lt;br /&gt;
| ahid:cd, ahid:hdr, hid, hid:dbg, hid:sys, irs, irs:sys, xcd:sys&lt;br /&gt;
| [[HID services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| appletAE, appletOE, idle:sys, omm, spsm&lt;br /&gt;
| [[AM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [ [[1.0.0]] +] aoc:u, mii:u, mii:e, ns:am, ns:su, ns:dev, pl:u, ovln:rcv, ovln:snd, pdm:ntfy, pdm:qry&lt;br /&gt;
&lt;br /&gt;
[ [[3.0.0]] +] aoc:u, ns:am2, ns:dev, ns:ec, ns:rid, ns:rt, ns:su, ns:vm, ns:web, ovln:rcv, ovln:snd&lt;br /&gt;
| [[NS Services]]&lt;br /&gt;
| am: Application Manager, su: System Update&lt;br /&gt;
|-&lt;br /&gt;
| apm, apm:p, apm:sys, fgm, fgm:0, fgm:9, (fgm:dbg?)&lt;br /&gt;
| [[APM services]]&lt;br /&gt;
| fgm: Fuel guage?&lt;br /&gt;
|-&lt;br /&gt;
| arp:r, arp:w, bgtc:t, bgtc:sc&lt;br /&gt;
| [[Glue services]]&lt;br /&gt;
| r: Reader, w: Writer&lt;br /&gt;
|-&lt;br /&gt;
| audin:a, audin:d, audin:u, audout:a, audout:d, audout:u, audren:a, audren:d, audren:u, audrec:a, audrec:d, audrec:u, audctl, codecctl, hwopus&lt;br /&gt;
| Audio services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;bcat:a, bcat:u, bcat:m, bcat:s, news:a, news:c, news:m, news:p, news:v, prepo:u, prepo:s, prepo:m, prepo:a&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| [[BCAT services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bpc, bpc:r, pcv, pcv:arb, pcv:imm, time:u, time:a, time:s&lt;br /&gt;
| [[PCV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| bsd:u, bsd:s, bsdcfg, ethc:c, ethc:i, nsd:u, nsd:a, sfdnsres&lt;br /&gt;
| [[Sockets services]], [[NSD services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| btdrv&lt;br /&gt;
| [[Bluetooth Driver services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| btm, btm:dbg, btm:sys&lt;br /&gt;
| Battery services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| caps:a, caps:c&lt;br /&gt;
| [[Capture services]]&lt;br /&gt;
| a: AlbumAccessor, c: AlbumControl&lt;br /&gt;
|-&lt;br /&gt;
| caps:sc, caps:ss, mm:u, vi:m, vi:s, vi:u, cec-mgr&lt;br /&gt;
| [[Display services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| dispdrv&lt;br /&gt;
| Nvnflinger services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| erpt:c, erpt:r&lt;br /&gt;
| [[Error Report services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| es&lt;br /&gt;
| ETicket services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fan, psm, tc, ts&lt;br /&gt;
| [[PTM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fatal:u, fatal:p&lt;br /&gt;
| Fatal Error services&lt;br /&gt;
| u: User, p: Privileged&lt;br /&gt;
|-&lt;br /&gt;
| friend:u, friend:v, friend:m, friend:s, friend:a&lt;br /&gt;
| Friend services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| fsp-srv, fsp-ldr, fsp-pr&lt;br /&gt;
| [[Filesystem services]]&lt;br /&gt;
| srv: Main, ldr: Loader, pr: Program Registry&lt;br /&gt;
|-&lt;br /&gt;
| gpio, i2c, i2c:pcv, pinmux, pwm, uart&lt;br /&gt;
| [[Bus services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| htc, htcs, htc:tenv&lt;br /&gt;
| [[TMA services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lbl&lt;br /&gt;
| [[Backlight services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ldn:m, ldn:s, ldn:u&lt;br /&gt;
| [[LDN services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [ [[1.0.0]]+ ] ldr:pm, ldr:ro, ldr:shel, ldr:dmnt&lt;br /&gt;
&lt;br /&gt;
[ [[3.0.0]]+ ] ldr:pm, ldr:shel, ldr:dmnt&lt;br /&gt;
| [[Loader services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| lm&lt;br /&gt;
| [[Log services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| manu&lt;br /&gt;
| [[Manu Services]]&lt;br /&gt;
| &amp;quot;Manufacturing&amp;quot;, present in factory firmware but not installed on retail systems.&lt;br /&gt;
|-&lt;br /&gt;
| lr, ncm, ncm:v&lt;br /&gt;
| [[NCM services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nfc:am, nfc:mf:u, nfc:user, nfc:sys&lt;br /&gt;
| NFC services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nifm:u, nifm:a, nifm:s&lt;br /&gt;
| [[Network Interface services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| nim, nim:shp, ntc&lt;br /&gt;
| [[NIM services]]&lt;br /&gt;
| shp: eShop&lt;br /&gt;
|-&lt;br /&gt;
| npns:u, npns:s&lt;br /&gt;
| NPNS services&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| nvdrv:a, nvdrv:s, nvdrv:t, nvdrv, nvdrvdbg, nvgem:c, nvgem:cd, nvmemp&lt;br /&gt;
| [[NV services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pcie&lt;br /&gt;
| [[PCIe services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pctl, pctl:a, pctl:s, pctl:r&lt;br /&gt;
| [[Parental Control services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| pm:bm, pm:info, pm:shell&lt;br /&gt;
| [[Process Manager services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| psc:c, psc:m&lt;br /&gt;
| PSC services&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [ [[3.0.0]]+ ] ldr:ro, ro:dmnt&lt;br /&gt;
| [[Loader services|RO services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| set, set:fd, set:cal, set:sys&lt;br /&gt;
| [[Settings services]]&lt;br /&gt;
| cal: calibration, sys: System Settings&lt;br /&gt;
|-&lt;br /&gt;
| [ [[3.0.0]]+ ] mii:u, mii:e, pdm:ntfy, pdm:qry, pl:u&lt;br /&gt;
| [[Shared Database Services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| ssl&lt;br /&gt;
| [[SSL services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| csrng, spl:&lt;br /&gt;
| [[SPL services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| usb:ds, usb:hs, usb:pd, usb:pd:c, usb:pm&lt;br /&gt;
| [[USB services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| wlan:inf, wlan:lcl, wlan:lg, wlan:lga, wlan:sg, wlan:soc&lt;br /&gt;
| WLAN services&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=2263</id>
		<title>Shared Database services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=2263"/>
		<updated>2017-09-01T09:19:32Z</updated>

		<summary type="html">&lt;p&gt;Hthh: Created page with &amp;quot; = pl:u (Shared Font Manager) = {| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |- ! Cmd || Name |- | 0 || RequestLoad |- | 1 || GetLoadState |- | 2 || GetSize |- | 3 || GetSharedMemoryAddres...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= pl:u (Shared Font Manager) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestLoad&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetLoadState&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetSharedMemoryAddressOffset&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSharedMemoryNativeHandle&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetSharedFontInOrderOfPriority&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=2242</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=2242"/>
		<updated>2017-08-31T02:47:45Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || MountCode || u64 TID + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsCodeMounted || u64 PID || Returns a bool (1 if code is mounted).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetFsPermissions || u8 storageID, u32 PID, u64 TID, ACI0_buf_size, ACID_buf_size + two A descriptors (the 0x1C FS-access control from ACI0 + the 0x2C FS-access control from ACID). || Actual FS permissions are set to (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ClearFsPermissions || u32 PID to clear ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || SetEnabledProgramVerification || bool enabled ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying a RSA signature fails. This RSA signature seems to be the signature in the [[NPDM]] ACID. It then skips verifying what seems to be the second signature in the [[NCA_Format|NCA header]]. Note that if verifying the NPDM(?) signature is successful, and verifying that second signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Required permissions-type and func&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Initialize]] || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#MountContent7]] || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#MountContent]] || Depends on input.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || OpenDataFileSystemByApplicationId [3.0.0+] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#MountBis]] || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystemImpl || &lt;br /&gt;
|-&lt;br /&gt;
| 18 || MountSdCard || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || FormatSdCard || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSystemSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataAtomicDeletion || &lt;br /&gt;
|-&lt;br /&gt;
| 25 || DeleteSaveDataWithSpaceId || &lt;br /&gt;
|-&lt;br /&gt;
| 26 || FormatSdCardDryRun || &lt;br /&gt;
|-&lt;br /&gt;
| 27 || IsExFatSupported || &lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#MountGameCardPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 32 || ExtendSaveData [3.0.0+] ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#MountSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#MountSystemSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 53 || MountSaveDataReadOnly || &lt;br /&gt;
|-&lt;br /&gt;
| 57 || ReadSaveDataFileSystemExtraDataWithSpaceId [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 58 || ReadSaveDataFileSystemExtraData || &lt;br /&gt;
|-&lt;br /&gt;
| 59 || WriteSaveDataFileSystemExtraData || &lt;br /&gt;
|-&lt;br /&gt;
| 60 || OpenSaveDataInfoReader || &lt;br /&gt;
|-&lt;br /&gt;
| 61 || OpenSaveDataIterator || &lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataThumbnailFile || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || MountImageDirectory || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#MountContentStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess || &lt;br /&gt;
|-&lt;br /&gt;
| 201 || OpenDataStorageByApplicationId [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]] || &lt;br /&gt;
|-&lt;br /&gt;
| 203 || Returns an [[#IStorage]]. || &lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]] || &lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]] || &lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]] || &lt;br /&gt;
|-&lt;br /&gt;
| 600 || SetCurrentPosixTime || 0x18, 1&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize || &lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataForDebug || &lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile || &lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles || &lt;br /&gt;
|-&lt;br /&gt;
| 606 || GetRightsId || &lt;br /&gt;
|-&lt;br /&gt;
| 607 || RegisterExternalKey || 0x18, 1&lt;br /&gt;
|-&lt;br /&gt;
| 608 || UnregisterExternalKey || &lt;br /&gt;
|-&lt;br /&gt;
| 609 || GetRightsIdByPath || &lt;br /&gt;
|-&lt;br /&gt;
| 610 || GetRightsIdByPath2 (returns extra byte) [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 620 || [[#SetSdCardEncryptionSeed]] || 0x19, 1&lt;br /&gt;
|-&lt;br /&gt;
| 800 || GetAndClearFileSystemProxyErrorInfo || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath || &lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation || &lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]] || 0x10, 1&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]] || None&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]] || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Each time permissions are checked, the [[#fsp-pr|process-obj]] is loaded using the session PID, then a func is called with the permissions-type. The func retval is checked, then the permissions [[Error_codes|error]] is thrown if needed.&lt;br /&gt;
&lt;br /&gt;
Internally in that process-obj load func, it will load the obj as normal when the PID is &amp;gt;6, otherwise it will use a fixed obj. If not done already, that fixed obj will be initialized using fixed input data, via the same code used internally by [[#fsp-pr]].&lt;br /&gt;
&lt;br /&gt;
In general this func uses the input permissions-type to determine what mask value to use. That value is masked with the [[NPDM|permissions]] from the above process-obj. When the result is 0, 0 is returned, otherwise non-zero is returned. The default non-zero retval is basically 0x3.&lt;br /&gt;
&lt;br /&gt;
Panic is triggered when the input type is &amp;gt;{max value} / invalid.&lt;br /&gt;
&lt;br /&gt;
Func0:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Non-zero retval || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xA 0xD 0x16 0x1F 0x20 0x21 0x22 || 0x8000000000000080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 0x17 0x18 0x19 0x1A 0x1B 0x1C || 0x8000000000010080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x0 0x1 0x2 0x3 0x4 0x5 || 0x8000000000000801 || 0x1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x9 0x1D 0x1E || 0x8000000000000084 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xB 0xC || 0x8000000000008080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xE 0x23 || 0xC000000000200000 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 0x13 || 0x8000000000000020 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || || || In this case it appears the func returns retval &amp;amp; 0xff, where retval = {bit0=0, bit1..bit63=obj_permissions starting at bit0}?&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000010 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000040020 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000028 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000010082 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000100 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000100008 || 0x1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000400000 || Default || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Func1(non-zero retval is always 0x1):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 0x1 || 0x8000000000000080 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2 0x3 || 0x8000000000000010 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x4 0x5 || 0x8000000000000200 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7 0xB || 0x8000000000000060 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xC 0x1A || 0x8000000000004020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 0x11 || 0x8000000000080000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000020000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000400 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000004060 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0xC000000000800000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000001000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000002000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000004000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000008000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000010000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000000800 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || || Invalid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x8000000E&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x00000001&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || Pid&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || Always. 0x18000001&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Always. 0&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;quot;SCFI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Always 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MountContent7 ==&lt;br /&gt;
Takes an input u32 ([[NCA]]-type) and an u64 title-id. Web-applet loads the u32 from u32_table[inparam]. Only type4 is usable with this?&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and the below &amp;quot;MountContent&amp;quot; as &amp;quot;MountContent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== MountContent ==&lt;br /&gt;
Takes a type-0x19 input buffer, an in32, and an input title-id.&lt;br /&gt;
&lt;br /&gt;
The in32 must be 5 if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The in32 must be 2..7.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from nsam [[NS_Services#GetContentNcaPath|GetContentNcaPath]].&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and in32=7.&lt;br /&gt;
&lt;br /&gt;
After the in32-specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When in32=5, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! in32 || Required permissions-type and func&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 0x2, 0&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 0x3, 0&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 0x1, 0&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 0x4, 0&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 0x5, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MountBis ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 Bis partitionID(see below). Official user-process code sets instr[0] = 0 normally.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisPartition]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisPartition ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveData ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSystemSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardPartition ==&lt;br /&gt;
&lt;br /&gt;
Takes an input u32 (partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountGameCardPartition ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a gamecard [[Gamecard_Partition|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process can mount a given savedata at any given time (this includes systemsavedata).&lt;br /&gt;
&lt;br /&gt;
== MountSystemSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== MountContentStorage ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[Content_Manager_services#ReadEntryRaw]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveData ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes 0x10-bytes of input.&lt;br /&gt;
&lt;br /&gt;
Appears to be used to load the seed into FS-module state, since FS-module itself doesn&#039;t seem to have file-reading code to handle this itself.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module uses this with data read from a file.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetEntryType&lt;br /&gt;
|-&lt;br /&gt;
| 8 || OpenFile&lt;br /&gt;
|-&lt;br /&gt;
| 9 || OpenDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Commit&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetTotalSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 13 || CleanDirectoryRecursively [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetFileTimeStampRaw [3.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetEntryCount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 213 ||&lt;br /&gt;
|-&lt;br /&gt;
| 214 || GetGameCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 215 ||&lt;br /&gt;
|-&lt;br /&gt;
| 216 ||&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] Returns 0x40-bytes of output data.&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BindEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent || Installed SD card contents&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard || Raw SD card partition&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent || NandSystem partition.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent || NandUser partition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=BisPartitionID=&lt;br /&gt;
* 0: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 0.&lt;br /&gt;
* 10: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 1.&lt;br /&gt;
* Rest: see [[Flash_Filesystem|here]].&lt;br /&gt;
&lt;br /&gt;
=Save Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| ContentStorageId? 0 for SystemSaveData. 1 for SaveData. 2 for DeviceSaveData(with official user-processes all other fields are 0 for DeviceSaveData).&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=SaveCreate Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=DeviceSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
=BcatSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveData]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=2239</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=2239"/>
		<updated>2017-08-30T01:36:02Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || MountCode || u64 TID + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsCodeMounted || u64 PID || Returns a bool (1 if code is mounted).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetFsPermissions || u8 storageID, u32 PID, u64 TID, ACI0_buf_size, ACID_buf_size + two A descriptors (the 0x1C FS-access control from ACI0 + the 0x2C FS-access control from ACID). || Actual FS permissions are set to (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ClearFsPermissions || u32 PID to clear ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || SetEnabledProgramVerification || bool enabled ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying a RSA signature fails. This RSA signature seems to be the signature in the [[NPDM]] ACID. It then skips verifying what seems to be the second signature in the [[NCA_Format|NCA header]]. Note that if verifying the NPDM(?) signature is successful, and verifying that second signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Required permissions-type and func&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Initialize]] || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#MountContent7]] || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#MountContent]] || Depends on input.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || OpenDataFileSystemByApplicationId [3.0.0+] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#MountBis]] || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystemImpl || &lt;br /&gt;
|-&lt;br /&gt;
| 18 || MountSdCard || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || FormatSdCard || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSystemSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataAtomicDeletion || &lt;br /&gt;
|-&lt;br /&gt;
| 25 || DeleteSaveDataWithSpaceId || &lt;br /&gt;
|-&lt;br /&gt;
| 26 || FormatSdCardDryRun || &lt;br /&gt;
|-&lt;br /&gt;
| 27 || IsExFatSupported || &lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#MountGameCardPartition]] || &lt;br /&gt;
|-&lt;br /&gt;
| 32 || ExtendSaveData [3.0.0+] ||&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#MountSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#MountSystemSaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 53 || MountSaveDataReadOnly || &lt;br /&gt;
|-&lt;br /&gt;
| 57 || ReadSaveDataFileSystemExtraDataWithSpaceId [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 58 || ReadSaveDataFileSystemExtraData || &lt;br /&gt;
|-&lt;br /&gt;
| 59 || WriteSaveDataFileSystemExtraData || &lt;br /&gt;
|-&lt;br /&gt;
| 60 || OpenSaveDataInfoReader || &lt;br /&gt;
|-&lt;br /&gt;
| 61 || OpenSaveDataIterator || &lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataThumbnailFile || &lt;br /&gt;
|-&lt;br /&gt;
| 100 || MountImageDirectory || &lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#MountContentStorage]] || &lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess || &lt;br /&gt;
|-&lt;br /&gt;
| 201 || OpenDataStorageByApplicationId [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]] || &lt;br /&gt;
|-&lt;br /&gt;
| 203 || Returns an [[#IStorage]]. || &lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]] || &lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]] || &lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]] || &lt;br /&gt;
|-&lt;br /&gt;
| 600 || SetCurrentPosixTime || 0x18, 1&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize || &lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveData]] || &lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataForDebug || &lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile || &lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles || &lt;br /&gt;
|-&lt;br /&gt;
| 606 || GetRightsId || &lt;br /&gt;
|-&lt;br /&gt;
| 607 || RegisterExternalKey || 0x18, 1&lt;br /&gt;
|-&lt;br /&gt;
| 608 || UnregisterExternalKey || &lt;br /&gt;
|-&lt;br /&gt;
| 609 || GetRightsIdByPath || &lt;br /&gt;
|-&lt;br /&gt;
| 610 || GetRightsIdByPath2 (returns extra byte) [3.0.0+] || &lt;br /&gt;
|-&lt;br /&gt;
| 620 || [[#SetSdCardEncryptionSeed]] || 0x19, 1&lt;br /&gt;
|-&lt;br /&gt;
| 800 || GetAndClearFileSystemProxyErrorInfo || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || SetSaveDataSize || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || SetSaveDataRootPath || &lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation || &lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]] || 0x10, 1&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]] || None&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]] || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Each time permissions are checked, the [[#fsp-pr|process-obj]] is loaded using the session PID, then a func is called with the permissions-type. The func retval is checked, then the permissions [[Error_codes|error]] is thrown if needed.&lt;br /&gt;
&lt;br /&gt;
Internally in that process-obj load func, it will load the obj as normal when the PID is &amp;gt;6, otherwise it will use a fixed obj. If not done already, that fixed obj will be initialized using fixed input data, via the same code used internally by [[#fsp-pr]].&lt;br /&gt;
&lt;br /&gt;
In general this func uses the input permissions-type to determine what mask value to use. That value is masked with the [[NPDM|permissions]] from the above process-obj. When the result is 0, 0 is returned, otherwise non-zero is returned. The default non-zero retval is basically 0x3.&lt;br /&gt;
&lt;br /&gt;
Panic is triggered when the input type is &amp;gt;{max value} / invalid.&lt;br /&gt;
&lt;br /&gt;
Func0:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Non-zero retval || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0xA 0xD 0x16 0x1F 0x20 0x21 0x22 || 0x8000000000000080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 0x17 0x18 0x19 0x1A 0x1B 0x1C || 0x8000000000010080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x0 0x1 0x2 0x3 0x4 0x5 || 0x8000000000000801 || 0x1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x9 0x1D 0x1E || 0x8000000000000084 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xB 0xC || 0x8000000000008080 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xE 0x23 || 0xC000000000200000 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 0x13 || 0x8000000000000020 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || || || In this case it appears the func returns retval &amp;amp; 0xff, where retval = {bit0=0, bit1..bit63=obj_permissions starting at bit0}?&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000010 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000040020 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000000028 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000010082 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000100 || Default || &lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000100008 || 0x1 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0xC000000000400000 || Default || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Func1(non-zero retval is always 0x1):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 0x1 || 0x8000000000000080 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x2 0x3 || 0x8000000000000010 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x4 0x5 || 0x8000000000000200 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x7 0xB || 0x8000000000000060 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xC 0x1A || 0x8000000000004020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x10 0x11 || 0x8000000000080000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000020000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000000400 || &lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000004060 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0xC000000000800000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000001000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000002000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000004000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000008000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000010000000 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000000800 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || || Invalid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initialize ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Word || Value&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0x8000000E&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x00000001&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0-1 || Pid&lt;br /&gt;
|- style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0 || Always. 0x18000001&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Always. 0&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;quot;SCFI&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Always 0.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MountContent7 ==&lt;br /&gt;
Takes an input u32 ([[NCA]]-type) and an u64 title-id. Web-applet loads the u32 from u32_table[inparam]. Only type4 is usable with this?&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and the below &amp;quot;MountContent&amp;quot; as &amp;quot;MountContent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== MountContent ==&lt;br /&gt;
Takes a type-0x19 input buffer, an in32, and an input title-id.&lt;br /&gt;
&lt;br /&gt;
The in32 must be 5 if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The in32 must be 2..7.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from nsam [[NS_Services#GetContentNcaPath|GetContentNcaPath]].&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and in32=7.&lt;br /&gt;
&lt;br /&gt;
After the in32-specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When in32=5, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! in32 || Required permissions-type and func&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 0x0, 0&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 0x2, 0&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 0x3, 0&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 0x1, 0&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 0x4, 0&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 0x5, 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MountBis ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 Bis partitionID(see below). Official user-process code sets instr[0] = 0 normally.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisPartition]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisPartition ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveData ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSystemSaveData ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardPartition ==&lt;br /&gt;
&lt;br /&gt;
Takes an input u32 (partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountGameCardPartition ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a gamecard [[Gamecard_Partition|partition]].&lt;br /&gt;
&lt;br /&gt;
== MountSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process can mount a given savedata at any given time (this includes systemsavedata).&lt;br /&gt;
&lt;br /&gt;
== MountSystemSaveData ==&lt;br /&gt;
Takes an input u8 and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== MountContentStorage ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[Content_Manager_services#ReadEntryRaw]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveData ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes 0x10-bytes of input.&lt;br /&gt;
&lt;br /&gt;
Appears to be used to load the seed into FS-module state, since FS-module itself doesn&#039;t seem to have file-reading code to handle this itself.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module uses this with data read from a file.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetEntryType&lt;br /&gt;
|-&lt;br /&gt;
| 8 || OpenFile&lt;br /&gt;
|-&lt;br /&gt;
| 9 || OpenDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Commit&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetTotalSpaceSize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetEntryCount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 6 ||&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 213 ||&lt;br /&gt;
|-&lt;br /&gt;
| 214 || GetGameCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 215 ||&lt;br /&gt;
|-&lt;br /&gt;
| 216 ||&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] Returns 0x40-bytes of output data.&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || BindEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 1 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcS00000001 || Gamecard Contents.&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent || Installed SD card contents&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard || Raw SD card partition&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent || NandSystem partition.&lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent || NandUser partition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=BisPartitionID=&lt;br /&gt;
* 0: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 0.&lt;br /&gt;
* 10: Raw NAND sectors access for MMC [[Flash_Filesystem|boot]] partition 1.&lt;br /&gt;
* Rest: see [[Flash_Filesystem|here]].&lt;br /&gt;
&lt;br /&gt;
=Save Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| ContentStorageId? 0 for SystemSaveData. 1 for SaveData. 2 for DeviceSaveData(with official user-processes all other fields are 0 for DeviceSaveData).&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=SaveCreate Struct=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| [[Savegames|IVFC]] level4 size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Same as offset 0x0 normally? Hard-coded to 0x80000 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData. [[Savegames|IVFC]] level4 block-size in bytes?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
=DeviceSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
=BcatSaveData=&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveData]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Switch_System_Flaws&amp;diff=1722</id>
		<title>Switch System Flaws</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Switch_System_Flaws&amp;diff=1722"/>
		<updated>2017-07-20T13:30:57Z</updated>

		<summary type="html">&lt;p&gt;Hthh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
System Flaws are used to execute unofficial code (homebrew) on the Nintendo Switch. This page is a list of known and public Switch System Flaws.&lt;br /&gt;
&lt;br /&gt;
=List of Switch System Flaws=&lt;br /&gt;
&lt;br /&gt;
== Hardware == &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Fixed with hardware model/revision&lt;br /&gt;
!  Newest hardware model/revision this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
| No public hardware exploits &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== System software ==&lt;br /&gt;
=== Kernel ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
|  No public Kernel exploits &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TrustZone ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
|  No public ARM TrustZone exploits &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== System Modules ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Summary&lt;br /&gt;
!  Description&lt;br /&gt;
!  Successful exploitation result&lt;br /&gt;
!  Fixed in system version&lt;br /&gt;
!  Last system version this flaw was checked for&lt;br /&gt;
!  Timeframe this was discovered&lt;br /&gt;
!  Public disclosure timeframe&lt;br /&gt;
!  Discovered by&lt;br /&gt;
|-&lt;br /&gt;
|  OOB Read in NS system module (pl:utoohax, pl:utonium, maybe other names)&lt;br /&gt;
|  Prior to [[3.0.0]], pl:u (Shared Font services implemented in the NS sysmodule) service commands 1,2,3 took in a signed 32-bit index and returned that index of an array but did not check that index at all. This allowed for an arbitrary read within a 34-bit range (33-bit signed) from NS .bss. In [[3.0.0]], sending out of range indexes causes error code 0x60A to be returned.&lt;br /&gt;
|  Dumping full NS .text, .rodata and .data, infoleak, etc&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  [[3.0.0]]&lt;br /&gt;
|  April 2017&lt;br /&gt;
|  On exploit&#039;s fix in [[3.0.0]]&lt;br /&gt;
|  qlutoo, Reswitched team (independently)&lt;br /&gt;
|-&lt;br /&gt;
| Unchecked domain ID in common IPC code&lt;br /&gt;
| Prior to [[2.0.0]], object IDs in [[IPC_Marshalling#Domain_message|domain messages]] are not bounds checked. This out-of-bounds read could be exploited to brute-force ASLR and get PC control in some services that support domain messages.&lt;br /&gt;
|&lt;br /&gt;
| [[2.0.0]]&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=HIPC&amp;diff=1391</id>
		<title>HIPC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=HIPC&amp;diff=1391"/>
		<updated>2017-07-06T08:31:17Z</updated>

		<summary type="html">&lt;p&gt;Hthh: Fix a few things&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IPC Command Structure ==&lt;br /&gt;
This is an array of u32&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-0 || Type. 4=Request, 5=Control&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 19-16 || Number of buf X descriptors (each: 2 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 23-20 || Number of buf A descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 27-24 || Number of buf B descriptors (each: 3 words).&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 9-0 || Raw data size (in u32&#039;s).&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 13-10 || Flags for buf C descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31 || Enable handle descriptor.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handle descriptor, if enabled.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Buf X descriptors, each one 2 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Buf A descriptors, each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Buf B descriptors, each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Type W descriptors, each one 3 words.&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Raw data (including any padding).&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Buf C descriptors, each one 2 words.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Handle descriptor ===&lt;br /&gt;
There can only be one of this descriptor type. It is enabled by bit31 of the second word.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Send current PID.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4-1 || Number of handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-5 || Number of handles to move&lt;br /&gt;
|-&lt;br /&gt;
| ... || || 8-byte PID if enabled&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to copy&lt;br /&gt;
|-&lt;br /&gt;
| ... || || Handles to move&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor X &amp;quot;Pointer&amp;quot; ===&lt;br /&gt;
This one is packed even worse than A, they inserted the bit38-36 of the address &#039;&#039;on top&#039;&#039; of the counter field.&lt;br /&gt;
&lt;br /&gt;
Officially, the counter is known as &amp;quot;receive index&amp;quot;. This one writes to the buffer described in the ReceiveList.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 5-0 || Bits 5-0 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 8-6 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 11-9 || Bits 11-9 of counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 15-12 || Bit 35-32 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 31-16 || Size&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor A/B/W &amp;quot;Send&amp;quot;/&amp;quot;Receive&amp;quot;/&amp;quot;Exchange&amp;quot; ===&lt;br /&gt;
This packing is so unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1-0 || Flags. Always set to 1 or 3.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 4-2 || Bit 38-36 of address.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 27-24 || Bit 35-32 of size.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 31-28 || Bit 35-32 of address.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer descriptor C &amp;quot;ReceiveList&amp;quot; ===&lt;br /&gt;
There&#039;s a 4-bit flag in the main header controlling the behavior of C descriptors.&lt;br /&gt;
&lt;br /&gt;
If it has value 0, the C descriptor functionality is disabled. If it has value 1, there is no C descriptor. If it has value 2, there is a single C descriptor.&lt;br /&gt;
&lt;br /&gt;
Otherwise it has (flag-2) C descriptors.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Bits || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || || Lower 32-bits of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 15-0 || Rest of address.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 31-16 || Size&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Raw data portion ==&lt;br /&gt;
This is an array of u32&#039;s, but individual parameters are generally stored as u64&#039;s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Word || Description&lt;br /&gt;
|-&lt;br /&gt;
| ... || Padding to align to 16&lt;br /&gt;
|-&lt;br /&gt;
| ... || Domain header padded to 16 if required&lt;br /&gt;
|-&lt;br /&gt;
| +0 || Magic (&amp;quot;SFCI&amp;quot; for requests, &amp;quot;SFCO&amp;quot; for responses) as u64&lt;br /&gt;
|-&lt;br /&gt;
| +2 || Cmd id as u64&lt;br /&gt;
|-&lt;br /&gt;
| ... || Input parameters&lt;br /&gt;
|-&lt;br /&gt;
| ... || Any u16 buffer sizes packed and aligned to 2 bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Official marshalling code ==&lt;br /&gt;
The official marshalling function takes an array of (buf_ptr, size) pairs and a type-field for each such pair.&lt;br /&gt;
&lt;br /&gt;
Bitmask 0x10 seems to indicate null-terminated strings, but that flag is ignored by the marshalling code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type Mask || Description || Direction&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 1 || Creates a A descriptor with flags=0. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 1 || Creates a A descriptor with flags=1. || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 1 || Creates a A descriptor with flags=3. || In&lt;br /&gt;
|-&lt;br /&gt;
| 4 + 2 || Creates a B descriptor with flags=0. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 + 4 + 2 || Creates a B descriptor with flags=1. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 + 4 + 2 || Creates a B descriptor with flags=3. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 1 || Creates an X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 8 + 2 || Creates a C descriptor, and writes the u16 size to an offset into raw data. || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 + 8 + 2 || Creates a C descriptor || Out&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 1 || Creates both an A and X descriptor || In&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 + 2 || Creates both an B and C descriptor || Out&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For types 0x21, 0x22 if size doesn&#039;t fit in u16, it&#039;s added to a list. Some magic shit happens to that list.&lt;br /&gt;
&lt;br /&gt;
== Official IPC Cmd Structure ==&lt;br /&gt;
Official struct that is stored for each IPC command. It contains precalculated offsets for different portions of the command structure.&lt;br /&gt;
&lt;br /&gt;
All offsets are given is in number of u32 words.&lt;br /&gt;
&lt;br /&gt;
 struct IpcCmdStruct {&lt;br /&gt;
   u8  unk0;&lt;br /&gt;
   u8  has_handle_descriptor;&lt;br /&gt;
   u8  pad0[2];&lt;br /&gt;
   u32 cmd0;&lt;br /&gt;
   u32 cmd1;&lt;br /&gt;
   u32 offset_handle_descriptor;&lt;br /&gt;
   u32 pad1;&lt;br /&gt;
   u32 offset_handles;          &lt;br /&gt;
   u32 pad2;&lt;br /&gt;
   u32 offset_x_descriptors;&lt;br /&gt;
   u32 offset_a_descriptors;&lt;br /&gt;
   u32 offset_b_descriptors;&lt;br /&gt;
   u32 offset_w_descriptors; /* this is a guess */&lt;br /&gt;
   u32 offset_raw_data;&lt;br /&gt;
   u32 offset_c_descriptors;&lt;br /&gt;
   u32 unk2;&lt;br /&gt;
   u32 unk3;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Control ==&lt;br /&gt;
When type == 5 you are talking to the IPC manager.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ConvertSessionToDomain&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DuplicateSession&lt;br /&gt;
|-&lt;br /&gt;
| 3 || QueryPointerBufferSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DuplicateSessionEx&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=SVC&amp;diff=1198</id>
		<title>SVC</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=SVC&amp;diff=1198"/>
		<updated>2017-06-28T06:41:17Z</updated>

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

		<summary type="html">&lt;p&gt;Hthh: SVC 0x40 is svcCreateSession, SVC 0x45 is used to create &amp;quot;event&amp;quot; handles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= System calls =&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Id || Name || In || Out&lt;br /&gt;
|-&lt;br /&gt;
|  0x1 || [[#svcSetHeapSize]] || W1=size || W0=result, X1=outaddr&lt;br /&gt;
|-&lt;br /&gt;
|  0x2 || [[#svcProtectMemory]] || X0=addr, X1=size, W2=prot || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x3 || [[#svcSetMemoryState]] || X0=addr, X1=size, W2=state0, W3=state1 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x4 || [[#svcMirrorStack]] || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x5 || svcUnmirrorStack || X0=dstaddr, X1=srcaddr, X2=size || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0x6 || svcQueryMemory || X0=meminfo_ptr, X2=addr || W0=result, W1=pageinfo                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0x7 || svcExitProcess || None ||&lt;br /&gt;
|-&lt;br /&gt;
|  0x8 || [[#svcCreateThread]] || X1=entry, X2=arg, X3=stacktop, W4=prio, W5=processor_id  || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
|  0x9 || svcStartThread || W0=thread_handle ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xA || svcExitThread || None ||                                                         &lt;br /&gt;
|-&lt;br /&gt;
|  0xB || [[#svcSleepThread]] || X0=nano ||&lt;br /&gt;
|-&lt;br /&gt;
|  0xC || svcGetThreadPriority || W1=thread_handle || W0=result, W1=prio&lt;br /&gt;
|-&lt;br /&gt;
|  0xD || svcSetThreadPriority || W0=thread_handle, W1=prio || W0=result&lt;br /&gt;
|-&lt;br /&gt;
|  0xE || svcGetThreadAffinityMask || W2=thread_handle || W0=result, W1=out, X2=out&lt;br /&gt;
|-&lt;br /&gt;
|  0xF || svcSetThreadAffinityMask || W0=thread_handle, W1=in, X2=in2 || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || svcGetCurrentProcessorNumber || None || W0/X0=cpuid&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || svcGetMemoryBlockSomethingA? || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || svcGetMemoryBlockSomethingB? || W0=handle || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || svcMapMemoryBlock || W0=memblk_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || svcUnmapMemoryBlock || W0=memblk_handle, X1=addr, X2=size || W0=result                                                 &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || [[#svcCreateMemoryMirror]] || X1=addr, X2=size, W3=perm || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || svcCloseHandle || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || svcClearEvent || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || [[#svcWaitEvents]] || X1=handles_ptr, W2=num_handles. X3=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || svcSignalEvent || W0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || svcLockMutex || W0=cur_thread_handle, X1=ptr, W2=req_thread_handle ||                                         &lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || svcUnlockMutex || X0=ptr ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || svcCondWait || X0=ptr0, X1=ptr, W2=thread_handle, X3=timeout || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || svcCondBroadcast || X0=ptr, W1=value || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || svcConnectToPort || X1=port_name_str || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || svcSendSyncRequest || X0=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || [[#svcSendSyncRequestByBuf]] || X0=cmdbufptr, X1=size, X2=handle || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || svcGetThreadId || W0=thread_handle || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || svcBreak || X0,X1,X2=info || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x27 || svcOutputDebugString || X0=str, X1=size ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || svcReturnFromException || X0=result ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x29 || [[#svcGetInfo]] || X1=info_id, X2=handle, X3=info_sub_id || W0=result, X1=out&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 || svcCreateSession || W2=?, X3=? || W0=result, W1=client_handle, W2=server_handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x41 || svcAcceptSession || W1=port_handle || W0=result, W1=session_handle&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43 || svcReplyAndReceive || X1=ptr_handles, W2=num_handles, X3=?, X4=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x44 || svcReplyAndReceiveByBuf || X1=buf, X2=sz, X3=ptr_handles, W4=num_handles, X5=?, X6=timeout || W0=result, W1=handle_idx&lt;br /&gt;
|-&lt;br /&gt;
| 0x45 || svcCreateEvent ? || None || W0=result, W1=client_handle ?, W2=server_handle ?&lt;br /&gt;
|-&lt;br /&gt;
| .... || ? || ? || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50 || svcCreateMemoryBlock || W1=size?, W2=perm0, W3=perm1 || W0=result, W1=handle&lt;br /&gt;
|-&lt;br /&gt;
| 0x51 || [[#svcMapMemoryMirror]] || X0=mirror_handle, X1=addr, X2=size, W3=perm || W0=result&lt;br /&gt;
|-&lt;br /&gt;
| 0x52 || [[#svcUnmapMemoryMirror]] || W0=mirror_handle, X1=addr, X2=size || W0=result&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcSetHeapSize ==&lt;br /&gt;
Size must be a multiple of 0x2000000. The heap base-address is written to out.&lt;br /&gt;
&lt;br /&gt;
== svcProtectMemory ==&lt;br /&gt;
Bit2 of permission (exec) is not allowed.&lt;br /&gt;
&lt;br /&gt;
Setting write-only is not allowed either (bit1).&lt;br /&gt;
&lt;br /&gt;
== svcSetMemoryState ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! State0 || State1 || Action&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Clear bit35 in [[#MemoryState]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 0 || Clear bit35 in [[#MemoryState]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 8 || Set bit35 in [[#MemoryState]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This might used for switching between cached and non-cached mappings.&lt;br /&gt;
&lt;br /&gt;
== svcMirrorStack ==&lt;br /&gt;
Memory is only allowed to be mapped into a special region.&lt;br /&gt;
&lt;br /&gt;
Code can get the range of this region from [[#svcGetInfo]].&lt;br /&gt;
&lt;br /&gt;
The source region gets reprotected to ---, and sets bit32 is set in [[#MemoryState]].&lt;br /&gt;
&lt;br /&gt;
== svcCreateThread ==&lt;br /&gt;
Processor_id must be 0,1,2,3 or -2.&lt;br /&gt;
&lt;br /&gt;
== svcSleepThread ==&lt;br /&gt;
Setting nano=0 means &amp;quot;yield thread&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== svcCreateMemoryMirror ==&lt;br /&gt;
This one reprotects the src block with perms you give it. It also sets bit32 into [[#MemoryState]].&lt;br /&gt;
&lt;br /&gt;
Executable bit perm not allowed.&lt;br /&gt;
&lt;br /&gt;
Closing all handles automatically causes the bit32 in [[#MemoryState]] to clear, and the permission to reset.&lt;br /&gt;
&lt;br /&gt;
== svcWaitEvents ==&lt;br /&gt;
Works with num_handles &amp;lt;= 0x40, error on num_handles == 0.&lt;br /&gt;
&lt;br /&gt;
Does not accept 0xFFFF8001 or 0xFFFF8000 as handles.&lt;br /&gt;
&lt;br /&gt;
== svcSendSyncRequestByBuf ==&lt;br /&gt;
Size must be 0x1000-aligned.&lt;br /&gt;
&lt;br /&gt;
== svcBreak ==&lt;br /&gt;
When used on retail where inx0 bit31 is clear, the system will throw a [[Error_codes|fatal-error]]. Otherwise when bit31 is set, it will return 0.&lt;br /&gt;
&lt;br /&gt;
== svcGetInfo ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Handle type || Id0 || Id1 || Description&lt;br /&gt;
|-&lt;br /&gt;
| Process || 0 || 0 || Core available mask. Always 0xF meaning all 4 cores available.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 1 || 0 || Always 0xfffffffff0000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 2 || 0 || Randomized unknown base-address.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 3 || 0 || Always 0x1000000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 4 || 0 || Randomized heap base-address.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 5 || 0 || Always 0x180000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 6 || 0 || Total memory usage?&lt;br /&gt;
|-&lt;br /&gt;
| Process || 7 || 0 || Process heap size.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 8 || 0 || Always 0. Used during exception handling.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 9 || 0 || This creates and returns an unknown handle.&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 10 || -1, {current coreid} || Unknown. Output data changes each time this SVC is used. Global and core-specific tick-count?&lt;br /&gt;
|-&lt;br /&gt;
| Zero    || 11 || 0-3 || Returns random from TRNG. Used to seed usermode PRNGs. Unknown what exactly causes this output to change, however it does change when exiting+launching a process.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 12 || 0 || Always 0x8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 13 || 0 || Always 0x7ff8000000.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 14 || 0 || Start of stack mirror region.&lt;br /&gt;
|-&lt;br /&gt;
| Process || 15 || 0 || Size of stack mirror region.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== svcMapMemoryMirror ==&lt;br /&gt;
The newly mapped pages will have [[#MemoryState]] type 0xE.&lt;br /&gt;
&lt;br /&gt;
You must pass same size and permissions as given in svcCreateMemoryMirror, otherwise error.&lt;br /&gt;
&lt;br /&gt;
== svcUnmapMemoryMirror ==&lt;br /&gt;
Size must match size given in map syscall, otherwise there&#039;s an invalid-size error.&lt;br /&gt;
&lt;br /&gt;
== MemoryState ==&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Lower 8 bits || Type                 || Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 0x3          || Code static          || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x4          || Code                 || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0x5          || Heap                 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x6          || Shared memory block  ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x8          || Module code static   || .text and .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x9          || Module code          || .data&lt;br /&gt;
|-&lt;br /&gt;
| 0xB          || Stack mirror         ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xC          || Thread local storage ||&lt;br /&gt;
|-&lt;br /&gt;
| 0xE          || Memory mirror        ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x10         || Reserved             ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Bit32: is_mirrored&lt;br /&gt;
Bit34: is_nv_locked&lt;br /&gt;
Bit35: is_uncached?&lt;br /&gt;
&lt;br /&gt;
=Exception Handling=&lt;br /&gt;
There appears to be userland code for handling exceptions, however this doesn&#039;t seem to be executed on retail.&lt;br /&gt;
&lt;br /&gt;
On usermode exception, it jumps to main code binary entrypoint (main_binary_address+0) with X0=exception_info_ptr and X1=exception_info2_ptr.&lt;br /&gt;
On boot, X0 is set to 0 triggering normal crt0 setup.&lt;/div&gt;</summary>
		<author><name>Hthh</name></author>
	</entry>
</feed>