https://switchbrew.org/w/api.php?action=feedcontributions&user=Simon66&feedformat=atom
Nintendo Switch Brew - User contributions [en]
2024-03-28T16:55:36Z
User contributions
MediaWiki 1.35.8
https://switchbrew.org/w/index.php?title=Talk:Main_Page&diff=4930
Talk:Main Page
2018-08-18T16:26:07Z
<p>Simon66: </p>
<hr />
<div>== HTTPS Redirect ==<br />
<br />
Currently, http traffic is not redirected to an https URL. Could the site administrator please add such a redirect? The login page especially should only be served over https, and on Firefox at least, the login cookie does not get sent to pages loaded over http if you logged in over https.<br />
--[[User:Misson20000|Misson20000]] ([[User talk:Misson20000|talk]]) 16:08, 15 August 2018 (CDT)<br />
<br />
Sure, I can take a look into it. I've been wanting to add SSL certs on the site for sometime now, but unfortunately my host doesn't allow me to add a free one. I'm in the process of changing hosting provider, so when that happens, I'll make these changes.<br />
--[[User:simon66|simon66]] ([[User talk:simon66|talk]]) 12:25, 18 August 2018 (CDT)</div>
Simon66
https://switchbrew.org/w/index.php?title=File:JoyconRear.jpg&diff=4572
File:JoyconRear.jpg
2018-05-04T15:02:10Z
<p>Simon66: Simon66 uploaded a new version of File:JoyconRear.jpg</p>
<hr />
<div>The rear of the JoyCon.<br />
<br />
Courtesy of Jeff Suovanen at iFixit (https://www.ifixit.com/User/668072/Jeff+Suovanen)<br />
<br />
Creative Commons BY-NC-SA</div>
Simon66
https://switchbrew.org/w/index.php?title=File:JoyconFront.jpg&diff=4571
File:JoyconFront.jpg
2018-05-04T15:00:36Z
<p>Simon66: Simon66 uploaded a new version of File:JoyconFront.jpg</p>
<hr />
<div>The front of the JoyCon.<br />
<br />
Courtesy of Jeff Suovanen at iFixit (https://www.ifixit.com/User/668072/Jeff+Suovanen)<br />
<br />
Creative Commons BY-NC-SA</div>
Simon66
https://switchbrew.org/w/index.php?title=Package2&diff=3634
Package2
2018-02-07T17:27:41Z
<p>Simon66: Reverted edits by Simon66 (talk) to last revision by SciresM</p>
<hr />
<div>Present in the firmware package titles (0100000000000819, 010000000000081A, 010000000000081B and 010000000000081C) and installed into eMMC storage's [[Flash_Filesystem#User_Partitions|BCPKG2 partitions]], "package2" contains the Switch kernel and the built-in system modules.<br />
<br />
= Format =<br />
Package2 is distributed in an already encrypted format. Therefore, it's not additionally encrypted when installed into the flash filesystem.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x100<br />
| [[#Public Keys|RSA-2048]] signature (PKCS#1 v2.1 RSASSA-PSS-VERIFY with SHA256)<br />
|-<br />
| 0x100<br />
| 0x100<br />
| Encrypted header<br />
|-<br />
| 0x200<br />
| Variable<br />
| Encrypted body<br />
|}<br />
<br />
== Encryption ==<br />
Package2's contents are AES-CTR encrypted with a key known only by TrustZone.<br />
<br />
The encrypted header's CTR is stored as it's first 0x10 bytes (offset 0x100).<br />
The encrypted body is divided in up to 4 sections, each one with a CTR stored inside the decrypted header.<br />
<br />
== Header ==<br />
When decrypted, package2's header is as follows.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| Header's CTR, official code copies the pre-decryption CTR over the decrypted result. Also used as metadata.<br />
|-<br />
| 0x10<br />
| 0x10<br />
| Section 0 CTR<br />
|-<br />
| 0x20<br />
| 0x10<br />
| Section 1 CTR<br />
|-<br />
| 0x30<br />
| 0x10<br />
| Section 2 CTR<br />
|-<br />
| 0x40<br />
| 0x10<br />
| Section 3 CTR<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Magic "PK21"<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Base offset<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Always 0<br />
|-<br />
| 0x5C<br />
| 0x2<br />
| Version. HighByte must be <{maxver} and LowByte must be >{minver}, where {maxver} and {minver} are constants used by TZ updated with each package1 update.<br />
|-<br />
| 0x5E<br />
| 0x2<br />
| Padding<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Section 0 size<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Section 1 size<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Section 2 size<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Section 3 size<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Section 0 offset<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Section 1 offset<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Section 2 offset<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Section 3 offset<br />
|-<br />
| 0x80<br />
| 0x20<br />
| SHA-256 hash over encrypted section 0<br />
|-<br />
| 0xA0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 1<br />
|-<br />
| 0xC0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 2<br />
|-<br />
| 0xE0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 3<br />
|}<br />
<br />
Each section follows each other immediately and is encrypted with the same key used for encrypting the header.<br />
The section offsets are relative to a base, which is typically 0x80000000 pointing to the base of DRAM.<br />
<br />
Before being decrypted, the encrypted header's CTR additionally encodes metadata used to validate package2's contents as follows:<br />
* Size of the entire package2 with the raw header = ctr_word2 ^ ctr_word3 ^ ctr_word0<br />
* Metadata version field = ((ctr_word1 ^ (ctr_word1 >> 16)) & 0xFF) ^ (ctr_word1 >> 24)<br />
<br />
In [4.0.0], the metadata version field must be less or equal to 4.<br />
<br />
== Section 0 ==<br />
When decrypted, this section contains the plaintext Switch kernel binary.<br />
<br />
== Section 1 ==<br />
When decrypted, this section contains the built-in system modules encapsulated in a custom format.<br />
<br />
=== INI1 ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "INI1"<br />
|-<br />
| 0x4<br />
| u32<br />
| Size<br />
|-<br />
| 0x8<br />
| u32<br />
| NumberProcesses<br />
|-<br />
| 0xC<br />
| u32<br />
| Padding (zero)<br />
|}<br />
<br />
==== KIP1 ====<br />
Kernel internal process?<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "KIP1"<br />
|-<br />
| 0x4<br />
| char[12]<br />
| Name<br />
|-<br />
| 0x10<br />
| u64<br />
| TitleId<br />
|-<br />
| 0x18<br />
| u32<br />
| Process category (0: regular title, 1: kernel built-in). Should be 1 here.<br />
|-<br />
| 0x1C<br />
| u8<br />
| Main thread priority<br />
|-<br />
| 0x1D<br />
| u8<br />
| Default CPU core<br />
|-<br />
| 0x1E<br />
| u8<br />
| Reserved (unused)<br />
|-<br />
| 0x1F<br />
| u8<br />
| Flags: bit0-2: compression-enable for each section, when set. Bit3: Is64Bit. Bit4: IsAddrSpace36Bit. Bit5: [2.0.0+] PoolPartitionId. Bit6, Bit7: reserved (unused)<br />
|-<br />
| 0x20<br />
| [[#SectionHeader]][6]<br />
| Sections: .text, .rodata, .data, .bss and two reserved (ignored) sections.<br />
|-<br />
| 0x80<br />
| u32[0x20]<br />
| KernelCaps<br />
|}<br />
<br />
===== SectionHeader =====<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| OutOffset<br />
|-<br />
| 0x4<br />
| u32<br />
| DecompressedSize<br />
|-<br />
| 0x8<br />
| u32<br />
| CompressedSize<br />
|-<br />
| 0xC<br />
| u32<br />
| Attribute: the size in pages of the main thread's stack for .rodata, reserved otherwise.<br />
|}<br />
<br />
Compressed size can be 0 or lower than exepected, this is the case for BSS for example.<br />
<br />
===== Compression =====<br />
The compression used here is BLZ, with a modified footer since 3ds. The footer is now 0xC bytes instead of 0x8, and has the form u32 compressed_data_len; u32 initial_index; u32 additional_len_when_uncompressed;<br />
<br />
== Section 2 ==<br />
This section has a valid CTR and SHA-256 hash (over NULL) stored in the package2's header, but it's size is always 0. Likely reserved for future expansion.<br />
<br />
== Section 3 ==<br />
This section is not present (CTR and SHA-256 hash in package2's header are NULL). Likely reserved for future expansion.<br />
<br />
= Versions =<br />
{| class="wikitable" border="1"<br />
|-<br />
! System version<br />
! Package1 maxver constant<br />
! Package1 minver constant<br />
! Package2 version field<br />
|-<br />
| [[1.0.0]]<br />
| 0x2<br />
| 0x3<br />
| 0x0104<br />
|-<br />
| [[2.0.0]]<br />
| 0x3<br />
| 0x4<br />
| 0x0205<br />
|-<br />
| [[3.0.0]]<br />
| 0x4<br />
| 0x5<br />
| 0x0306<br />
|-<br />
| [[3.0.2]]<br />
| 0x5<br />
| 0x6<br />
| 0x0407<br />
|-<br />
| [[4.0.0]]<br />
| 0x6<br />
| 0x7<br />
| 0x0508<br />
|}<br />
<br />
= Public Keys =<br />
<br />
=== Exponent ===<br />
0x10001<br />
<br />
=== Retail Modulus ===<br />
8D 13 A7 77 6A E5 DC C0 3B 25 D0 58 E4 20 69 59<br />
55 4B AB 70 40 08 28 07 A8 A7 FD 0F 31 2E 11 FE<br />
47 A0 F9 9D DF 80 DB 86 5A 27 89 CD 97 6C 85 C5<br />
6C 39 7F 41 F2 FF 24 20 C3 95 A6 F7 9D 4A 45 74<br />
8B 5D 28 8A C6 99 35 68 85 A5 64 32 80 9F D3 48<br />
39 A2 1D 24 67 69 DF 75 AC 12 B5 BD C3 29 90 BE<br />
37 E4 A0 80 9A BE 36 BF 1F 2C AB 2B AD F5 97 32<br />
9A 42 9D 09 8B 08 F0 63 47 A3 E9 1B 36 D8 2D 8A<br />
D7 E1 54 11 95 E4 45 88 69 8A 2B 35 CE D0 A5 0B<br />
D5 5D AC DB AF 11 4D CA B8 1E E7 01 9E F4 46 A3<br />
8A 94 6D 76 BD 8A C8 3B D2 31 58 0C 79 A8 26 E9<br />
D1 79 9C CB D4 2B 6A 4F C6 CC CF 90 A7 B9 98 47<br />
FD FA 4C 6C 6F 81 87 3B CA B8 50 F6 3E 39 5D 4D<br />
97 3F 0F 35 39 53 FB FA CD AB A8 7A 62 9A 3F F2<br />
09 27 96 3F 07 9A 91 F7 16 BF C6 3A 82 5A 4B CF<br />
49 50 95 8C 55 80 7E 39 B1 48 05 1E 21 C7 24 4F<br />
<br />
=== Debug Modulus ===<br />
B3 65 54 FB 0A B0 1E 85 A7 F6 CF 91 8E BA 96 99<br />
0D 8B 91 69 2A EE 01 20 4F 34 5C 2C 4F 4E 37 C7<br />
F1 0B D4 CD A1 7F 93 F1 33 59 CE B1 E9 DD 26 E6<br />
F3 BB 77 87 46 7A D6 4E 47 4A D1 41 B7 79 4A 38<br />
06 6E CF 61 8F CD C1 40 0B FA 26 DC C0 34 51 83<br />
D9 3B 11 54 3B 96 27 32 9A 95 BE 1E 68 11 50 A0<br />
6B 10 A8 83 8B F5 FC BC 90 84 7A 5A 5C 43 52 E6<br />
C8 26 E9 FE 06 A0 8B 53 0F AF 1E C4 1C 0B CF 50<br />
1A A4 F3 5C FB F0 97 E4 DE 32 0A 9F E3 5A AA B7<br />
44 7F 5C 33 60 B9 0F 22 2D 33 2A E9 69 79 31 42<br />
8F E4 3A 13 8B E7 26 BD 08 87 6C A6 F2 73 F6 8E<br />
A7 F2 FE FB 6C 28 66 0D BD D7 EB 42 A8 78 E6 B8<br />
6B AE C7 A9 E2 40 6E 89 20 82 25 8E 3C 6A 60 D7<br />
F3 56 8E EC 8D 51 8A 63 3C 04 78 23 0E 90 0C B4<br />
E7 86 3B 4F 8E 13 09 47 32 0E 04 B8 4D 5B B0 46<br />
71 B0 5C F4 AD 63 4F C5 E2 AC 1E C4 33 96 09 7B</div>
Simon66
https://switchbrew.org/w/index.php?title=Package2&diff=3633
Package2
2018-02-07T17:23:35Z
<p>Simon66: Formatting fix</p>
<hr />
<div>Present in the firmware package titles (0100000000000819, 010000000000081A, 010000000000081B and 010000000000081C) and installed into eMMC storage's [[Flash_Filesystem#User_Partitions|BCPKG2 partitions]], "package2" contains the Switch kernel and the built-in system modules.<br />
<br />
= Format =<br />
Package2 is distributed in an already encrypted format. Therefore, it's not additionally encrypted when installed into the flash filesystem.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x100<br />
| [[#Public Keys|RSA-2048]] signature (PKCS#1 v2.1 RSASSA-PSS-VERIFY with SHA256)<br />
|-<br />
| 0x100<br />
| 0x100<br />
| Encrypted header<br />
|-<br />
| 0x200<br />
| Variable<br />
| Encrypted body<br />
|}<br />
<br />
== Encryption ==<br />
Package2's contents are AES-CTR encrypted with a key known only by TrustZone.<br />
<br />
The encrypted header's CTR is stored as it's first 0x10 bytes (offset 0x100).<br />
The encrypted body is divided in up to 4 sections, each one with a CTR stored inside the decrypted header.<br />
<br />
== Header ==<br />
When decrypted, package2's header is as follows.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| Header's CTR, official code copies the pre-decryption CTR over the decrypted result. Also used as metadata.<br />
|-<br />
| 0x10<br />
| 0x10<br />
| Section 0 CTR<br />
|-<br />
| 0x20<br />
| 0x10<br />
| Section 1 CTR<br />
|-<br />
| 0x30<br />
| 0x10<br />
| Section 2 CTR<br />
|-<br />
| 0x40<br />
| 0x10<br />
| Section 3 CTR<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Magic "PK21"<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Base offset<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Always 0<br />
|-<br />
| 0x5C<br />
| 0x2<br />
| Version. HighByte must be <{maxver} and LowByte must be >{minver}, where {maxver} and {minver} are constants used by TZ updated with each package1 update.<br />
|-<br />
| 0x5E<br />
| 0x2<br />
| Padding<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Section 0 size<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Section 1 size<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Section 2 size<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Section 3 size<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Section 0 offset<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Section 1 offset<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Section 2 offset<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Section 3 offset<br />
|-<br />
| 0x80<br />
| 0x20<br />
| SHA-256 hash over encrypted section 0<br />
|-<br />
| 0xA0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 1<br />
|-<br />
| 0xC0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 2<br />
|-<br />
| 0xE0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 3<br />
|}<br />
<br />
Each section follows each other immediately and is encrypted with the same key used for encrypting the header.<br />
The section offsets are relative to a base, which is typically 0x80000000 pointing to the base of DRAM.<br />
<br />
Before being decrypted, the encrypted header's CTR additionally encodes metadata used to validate package2's contents as follows:<br />
* Size of the entire package2 with the raw header = ctr_word2 ^ ctr_word3 ^ ctr_word0<br />
* Metadata version field = ((ctr_word1 ^ (ctr_word1 >> 16)) & 0xFF) ^ (ctr_word1 >> 24)<br />
<br />
In [4.0.0], the metadata version field must be less or equal to 4.<br />
<br />
== Section 0 ==<br />
When decrypted, this section contains the plaintext Switch kernel binary.<br />
<br />
== Section 1 ==<br />
When decrypted, this section contains the built-in system modules encapsulated in a custom format.<br />
<br />
=== INI1 ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "INI1"<br />
|-<br />
| 0x4<br />
| u32<br />
| Size<br />
|-<br />
| 0x8<br />
| u32<br />
| NumberProcesses<br />
|-<br />
| 0xC<br />
| u32<br />
| Padding (zero)<br />
|}<br />
<br />
==== KIP1 ====<br />
Kernel internal process?<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "KIP1"<br />
|-<br />
| 0x4<br />
| char[12]<br />
| Name<br />
|-<br />
| 0x10<br />
| u64<br />
| TitleId<br />
|-<br />
| 0x18<br />
| u32<br />
| Process category (0: regular title, 1: kernel built-in). Should be 1 here.<br />
|-<br />
| 0x1C<br />
| u8<br />
| Main thread priority<br />
|-<br />
| 0x1D<br />
| u8<br />
| Default CPU core<br />
|-<br />
| 0x1E<br />
| u8<br />
| Reserved (unused)<br />
|-<br />
| 0x1F<br />
| u8<br />
| Flags: bit0-2: compression-enable for each section, when set. Bit3: Is64Bit. Bit4: IsAddrSpace36Bit. Bit5: [2.0.0+] PoolPartitionId. Bit6, Bit7: reserved (unused)<br />
|-<br />
| 0x20<br />
| [[#SectionHeader]][6]<br />
| Sections: .text, .rodata, .data, .bss and two reserved (ignored) sections.<br />
|-<br />
| 0x80<br />
| u32[0x20]<br />
| KernelCaps<br />
|}<br />
<br />
===== SectionHeader =====<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| OutOffset<br />
|-<br />
| 0x4<br />
| u32<br />
| DecompressedSize<br />
|-<br />
| 0x8<br />
| u32<br />
| CompressedSize<br />
|-<br />
| 0xC<br />
| u32<br />
| Attribute: the size in pages of the main thread's stack for .rodata, reserved otherwise.<br />
|}<br />
<br />
Compressed size can be 0 or lower than exepected, this is the case for BSS for example.<br />
<br />
===== Compression =====<br />
The compression used here is BLZ, with a modified footer since 3ds. The footer is now 0xC bytes instead of 0x8, and has the form u32 compressed_data_len; u32 initial_index; u32 additional_len_when_uncompressed;<br />
<br />
== Section 2 ==<br />
This section has a valid CTR and SHA-256 hash (over NULL) stored in the package2's header, but it's size is always 0. Likely reserved for future expansion.<br />
<br />
== Section 3 ==<br />
This section is not present (CTR and SHA-256 hash in package2's header are NULL). Likely reserved for future expansion.<br />
<br />
= Versions =<br />
{| class="wikitable" border="1"<br />
|-<br />
! System version<br />
! Package1 maxver constant<br />
! Package1 minver constant<br />
! Package2 version field<br />
|-<br />
| [[1.0.0]]<br />
| 0x2<br />
| 0x3<br />
| 0x0104<br />
|-<br />
| [[2.0.0]]<br />
| 0x3<br />
| 0x4<br />
| 0x0205<br />
|-<br />
| [[3.0.0]]<br />
| 0x4<br />
| 0x5<br />
| 0x0306<br />
|-<br />
| [[3.0.2]]<br />
| 0x5<br />
| 0x6<br />
| 0x0407<br />
|-<br />
| [[4.0.0]]<br />
| 0x6<br />
| 0x7<br />
| 0x0508<br />
|}<br />
<br />
= Public Keys =<br />
<br />
=== Exponent ===<br />
0x10001<br />
<br />
=== Retail Modulus ===<br />
8D 13 A7 77 6A E5 DC C0 3B 25 D0 58 E4 20 69 59<br />
55 4B AB 70 40 08 28 07 A8 A7 FD 0F 31 2E 11 FE<br />
47 A0 F9 9D DF 80 DB 86 5A 27 89 CD 97 6C 85 C5<br />
6C 39 7F 41 F2 FF 24 20 C3 95 A6 F7 9D 4A 45 74<br />
8B 5D 28 8A C6 99 35 68 85 A5 64 32 80 9F D3 48<br />
39 A2 1D 24 67 69 DF 75 AC 12 B5 BD C3 29 90 BE<br />
37 E4 A0 80 9A BE 36 BF 1F 2C AB 2B AD F5 97 32<br />
9A 42 9D 09 8B 08 F0 63 47 A3 E9 1B 36 D8 2D 8A<br />
D7 E1 54 11 95 E4 45 88 69 8A 2B 35 CE D0 A5 0B<br />
D5 5D AC DB AF 11 4D CA B8 1E E7 01 9E F4 46 A3<br />
8A 94 6D 76 BD 8A C8 3B D2 31 58 0C 79 A8 26 E9<br />
D1 79 9C CB D4 2B 6A 4F C6 CC CF 90 A7 B9 98 47<br />
FD FA 4C 6C 6F 81 87 3B CA B8 50 F6 3E 39 5D 4D<br />
97 3F 0F 35 39 53 FB FA CD AB A8 7A 62 9A 3F F2<br />
09 27 96 3F 07 9A 91 F7 16 BF C6 3A 82 5A 4B CF<br />
49 50 95 8C 55 80 7E 39 B1 48 05 1E 21 C7 24 4F<br />
<br />
=== Debug Modulus ===<br />
<syntaxhighlight><br />
00000000: B36554FB 0AB01E85 A7F6CF91 8EBA9699 ³eTû.°.…§öÏ‘Žº–™<br />
00000010: 0D8B9169 2AEE0120 4F345C2C 4F4E37C7 .‹‘i*î. O4\,ON7Ç<br />
00000020: F10BD4CD A17F93F1 3359CEB1 E9DD26E6 ñ.ÔÍ¡.“ñ3YαéÝ&æ<br />
00000030: F3BB7787 467AD64E 474AD141 B7794A38 ó»w‡FzÖNGJÑA·yJ8<br />
00000040: 066ECF61 8FCDC140 0BFA26DC C0345183 .nÏa.ÍÁ@.ú&ÜÀ4Qƒ<br />
00000050: D93B1154 3B962732 9A95BE1E 681150A0 Ù;.T;–'2š•¾.h.P <br />
00000060: 6B10A883 8BF5FCBC 90847A5A 5C4352E6 k.¨ƒ‹õü¼.„zZ\CRæ<br />
00000070: C826E9FE 06A08B53 0FAF1EC4 1C0BCF50 È&éþ. ‹S.¯.Ä..ÏP<br />
00000080: 1AA4F35C FBF097E4 DE320A9F E35AAAB7 .¤ó\ûð—äÞ2.ŸãZª·<br />
00000090: 447F5C33 60B90F22 2D332AE9 69793142 D.\3`¹."-3*éiy1B<br />
000000A0: 8FE43A13 8BE726BD 08876CA6 F273F68E .ä:.‹ç&½.‡l¦òsöŽ<br />
000000B0: A7F2FEFB 6C28660D BDD7EB42 A878E6B8 §òþûl(f.½×ëB¨xæ¸<br />
000000C0: 6BAEC7A9 E2406E89 2082258E 3C6A60D7 k®Ç©â@n‰ ‚%Ž<j`×<br />
000000D0: F3568EEC 8D518A63 3C047823 0E900CB4 óVŽì.QŠc<.x#...´<br />
000000E0: E7863B4F 8E130947 320E04B8 4D5BB046 ç†;OŽ..G2..¸M[°F<br />
000000F0: 71B05CF4 AD634FC5 E2AC1EC4 3396097B q°\ô.cOÅâ¬.Ä3–.{<br />
</syntaxhighlight></div>
Simon66
https://switchbrew.org/w/index.php?title=Package2&diff=3629
Package2
2018-02-07T17:18:33Z
<p>Simon66: Formatting fix</p>
<hr />
<div>Present in the firmware package titles (0100000000000819, 010000000000081A, 010000000000081B and 010000000000081C) and installed into eMMC storage's [[Flash_Filesystem#User_Partitions|BCPKG2 partitions]], "package2" contains the Switch kernel and the built-in system modules.<br />
<br />
= Format =<br />
Package2 is distributed in an already encrypted format. Therefore, it's not additionally encrypted when installed into the flash filesystem.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x100<br />
| [[#Public Keys|RSA-2048]] signature (PKCS#1 v2.1 RSASSA-PSS-VERIFY with SHA256)<br />
|-<br />
| 0x100<br />
| 0x100<br />
| Encrypted header<br />
|-<br />
| 0x200<br />
| Variable<br />
| Encrypted body<br />
|}<br />
<br />
== Encryption ==<br />
Package2's contents are AES-CTR encrypted with a key known only by TrustZone.<br />
<br />
The encrypted header's CTR is stored as it's first 0x10 bytes (offset 0x100).<br />
The encrypted body is divided in up to 4 sections, each one with a CTR stored inside the decrypted header.<br />
<br />
== Header ==<br />
When decrypted, package2's header is as follows.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x10<br />
| Header's CTR, official code copies the pre-decryption CTR over the decrypted result. Also used as metadata.<br />
|-<br />
| 0x10<br />
| 0x10<br />
| Section 0 CTR<br />
|-<br />
| 0x20<br />
| 0x10<br />
| Section 1 CTR<br />
|-<br />
| 0x30<br />
| 0x10<br />
| Section 2 CTR<br />
|-<br />
| 0x40<br />
| 0x10<br />
| Section 3 CTR<br />
|-<br />
| 0x50<br />
| 0x4<br />
| Magic "PK21"<br />
|-<br />
| 0x54<br />
| 0x4<br />
| Base offset<br />
|-<br />
| 0x58<br />
| 0x4<br />
| Always 0<br />
|-<br />
| 0x5C<br />
| 0x2<br />
| Version. HighByte must be <{maxver} and LowByte must be >{minver}, where {maxver} and {minver} are constants used by TZ updated with each package1 update.<br />
|-<br />
| 0x5E<br />
| 0x2<br />
| Padding<br />
|-<br />
| 0x60<br />
| 0x4<br />
| Section 0 size<br />
|-<br />
| 0x64<br />
| 0x4<br />
| Section 1 size<br />
|-<br />
| 0x68<br />
| 0x4<br />
| Section 2 size<br />
|-<br />
| 0x6C<br />
| 0x4<br />
| Section 3 size<br />
|-<br />
| 0x70<br />
| 0x4<br />
| Section 0 offset<br />
|-<br />
| 0x74<br />
| 0x4<br />
| Section 1 offset<br />
|-<br />
| 0x78<br />
| 0x4<br />
| Section 2 offset<br />
|-<br />
| 0x7C<br />
| 0x4<br />
| Section 3 offset<br />
|-<br />
| 0x80<br />
| 0x20<br />
| SHA-256 hash over encrypted section 0<br />
|-<br />
| 0xA0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 1<br />
|-<br />
| 0xC0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 2<br />
|-<br />
| 0xE0<br />
| 0x20<br />
| SHA-256 hash over encrypted section 3<br />
|}<br />
<br />
Each section follows each other immediately and is encrypted with the same key used for encrypting the header.<br />
The section offsets are relative to a base, which is typically 0x80000000 pointing to the base of DRAM.<br />
<br />
Before being decrypted, the encrypted header's CTR additionally encodes metadata used to validate package2's contents as follows:<br />
* Size of the entire package2 with the raw header = ctr_word2 ^ ctr_word3 ^ ctr_word0<br />
* Metadata version field = ((ctr_word1 ^ (ctr_word1 >> 16)) & 0xFF) ^ (ctr_word1 >> 24)<br />
<br />
In [4.0.0], the metadata version field must be less or equal to 4.<br />
<br />
== Section 0 ==<br />
When decrypted, this section contains the plaintext Switch kernel binary.<br />
<br />
== Section 1 ==<br />
When decrypted, this section contains the built-in system modules encapsulated in a custom format.<br />
<br />
=== INI1 ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "INI1"<br />
|-<br />
| 0x4<br />
| u32<br />
| Size<br />
|-<br />
| 0x8<br />
| u32<br />
| NumberProcesses<br />
|-<br />
| 0xC<br />
| u32<br />
| Padding (zero)<br />
|}<br />
<br />
==== KIP1 ====<br />
Kernel internal process?<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| Magic "KIP1"<br />
|-<br />
| 0x4<br />
| char[12]<br />
| Name<br />
|-<br />
| 0x10<br />
| u64<br />
| TitleId<br />
|-<br />
| 0x18<br />
| u32<br />
| Process category (0: regular title, 1: kernel built-in). Should be 1 here.<br />
|-<br />
| 0x1C<br />
| u8<br />
| Main thread priority<br />
|-<br />
| 0x1D<br />
| u8<br />
| Default CPU core<br />
|-<br />
| 0x1E<br />
| u8<br />
| Reserved (unused)<br />
|-<br />
| 0x1F<br />
| u8<br />
| Flags: bit0-2: compression-enable for each section, when set. Bit3: Is64Bit. Bit4: IsAddrSpace36Bit. Bit5: [2.0.0+] PoolPartitionId. Bit6, Bit7: reserved (unused)<br />
|-<br />
| 0x20<br />
| [[#SectionHeader]][6]<br />
| Sections: .text, .rodata, .data, .bss and two reserved (ignored) sections.<br />
|-<br />
| 0x80<br />
| u32[0x20]<br />
| KernelCaps<br />
|}<br />
<br />
===== SectionHeader =====<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Type<br />
! Description<br />
|-<br />
| 0x0<br />
| u32<br />
| OutOffset<br />
|-<br />
| 0x4<br />
| u32<br />
| DecompressedSize<br />
|-<br />
| 0x8<br />
| u32<br />
| CompressedSize<br />
|-<br />
| 0xC<br />
| u32<br />
| Attribute: the size in pages of the main thread's stack for .rodata, reserved otherwise.<br />
|}<br />
<br />
Compressed size can be 0 or lower than exepected, this is the case for BSS for example.<br />
<br />
===== Compression =====<br />
The compression used here is BLZ, with a modified footer since 3ds. The footer is now 0xC bytes instead of 0x8, and has the form u32 compressed_data_len; u32 initial_index; u32 additional_len_when_uncompressed;<br />
<br />
== Section 2 ==<br />
This section has a valid CTR and SHA-256 hash (over NULL) stored in the package2's header, but it's size is always 0. Likely reserved for future expansion.<br />
<br />
== Section 3 ==<br />
This section is not present (CTR and SHA-256 hash in package2's header are NULL). Likely reserved for future expansion.<br />
<br />
= Versions =<br />
{| class="wikitable" border="1"<br />
|-<br />
! System version<br />
! Package1 maxver constant<br />
! Package1 minver constant<br />
! Package2 version field<br />
|-<br />
| [[1.0.0]]<br />
| 0x2<br />
| 0x3<br />
| 0x0104<br />
|-<br />
| [[2.0.0]]<br />
| 0x3<br />
| 0x4<br />
| 0x0205<br />
|-<br />
| [[3.0.0]]<br />
| 0x4<br />
| 0x5<br />
| 0x0306<br />
|-<br />
| [[3.0.2]]<br />
| 0x5<br />
| 0x6<br />
| 0x0407<br />
|-<br />
| [[4.0.0]]<br />
| 0x6<br />
| 0x7<br />
| 0x0508<br />
|}<br />
<br />
= Public Keys =<br />
<br />
=== Exponent ===<br />
0x10001<br />
<br />
=== Retail Modulus ===<br />
<syntaxhighlight><br />
00000000: 8D13A777 6AE5DCC0 3B25D058 E4206959 ..§wjåÜÀ;%ÐXä iY<br />
00000010: 554BAB70 40082807 A8A7FD0F 312E11FE UK«p@.(.¨§ý.1..þ<br />
00000020: 47A0F99D DF80DB86 5A2789CD 976C85C5 G ù.߀ۆZ'‰Í—l…Å<br />
00000030: 6C397F41 F2FF2420 C395A6F7 9D4A4574 l9.Aòÿ$ Õ¦÷.JEt<br />
00000040: 8B5D288A C6993568 85A56432 809FD348 ‹](ŠÆ™5h…¥d2€ŸÓH<br />
00000050: 39A21D24 6769DF75 AC12B5BD C32990BE 9¢.$gißu¬.µ½Ã).¾<br />
00000060: 37E4A080 9ABE36BF 1F2CAB2B ADF59732 7ä €š¾6¿.,«+.õ—2<br />
00000070: 9A429D09 8B08F063 47A3E91B 36D82D8A šB..‹.ðcG£é.6Ø-Š<br />
00000080: D7E15411 95E44588 698A2B35 CED0A50B ×áT.•äEˆiŠ+5ÎÐ¥.<br />
00000090: D55DACDB AF114DCA B81EE701 9EF446A3 Õ]¬Û¯.Mʸ.ç.žôF£<br />
000000A0: 8A946D76 BD8AC83B D231580C 79A826E9 Š”mv½ŠÈ;Ò1X.y¨&é<br />
000000B0: D1799CCB D42B6A4F C6CCCF90 A7B99847 ÑyœËÔ+jOÆÌÏ.§¹˜G<br />
000000C0: FDFA4C6C 6F81873B CAB850F6 3E395D4D ýúLlo.‡;ʸPö>9]M<br />
000000D0: 973F0F35 3953FBFA CDABA87A 629A3FF2 —?.59SûúÍ«¨zbš?ò<br />
000000E0: 0927963F 079A91F7 16BFC63A 825A4BCF .'–?.š‘÷.¿Æ:‚ZKÏ<br />
000000F0: 4950958C 55807E39 B148051E 21C7244F IP•ŒU€~9±H..!Ç$O<br />
</syntaxhighlight><br />
<br />
=== Debug Modulus ===<br />
B3 65 54 FB 0A B0 1E 85 A7 F6 CF 91 8E BA 96 99<br />
0D 8B 91 69 2A EE 01 20 4F 34 5C 2C 4F 4E 37 C7<br />
F1 0B D4 CD A1 7F 93 F1 33 59 CE B1 E9 DD 26 E6<br />
F3 BB 77 87 46 7A D6 4E 47 4A D1 41 B7 79 4A 38<br />
06 6E CF 61 8F CD C1 40 0B FA 26 DC C0 34 51 83<br />
D9 3B 11 54 3B 96 27 32 9A 95 BE 1E 68 11 50 A0<br />
6B 10 A8 83 8B F5 FC BC 90 84 7A 5A 5C 43 52 E6<br />
C8 26 E9 FE 06 A0 8B 53 0F AF 1E C4 1C 0B CF 50<br />
1A A4 F3 5C FB F0 97 E4 DE 32 0A 9F E3 5A AA B7<br />
44 7F 5C 33 60 B9 0F 22 2D 33 2A E9 69 79 31 42<br />
8F E4 3A 13 8B E7 26 BD 08 87 6C A6 F2 73 F6 8E<br />
A7 F2 FE FB 6C 28 66 0D BD D7 EB 42 A8 78 E6 B8<br />
6B AE C7 A9 E2 40 6E 89 20 82 25 8E 3C 6A 60 D7<br />
F3 56 8E EC 8D 51 8A 63 3C 04 78 23 0E 90 0C B4<br />
E7 86 3B 4F 8E 13 09 47 32 0E 04 B8 4D 5B B0 46<br />
71 B0 5C F4 AD 63 4F C5 E2 AC 1E C4 33 96 09 7B</div>
Simon66
https://switchbrew.org/w/index.php?title=Package1&diff=3628
Package1
2018-02-07T17:07:43Z
<p>Simon66: Added formatting</p>
<hr />
<div>Present in the firmware package titles (0100000000000819, 010000000000081A, 010000000000081B and 010000000000081C) and installed into eMMC storage's [[Flash_Filesystem#Boot_Partitions|boot partitions 0 and 1]], "package1" contains the first Switch bootloader to run under the NVIDIA boot processor (an ARM7TDMI called "BPMP", "BPMP-Lite", "AVP" or "COP").<br />
<br />
The boot ROM validates, copies to IRAM and executes this package by parsing it's information block from the [[BCT|BCT]].<br />
<br />
= Format =<br />
Package1 is distributed as a plaintext initial bootloader and a secondary encrypted blob. Execution starts at the plaintext bootloader which will set up hardware, generate keys and decrypt the next stage.<br />
<br />
== Bootloader ==<br />
The code for this stage is stored in plaintext inside the package. By looking into the BCT's bootloader0_info (normal) or bootloader1_info (safe mode), the boot ROM starts executing this stage at address 0x40010020 in IRAM.<br />
<br />
=== Initialization ===<br />
The stack pointer is set.<br />
<br />
<syntaxhighlight lang="c"><br />
// Set the stack pointer<br />
*(u32 *)sp = 0x40008000;<br />
<br />
// Jump to main<br />
bootloader_main();<br />
<br />
// Infinite loop<br />
deadlock();<br />
</syntaxhighlight><br />
<br />
=== Main ===<br />
The bootloader poisons the exception vectors, cleans up memory (.bss and init_array), sets up hardware devices (including the security engine and fuses), does all the necessary checks, generates keys and finally decrypts and executes the next stage.<br />
<br />
<syntaxhighlight lang="c"><br />
// Poison all exception vectors<br />
*(u32 *)0x6000F200 = panic();<br />
*(u32 *)0x6000F204 = panic();<br />
*(u32 *)0x6000F208 = panic();<br />
*(u32 *)0x6000F20C = panic();<br />
*(u32 *)0x6000F210 = panic();<br />
*(u32 *)0x6000F214 = panic();<br />
*(u32 *)0x6000F218 = panic();<br />
*(u32 *)0x6000F21C = panic();<br />
<br />
u32 bss_addr_end = bss_addr_start;<br />
u32 bss_offset = 0;<br />
u32 bss_size = bss_addr_end - bss_addr_start;<br />
<br />
// Clear .bss region<br />
// Never happens due to bss_size being set to 0<br />
while (bss_offset < bss_size)<br />
{<br />
*(u32 *)bss_addr_start + bss_offset = 0;<br />
bss_offset += 0x04;<br />
}<br />
<br />
u32 init_array_addr_end = init_array_addr_start;<br />
u32 init_array_offset = init_array_addr_start;<br />
<br />
// Call init methods<br />
// Never happens due to init_array_addr_end being set to init_array_addr_start<br />
while (init_array_offset < init_array_addr_end)<br />
{<br />
u32 init_method_offset = *(u32 *)init_array_offset;<br />
<br />
call_init_method(init_method_offset + init_array_offset);<br />
init_array_offset += 0x04;<br />
}<br />
<br />
// Setup I2S1, I2S2, I2S3, I2S4, DISPLAY and VIC<br />
enable_hw_devices();<br />
<br />
// Program the SE clock and resets<br />
// Uses RST_DEVICES_V, CLK_OUT_ENB_V, CLK_SOURCE_SE and CLK_V_SE<br />
enable_se_clkrst();<br />
<br />
// Set MISC_CLK_ENB<br />
// This makes fuse registers visible<br />
enable_misc_clk(0x01);<br />
<br />
// Read FUSE_SKU_INFO and compare with 0x83<br />
check_sku();<br />
<br />
// Check configuration fuses<br />
check_config_fuses();<br />
<br />
u32 bct_iram_addr = 0x40000000;<br />
<br />
// Check bootloader version from BCT<br />
check_bootloader_ver(bct_iram_addr);<br />
<br />
// Check anti-downgrade fuses<br />
check_downgrade();<br />
<br />
// Set FUSE_DIS_PGM<br />
// Disables fuse programming until next reboot<br />
disable_fuse_pgm();<br />
<br />
// Setup memory controllers<br />
enable_mem_ctl();<br />
<br />
// Setup the security engine's address<br />
set_se_addr(0x70012000);<br />
<br />
// Check SE global config<br />
check_se_status();<br />
<br />
// Generate keys<br />
keygen(bct_iram_addr);<br />
<br />
u32 pk11_blob_addr = 0x40013FE0;<br />
<br />
// Decrypt the PK11 blob and get the next stage's entrypoint<br />
nx_boot_addr = decrypt_pk11_blob(pk11_blob_addr);<br />
<br />
u32 nx_boot_sp = 0x40007000;<br />
<br />
// Set the stack pointer and jump to a stub responsible<br />
// for cleaning up and branching into the next stage<br />
exec_nx_boot_stub(nx_boot_addr, nx_boot_stub_addr, nx_boot_sp);<br />
<br />
return;<br />
</syntaxhighlight><br />
<br />
==== Panic ====<br />
If a panic occurs, all sensitive memory contents are cleared, the security engine and fuse programming are disabled and the boot processor is left in a halted state.<br />
<br />
<syntaxhighlight lang="c"><br />
// Clear all stack contents<br />
clear_stack();<br />
<br />
// Terminate the security engine<br />
disable_se();<br />
<br />
// Set FUSE_DIS_PGM<br />
// Disables fuse programming until next reboot<br />
disable_fuse_pgm();<br />
<br />
// Clear temporary key storage memory<br />
clear_mem();<br />
<br />
// Clear the PK11 blob from memory<br />
clear_pk11_blob();<br />
<br />
u32 FLOW_CTLR_HALT_COP_EVENTS = 0x60007004;<br />
u32 FLOW_MODE_STOP = 0x40000000;<br />
u32 HALT_COP_EVENT_JTAG = 0x10000000;<br />
<br />
// Halt the boot processor<br />
while (true)<br />
*(u32 *)FLOW_CTLR_HALT_COP_EVENTS = (FLOW_MODE_STOP | HALT_COP_EVENT_JTAG);<br />
</syntaxhighlight><br />
<br />
==== Anti-downgrade ====<br />
See [[Fuses#Anti-downgrade|Anti-downgrade]].<br />
<br />
==== Memory controllers ====<br />
After disabling fuse programming, the bootloader configures the EMC and MEM/MC. It additionally disables QSPI resets and programs a special aperture designed for AHB redirected access to IRAM.<br />
<br />
<syntaxhighlight lang="c"><br />
u32 PERIPH_CLK_SOURCE_EMC = 0x6000619C;<br />
u32 CLK_OUT_ENB_SET_H = 0x60006328;<br />
u32 CLK_OUT_ENB_SET_X = 0x60006284;<br />
u32 RST_DEVICES_SET_H = 0x60006308;<br />
u32 RST_DEVICES_CLR_Y = 0x600062AC;<br />
u32 MC_IRAM_REG_CTRL = 0x70019964;<br />
u32 MC_IRAM_BOM = 0x7001965C;<br />
u32 MC_IRAM_TOM = 0x70019660;<br />
<br />
// Initialize EMC's clock source<br />
u32 emc_clk_src_val = *(u32 *)PERIPH_CLK_SOURCE_EMC;<br />
*(u32 *)PERIPH_CLK_SOURCE_EMC = (emc_clk_src_val | 0x40000000);<br />
<br />
// Enable CLK_H_EMC<br />
u32 clk_out_enb_h_val = *(u32 *)CLK_OUT_ENB_SET_H;<br />
clk_out_enb_h_val &= ~(0x2000000);<br />
clk_out_enb_h_val |= 0x2000000;<br />
*(u32 *)CLK_OUT_ENB_SET_H = clk_out_enb_h_val;<br />
<br />
// Enable CLK_H_MEM<br />
clk_out_enb_h_val = *(u32 *)CLK_OUT_ENB_SET_H;<br />
clk_out_enb_h_val &= ~(0x01);<br />
clk_out_enb_h_val |= 0x01;<br />
*(u32 *)CLK_OUT_ENB_SET_H = clk_out_enb_h_val;<br />
<br />
// Enable CLK_X_EMC_DLL<br />
u32 clk_out_enb_x_val = *(u32 *)CLK_OUT_ENB_SET_X;<br />
clk_out_enb_x_val &= ~(0x4000);<br />
clk_out_enb_x_val |= 0x4000;<br />
*(u32 *)CLK_OUT_ENB_SET_X = clk_out_enb_x_val;<br />
<br />
// Enable RST_H_EMC and RST_H_MEM<br />
*(u32 *)RST_DEVICES_SET_H = 0x2000001;<br />
<br />
// Wait a while<br />
mdelay(0x05);<br />
<br />
// Disable RST_Y_QSPI<br />
u32 rst_clr_y_val = *(u32 *)RST_DEVICES_CLR_Y;<br />
rst_clr_y_val &= ~(0x80000);<br />
rst_clr_y_val |= 0x80000;<br />
*(u32 *)RST_DEVICES_CLR_Y = rst_clr_y_val;<br />
<br />
// Refresh MC_IRAM_REG_CTRL<br />
// Should be set to 0 (MC_ENABLE_IRAM_CFG_WRITES)<br />
u32 mc_iram_reg_ctrl_val = *(u32 *)MC_IRAM_REG_CTRL;<br />
*(u32 *)MC_IRAM_REG_CTRL = mc_iram_reg_ctrl_val;<br />
<br />
// Set base and top addresses for AHB redirected IRAM path<br />
// This allows devices like the GPU to access this range<br />
*(u32 *)MC_IRAM_BOM = 0x40000000;<br />
*(u32 *)MC_IRAM_TOM = 0x4003F000;<br />
<br />
// Read back MC_IRAM_REG_CTRL<br />
mc_iram_reg_ctrl_val = *(u32 *)MC_IRAM_REG_CTRL;<br />
<br />
return mc_iram_reg_ctrl_val;<br />
</syntaxhighlight><br />
<br />
==== Key generation ====<br />
After the security engine is ready and before decrypting the next stage, the bootloader initializes and generates several keys into hardware keyslots.<br />
For more details on the Switch's cryptosystem, please see [[Cryptosystem|this page]].<br />
<br />
===== Selection =====<br />
Depending on [[Fuses#FUSE_RESERVED_ODM4|FUSE_RESERVED_ODM4]] and [[Fuses#FUSE_SPARE_BIT_5|FUSE_SPARE_BIT_5]] different static seeds are selected for key generation.<br />
<br />
<syntaxhighlight lang="c"><br />
// Initialize keyslots 0x0C and 0x0D as readable<br />
init_keyslot(0x0C, 0x15);<br />
init_keyslot(0x0D, 0x15);<br />
<br />
// Find the BCT's data address from IRAM header<br />
u32 bct_data_addr = *(u32 *)bct_imem_addr + 0x4C;<br />
u32 bct_customer_data_addr = *(u32 *)bct_data_addr + 0x450;<br />
<br />
// Wrapper to get unit type from FUSE_RESERVED_ODM4<br />
// This tells if the device is retail or debug<br />
bool is_retail = is_unit_retail();<br />
<br />
u32 master_static_seed_addr = 0;<br />
u32 master_static_seed_size = 0;<br />
<br />
if (is_retail)<br />
{<br />
// Read FUSE_SPARE_BIT_5<br />
// This tells which master key to use<br />
u32 master_key_ver = read_fuse_spare_bit_5();<br />
<br />
// Invalid for retail<br />
if (!master_key_ver)<br />
panic();<br />
else<br />
{<br />
master_static_seed_addr = static_seed1_addr;<br />
master_static_seed_size = 0x10;<br />
<br />
// Generate retail keys<br />
generate_retail_keys(bct_customer_data_addr, static_seed_addr, static_seed_size);<br />
}<br />
}<br />
else<br />
{<br />
// Read FUSE_SPARE_BIT_5<br />
// This tells which master key to use<br />
u32 master_key_ver = read_fuse_spare_bit_5();<br />
<br />
// Use debug key set<br />
if (!master_key_ver)<br />
{<br />
// Read the first byte of the BCT RSA PSS signature<br />
u8 rsa_pss_1_byte = *(u8 *)bct_data_addr + 0x210;<br />
<br />
if (rsa_pss_1_byte == 0x11)<br />
{<br />
master_static_seed_addr = static_seed6_addr;<br />
master_static_seed_size = 0x10;<br />
}<br />
else <br />
{<br />
master_static_seed_addr = static_seed7_addr;<br />
master_static_seed_size = 0x10;<br />
}<br />
<br />
// Generate debug keys<br />
generate_debug_keys(static_seed_addr, static_seed_size);<br />
}<br />
else<br />
{<br />
// Read the first byte of the BCT RSA PSS signature<br />
u8 rsa_pss_1_byte = *(u8 *)bct_data_addr + 0x210;<br />
<br />
if (rsa_pss_1_byte == 0x4F) // Different key as in retail mode<br />
{<br />
master_static_seed_addr = static_seed0_addr;<br />
master_static_seed_size = 0x10;<br />
}<br />
else // Same key as in retail mode<br />
{<br />
master_static_seed_addr = static_seed1_addr;<br />
master_static_seed_size = 0x10;<br />
}<br />
<br />
// Generate retail keys<br />
generate_retail_keys(bct_customer_data_addr, master_static_seed_addr, master_static_seed_size);<br />
}<br />
}<br />
<br />
// Initialize keyslots 0x0C and 0x0D as unreadable<br />
init_keyslot(0x0C, 0xFF);<br />
init_keyslot(0x0D, 0xFF);<br />
<br />
return;<br />
</syntaxhighlight><br />
<br />
===== generate_retail_keys =====<br />
In order to generate retail keys, the bootloader starts by initializing TSEC and grabbing it's [[TSEC#Device_key_generation|device key]]. Using static seeds and the SBK, the keyblob injected into the BCT's [[BCT#customer_data|customer_data]] is validated and decrypted. The resulting keys will then be used to generate the master static key and the master device key.<br />
<br />
See the pseudocode bellow for the detailed process.<br />
<br />
<syntaxhighlight lang="c"><br />
u32 in_addr = 0;<br />
u32 in_size = 0;<br />
u32 out_addr = 0;<br />
u32 out_size = 0;<br />
u32 keyslot = 0;<br />
u32 keyslot_dst = 0;<br />
<br />
// Get the TSEC device key<br />
tsec_get_device_key(tsec_device_key_addr, 0x10);<br />
<br />
// Install the TSEC device key into keyslot 0x0D<br />
set_keyslot_data(0x0D, tsec_device_key_addr, 0x10);<br />
<br />
in_addr = static_seed2_addr;<br />
in_size = 0x10;<br />
out_addr = keyblob_device_key_addr;<br />
out_size = 0x10;<br />
keyslot = 0x0D;<br />
<br />
// Use the tsec_device_key (keyslot 0x0D) to decrypt the static_seed2<br />
// This generates the keyblob_device_key<br />
aes_ecb_decrypt(out_addr, out_size, keyslot, in_addr, in_size);<br />
<br />
in_addr = keyblob_device_key_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0E;<br />
keyslot_dst = 0x0D;<br />
<br />
// Use SBK (keyslot 0x0E) to further decrypt the<br />
// keyblob_device_key and install it into keyslot 0x0D<br />
// This will generate the keyblob_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
// Clear SBK and SSK keyslots<br />
clear_keyslot(0x0E);<br />
clear_keyslot(0x0F);<br />
<br />
in_addr = static_seed4_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0D;<br />
keyslot_dst = 0x0B;<br />
<br />
// Use keyblob_key (keyslot 0x0D) to decrypt the<br />
// static_seed4_addr and install it to keyslot 0x0B<br />
// This will generate the bct_mac_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
in_addr = bct_customer_data_addr + 0x10;<br />
in_size = 0xA0;<br />
out_addr = mac_addr;<br />
out_size = 0x10;<br />
keyslot = 0x0B;<br />
<br />
// Use the bct_mac_key (keyslot 0x0B) to generate<br />
// CMAC over bct_customer_data_addr + 0x10<br />
aes_cmac(out_addr, out_size, keyslot, in_addr, in_size);<br />
<br />
// Comapre the generated hash with the first<br />
// 0x10 bytes of bct_customer_data<br />
bool match = safe_memcmp(mac_addr, bct_customer_data_addr, 0x10);<br />
<br />
// Hashes don't match<br />
if (!match)<br />
panic();<br />
<br />
in_addr = bct_customer_data_addr + 0x20;<br />
in_size = 0x90;<br />
ctr_addr = bct_customer_data_addr + 0x10;<br />
ctr_size = 0x10;<br />
out_addr = dec_payload_addr;<br />
out_size = 0x90;<br />
keyslot = 0x0D;<br />
<br />
// AES-CTR decrypt<br />
// Use the keyblob_key (keyslot 0x0D) to decrypt bct_customer_data_addr + 0x20<br />
// using bct_customer_data_addr + 0x10 as CTR<br />
aes_ctr_decrypt(out_addr, out_size, keyslot, in_addr, in_size, ctr_addr, ctr_size);<br />
<br />
// Install the last decrypted keyblob key into keyslot 0x0B<br />
// This is the pk11_key<br />
set_keyslot_data(0x0B, dec_payload_addr + 0x80, 0x10);<br />
<br />
// Install the first decrypted keyblob key into keyslot 0x0C<br />
// This is the master_static_kek<br />
set_keyslot_data(0x0C, dec_payload_addr, 0x10);<br />
<br />
// Clear out the decrypted data<br />
memclear(dec_payload_addr, 0x90);<br />
<br />
in_addr = master_static_seed_addr;<br />
in_size = master_static_seed_size;<br />
keyslot = 0x0C;<br />
keyslot_dst = 0x0C;<br />
<br />
// Use the master_static_kek (keyslot 0x0C) to decrypt<br />
// master_static_seed and install it into keyslot 0x0C<br />
// This will generate the master_static_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
in_addr = static_seed3_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0D;<br />
keyslot_dst = 0x0D;<br />
<br />
// Use keyblob_key (keyslot 0x0D) to decrypt<br />
// static_seed3_addr and install it into keyslot 0x0D<br />
// This will generate the master_device_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
return;<br />
</syntaxhighlight><br />
<br />
===== generate_debug_keys =====<br />
In order to generate debug keys, the bootloader only uses static seeds, the SBK and the SSK.<br />
<br />
See the pseudocode bellow for the detailed process.<br />
<br />
<syntaxhighlight lang="c"><br />
u32 in_addr = 0;<br />
u32 in_size = 0;<br />
u32 keyslot = 0;<br />
u32 keyslot_dst = 0;<br />
<br />
in_addr = static_seed8_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0E;<br />
keyslot_dst = 0x0B;<br />
<br />
// Use SBK (keyslot 0x0E) to decrypt the<br />
// static_seed8 and install it to keyslot 0x0B<br />
// This will generate debug_pk11_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
in_addr = static_seed5_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0E;<br />
keyslot_dst = 0x0C;<br />
<br />
// Use SBK (keyslot 0x0E) to decrypt the<br />
// static_seed5 and install it to keyslot 0x0C<br />
// This will generate debug_master_static_kek<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
in_addr = static_seed9_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0F;<br />
keyslot_dst = 0x0D;<br />
<br />
// Use SSK (keyslot 0x0F) to decrypt the<br />
// static_seed9 and install it to keyslot 0x0D<br />
// This will generate debug_keyblob_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
// Clear SBK and SSK keyslots<br />
clear_keyslot(0x0E);<br />
clear_keyslot(0x0F);<br />
<br />
in_addr = master_static_seed_addr;<br />
in_size = master_static_seed_size;<br />
keyslot = 0x0C;<br />
keyslot_dst = 0x0C;<br />
<br />
// Use the debug_master_static_kek (keyslot 0x0C) to decrypt the<br />
// master_static_seed and install it to keyslot 0x0C<br />
// This will generate the master_static_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
in_addr = static_seed3_addr;<br />
in_size = 0x10;<br />
keyslot = 0x0D;<br />
keyslot_dst = 0x0D;<br />
<br />
// Use debug_keyblob_key (keyslot 0x0D) to decrypt the<br />
// static_seed3 and install it to keyslot 0x0D<br />
// This will generate the master_device_key<br />
decrypt_keyslot(keyslot_dst, keyslot, in_addr, in_size);<br />
<br />
return;<br />
</syntaxhighlight><br />
<br />
== PK11 Blob ==<br />
This blob is stored encrypted inside the package and is decrypted by the initial bootloader.<br />
<br />
=== Encryption ===<br />
The encrypted blob is prepended with it's CTR and total image size. After checking the image's size against an hardcoded value (can change on firmware updates), the image is AES-CTR decrypted and the keyslot used for decryption is immediately cleared.<br />
<br />
<syntaxhighlight lang="c"><br />
// Maximum encrypted blob's size on firmware version 1.0.0<br />
u32 max_pk11_enc_blob_size = 0x29000;<br />
<br />
u32 pk11_enc_blob_size = *(u32 *)pk11_blob_addr;<br />
u32 pk11_enc_blob_ctr_addr = pk11_blob_addr + 0x10; <br />
u32 pk11_enc_blob_addr = pk11_blob_addr + 0x20;<br />
<br />
// Validate the encrypted blob's size<br />
if (pk11_enc_blob_size > max_pk11_enc_blob_size)<br />
panic();<br />
<br />
u32 in_addr = pk11_enc_blob_addr;<br />
u32 in_size = pk11_enc_blob_size;<br />
u32 ctr_addr = pk11_enc_blob_ctr_addr;<br />
u32 ctr_size = 0x10;<br />
u32 out_addr = pk11_dec_blob_addr;<br />
u32 out_size = pk11_dec_blob_size;<br />
u32 keyslot = 0x0B;<br />
<br />
// AES-CTR decrypt<br />
// Use the pk11_key (keyslot 0x0B) to decrypt the blob in place<br />
aes_ctr_decrypt(out_addr, out_size, keyslot, in_addr, in_size, ctr_addr, ctr_size);<br />
<br />
// Clear pk11_key keyslot<br />
clear_keyslot(0x0B);<br />
<br />
// Validate the decrypted blob<br />
// Checks the "PK11" magic and some pk11 header fields<br />
bool is_valid = check_pk11_header(pk11_dec_blob_addr, pk11_dec_blob_size);<br />
<br />
// Invalid PK11 image<br />
if (!is_valid)<br />
panic();<br />
<br />
u32 pk11_header_size = 0x20;<br />
u32 pk11_sec1_offset = *(u32 *)pk11_dec_blob_addr + 0x14;<br />
u32 pk11_sec2_size = *(u32 *)pk11_dec_blob_addr + 0x18;<br />
<br />
// Calculate NX bootloader's entrypoint<br />
u32 nx_boot_addr = (pk11_dec_blob_addr + pk11_header_size + pk11_sec1_offset + pk11_sec2_size);<br />
<br />
return nx_boot_addr;<br />
</syntaxhighlight><br />
<br />
=== Header ===<br />
When decrypted, the blob is encapsulated in the following header.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Magic "PK11"<br />
|-<br />
| 0x4<br />
| 4<br />
| Section 0 size<br />
|-<br />
| 0x8<br />
| 4<br />
| Section 0 offset<br />
|-<br />
| 0xC<br />
| 4<br />
| Unknown<br />
|-<br />
| 0x10<br />
| 4<br />
| Section 1 size<br />
|-<br />
| 0x14<br />
| 4<br />
| Section 1 offset<br />
|-<br />
| 0x18<br />
| 4<br />
| Section 2 size<br />
|-<br />
| 0x1C<br />
| 4<br />
| Section 2 offset<br />
|}<br />
<br />
=== Section 0 ===<br />
This section contains the warmboot binary.<br />
<br />
=== Section 1 ===<br />
This section contains the NX bootloader, which is run after the initial bootloader in package1.<br />
<br />
=== Section 2 ===<br />
This section contains the Secure Monitor binary.<br />
<br />
= Changelog =<br />
== 2.0.0 ==<br />
* The encrypted binaries' order and calculation for next stage's entrypoint was changed.<br />
<br />
Old layout (before 2.0.0):<br />
1.- PK11 header<br />
2.- Secure Monitor blob<br />
3.- NX bootloader blob<br />
4.- Warmboot blob<br />
<br />
NX bootloader entrypoint is calculated as:<br />
0x40013FE0 + 0x20 + 0x20 + NX bootloader blob's offset + Secure Monitor blob's size<br />
<br />
New layout (2.0.0+):<br />
1.- PK11 header<br />
2.- Warmboot blob<br />
3.- NX bootloader blob<br />
4.- Secure Monitor blob<br />
<br />
NX bootloader entrypoint is calculated as:<br />
0x40013FE0 + 0x20 + 0x20 + NX bootloader blob's offset + Warmboot blob's size<br />
<br />
* Some AES-ECB decryption related code was refactored.<br />
<br />
== 3.0.0 ==<br />
* The functions set_se_addr() and check_se_status() are now called right after enabling the security engine clocks and resets.<br />
See [[Switch_System_Flaws#Stage_1_Bootloader]].<br />
<br />
* Keyslot 0x0A is now used instead of keyslot 0x0D for generating the master_device_key.</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=3135
FirmwareNews
2017-12-05T05:30:59Z
<p>Simon66: </p>
<hr />
<div>As of this writing, the latest firmware is ''' 4.1.0'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=User:Testing&diff=2954
User:Testing
2017-10-28T04:27:55Z
<p>Simon66: Blanked the page</p>
<hr />
<div></div>
Simon66
https://switchbrew.org/w/index.php?title=User:Testing&diff=2953
User:Testing
2017-10-28T04:27:41Z
<p>Simon66: Created page with "Is plutobot still working after these minor changes took place?"</p>
<hr />
<div>Is plutobot still working after these minor changes took place?</div>
Simon66
https://switchbrew.org/w/index.php?title=Template:NavboxVersions&diff=2932
Template:NavboxVersions
2017-10-26T01:30:39Z
<p>Simon66: </p>
<hr />
<div><center><br />
{| class="wikitable"<br />
|-<br />
! colspan="2" | Nintendo Switch [[System Versions]]<br />
|-<br />
| align="center" | [[1.0.0]] • [[2.0.0]] • [[2.1.0]] • [[2.2.0]] • [[2.3.0]] • [[3.0.0]] • [[3.0.1]] • [[3.0.2]] • [[4.0.0]] • [[4.0.1]]<br />
|-|}<br />
</center><includeonly>[[Category:System versions]]</includeonly></div>
Simon66
https://switchbrew.org/w/index.php?title=System_Versions&diff=2931
System Versions
2017-10-26T01:28:54Z
<p>Simon66: </p>
<hr />
<div>{| class="wikitable"<br />
|-<br />
! System version <br />
! Release date<br />
! Package1 build date<br />
|-<br />
| [[1.0.0]]<br />
| Before console release<br />
| 2016-11-21 18:30:08<br />
|-<br />
| [[2.0.0]]<br />
| March 2, 2017<br />
| 2017-02-10 15:51:24<br />
|-<br />
| [[2.1.0]]<br />
| March 27, 2017<br />
| <br />
|-<br />
| [[2.2.0]]<br />
| April 17, 2017<br />
| <br />
|-<br />
| [[2.3.0]]<br />
| May 15, 2017<br />
| <br />
|-<br />
| [[3.0.0]]<br />
| June 19, 2017<br />
| 2017-05-19 10:14:10<br />
|-<br />
| [[3.0.1]]<br />
| July 31, 2017<br />
| 2017-07-10 16:17:58<br />
|-<br />
| [[3.0.2]]<br />
| September 5, 2017<br />
| <br />
|-<br />
| [[4.0.0]]<br />
| October 18, 2017<br />
| 2017-09-21 17:26:29<br />
|-<br />
| [[4.0.1]]<br />
| October 25, 2017<br />
| <br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=2930
FirmwareNews
2017-10-26T01:27:37Z
<p>Simon66: </p>
<hr />
<div>As of this writing, the latest firmware is ''' 4.0.1'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=News&diff=2929
News
2017-10-26T01:27:23Z
<p>Simon66: </p>
<hr />
<div><noinclude><br />
==Adding an item==<br />
* Log in to the wiki. Editing is disabled if you don't have an account.<br />
* Add the news event to the top of the list, using this format for the date: <tt><nowiki>'''</nowiki>{{#time: d F y}}<nowiki>''' </nowiki></tt>. Please include the application's creator, version number, and a link to a page on 3DBrew about the application. No external links please.<br />
* '''Move the last entry to the [[:News/Archive|news archive]]. There should be no more than 4 entries in the list.'''<br />
<br />
==Archives==<br />
For older news, see the [[:News/Archive|news archive]].<br />
<br />
=== News ===<br />
<!-- Add news below --></noinclude><br />
*'''25 October 17''' Nintendo released system update [[4.0.1]].<br />
*'''18 October 17''' Nintendo released system update [[4.0.0]].<br />
*'''17 September 17''' [https://github.com/switchbrew/libnx libnx] was made public, with examples available [https://github.com/switchbrew/switch-examples here].<br />
*'''5 September 17''' Nintendo released system update [[3.0.2]].<br />
*'''31 July 17''' Nintendo released system update [[3.0.1]].</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=2842
FirmwareNews
2017-10-19T01:14:00Z
<p>Simon66: </p>
<hr />
<div>As of this writing, the latest firmware is ''' 4.0.0'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=Error_codes&diff=2760
Error codes
2017-10-11T04:12:50Z
<p>Simon66: Reverted edits by Simon66 (talk) to last revision by Yellows8</p>
<hr />
<div>= Structure =<br />
These have been redesigned from the 3DS so that they fit within a Aarch64 MOV instruction immediate most of the time (without requiring the additional MOVK).<br />
<br />
{| class=wikitable<br />
! Bits || Field<br />
|-<br />
| 8-0 || Module<br />
|-<br />
| 21-9 || Description<br />
|}<br />
<br />
When a fatal-error is received the error code is outputted using the following formatter:<br />
%04d-%04x<br />
<br />
.. where the first code is <code>2000 + Module</code>, and the other being <code>Description</code>. Bits >=22 from the error-code are unused when displaying fatal-errors, since the Description ends with bit21.<br />
<br />
= Modules =<br />
{| class=wikitable<br />
! Value || Name<br />
|-<br />
| 1 || Kernel<br />
|-<br />
| 2 || FS<br />
|-<br />
| 3 || NVIDIA, TransferMemory<br />
|-<br />
| 5 || NCM<br />
|-<br />
| 6 || DD<br />
|-<br />
| 8 || LR<br />
|-<br />
| 9 || Loader<br />
|-<br />
| 10 || CMIF (IPC command interface)<br />
|-<br />
| 11 || HIPC (IPC)<br />
|-<br />
| 15 || PM<br />
|-<br />
| 16 || NS<br />
|-<br />
| 18 || HTC<br />
|-<br />
| 21 || SM<br />
|-<br />
| 22 || RO userland<br />
|-<br />
| 24 || SDMMC<br />
|-<br />
| 26 || SPL<br />
|-<br />
| 100 || ETHC<br />
|-<br />
| 101 || I2C<br />
|-<br />
| 105 || Settings<br />
|-<br />
| 110 || NIFM<br />
|-<br />
| 114 || Display<br />
|-<br />
| 116 || NTC<br />
|-<br />
| 117 || FGM<br />
|-<br />
| 120 || PCIE<br />
|-<br />
| 121 || Friends<br />
|-<br />
| 123 || SSL<br />
|-<br />
| 124 || Account<br />
|-<br />
| 126 || Mii<br />
|-<br />
| 128 || AM<br />
|-<br />
| 129 || Play Report<br />
|-<br />
| 133 || PCV<br />
|-<br />
| 134 || OMM<br />
|-<br />
| 137 || NIM<br />
|-<br />
| 138 || PSC<br />
|-<br />
| 140 || USB<br />
|-<br />
| 143 || BTM<br />
|-<br />
| 147 || ERPT<br />
|-<br />
| 148 || APM<br />
|-<br />
| 154 || NPNS<br />
|-<br />
| 157 || ARP<br />
|-<br />
| 158 || BOOT<br />
|-<br />
| 161 || NFC<br />
|-<br />
| 162 || Userland assert<br />
|-<br />
| 168 || Userland crash<br />
|-<br />
| 203 || HID<br />
|-<br />
| 206 || Capture<br />
|-<br />
| 345 || libnx<br />
|-<br />
| 651 || TC<br />
|-<br />
| 800 || [[Internet_Browser|General web-applet]]<br />
|-<br />
| 809 || [[Internet_Browser|WifiWebAuthApplet]]<br />
|-<br />
| 810 || [[Internet_Browser|Whitelisted-applet]]<br />
|-<br />
| 811 || [[Internet_Browser|ShopN]]<br />
|}<br />
<br />
8XX is for/includes system applets.<br />
<br />
= Error codes =<br />
{| class=wikitable<br />
! Value || Description || Description<br />
|-<br />
| 0x1C01 || 14 || Invalid kernel capability descriptor<br />
|-<br />
| 0x4201 || 33 || [[SPL_services#GetConfig|IsDebugMode]] isn't set.<br />
|-<br />
| 0xCA01 || 101 || Invalid size<br />
|-<br />
| 0xCC01 || 102 || Invalid address<br />
|-<br />
| 0xCE01 || 103 || Address is NULL / buffer size is too small.<br />
|-<br />
| 0xD001 || 104 || Memory full<br />
|-<br />
| 0xD201 || 105 || Handle-table full.<br />
|-<br />
| 0xD401 || 106 || Invalid memory state / invalid memory permissions.<br />
|-<br />
| 0xD801 || 108 || When trying to set executable permission on memory.<br />
|-<br />
| 0xDC01 || 110 || Invalid memory range<br />
|-<br />
| 0xE001 || 112 || Invalid thread priority.<br />
|-<br />
| 0xE201 || 113 || Invalid processor id.<br />
|-<br />
| 0xE401 || 114 || Invalid handle.<br />
|-<br />
| 0xE601 || 115 || Syscall copy from user failed.<br />
|-<br />
| 0xE801 || 116 || Invalid combination<br />
|-<br />
| 0xEA01 || 117 || Time out. Also when you give 0 handles to svcWaitSynchronizationN.<br />
|-<br />
| 0xEC01 || 118 || Canceled/interrupted [?]<br />
|-<br />
| 0xEE01 || 119 || Exceeding maximum<br />
|-<br />
| 0xF001 || 120 || Invalid enum<br />
|-<br />
| 0xF201 || 121 || No such entry<br />
|-<br />
| 0xF401 || 122 || Irq/DeviceAddressSpace/{...} already registered<br />
|-<br />
| 0xF601 || 123 || Port remote dead<br />
|-<br />
| 0xF801 || 124 || [Usermode] Unhandled interrupt<br />
|-<br />
| 0xFA01 || 125 || Wrong memory permission?<br />
|-<br />
| 0xFC01 || 126 || Reserved value<br />
|-<br />
| 0xFE01 || 127 || Invalid hardware breakpoint<br />
|-<br />
| 0x10001 || 128 || [Usermode] Fatal exception<br />
|-<br />
| 0x10601 || 131 || Port max sessions exceeded<br />
|-<br />
| 0x10801 || 132 || Resource limit exceeded<br />
|-<br />
| 0x41001 || 520 || Process not being debugged<br />
|-<br />
| 0xE02 || 7 || High byte in input u64 is zero.<br />
|-<br />
| 0x7802 || 60 || The specified [[NCA]]-type doesn't exist for this title.<br />
|-<br />
| 0x7D202 || 1001 || Process does not have RomFs <br />
|-<br />
| 0x7D402 || 1002 || Title-id not found / savedata not found.<br />
|-<br />
| 0xFA202 || 2001 || SD card not inserted<br />
|-<br />
| 0x13B002 || 2520 || Gamecard not inserted<br />
|-<br />
| 0x13DA02 || 2541 || Version check failed when mounting gamecard sysupdate partition?<br />
|-<br />
| 0x171402 || 2954 || Invalid gamecard handle.<br />
|-<br />
| 0x196002 || 3248 || Out of memory<br />
|-<br />
| 0x196202 || 3249 || Out of memory<br />
|-<br />
| 0x1A4A02 || 3365 || Out of memory<br />
|-<br />
| 0x235E02 || 4527 || NCA-path used with the wrong titleID.<br />
|-<br />
| 0x250E02 || 4743 || [[NAX0|Corrupted]] NAX0 header.<br />
|-<br />
| 0x251002 || 4744 || Invalid [[NAX0]] magicnum.<br />
|-<br />
| 0x2EE202 || 6001 || Invalid input<br />
|-<br />
| 0x2EE602 || 6003 || Path too long<br />
|-<br />
| 0x2F5A02 || 6061 || Offset outside storage<br />
|-<br />
| 0x313802 || 6300 || Operation not supported<br />
|-<br />
| 0x320002 || 6400 || Permission denied<br />
|-<br />
| 0x326602 || 6451 || Missing titlekey(?) required to mount content<br />
|-<br />
| 0x3EA03 || 501 || Invalid handle<br />
|-<br />
| 0x3EE03 || 503 || Invalid memory mirror<br />
|-<br />
| 0xA05 || 5 || [[Content_Manager_services|NcaID]] not found. Returned when attempting to mount titles which exist that aren't *8XX titles, the same way *8XX titles are mounted.<br />
|-<br />
| 0xE05 || 7 || TitleId not found<br />
|-<br />
| 0x1805 || 12 || Invalid StorageId<br />
|-<br />
| 0xDC05 || 110 || Gamecard not inserted<br />
|-<br />
| 0x17C05 || 190 || Gamecard not initialized<br />
|-<br />
| 0x1F405 || 250 || Sdcard not inserted<br />
|-<br />
| 0x20805 || 260 || Storage not mounted<br />
|-<br />
| 0x806 || 4 || Converted from error 0xD401.<br />
|-<br />
| 0x1006 || 8 || Converted from error 0xE401.<br />
|-<br />
| 0x408 || 2 || Not initialized.<br />
|-<br />
| 0x608 || 3 || Invalid control StorageID.<br />
|-<br />
| 0x808 || 4 || Storage not found.<br />
|-<br />
| 0xA08 || 5 || Access denied.<br />
|-<br />
| 0xE08 || 7 || Title is not registered.<br />
|-<br />
| 0x409 || 2 || Maximum processes loaded.<br />
|-<br />
| 0x6609 || 51 || Invalid memory state/permission<br />
|-<br />
| 0x6A09 || 53 || Invalid NRR<br />
|-<br />
| 0xA209 || 81 || Unaligned NRR address<br />
|-<br />
| 0xA409 || 82 || Bad NRR size<br />
|-<br />
| 0xAA09 || 85 || Bad NRR address<br />
|-<br />
| 0x1A80A || 212 || Bad magic (expected 'SFCO')<br />
|-<br />
| 0x20B || 1 || Size too big to fit to marshal.<br />
|-<br />
| 0x11A0B || 141 || Went past maximum during marshalling.<br />
|-<br />
| 0x1900B || 200 || Session doesn't support domains.<br />
|-<br />
| 0x25A0B || 301 || Remote process is dead.<br />
|-<br />
| 0x3D60B || 491 || IPC Query 1 failed.<br />
|-<br />
| 0x20F || 1 || Pid not found<br />
|-<br />
| 0x60F || 3 || Process has no pending events<br />
|-<br />
| 0x410 || 2 || Title-id not found<br />
|-<br />
| 0xF010 || 120 || Gamecard sysupdate not required<br />
|-<br />
| 0x1F610 || 251 || Unexpected StorageId<br />
|-<br />
| 0x415 || 2 || Not initialized.<br />
|-<br />
| 0x615 || 3 || Max sessions<br />
|-<br />
| 0xC15 || 6 || Invalid name (all zeroes)<br />
|-<br />
| 0x1015 || 8 || Permission denied<br />
|-<br />
| 0x416 || 2 || Address space is full<br />
|-<br />
| 0x616 || 3 || NRO already loaded<br />
|-<br />
| 0x816 || 4 || Invalid NRO header values<br />
|-<br />
| 0xC16 || 6 || Bad NRR magic<br />
|-<br />
| 0x1016 || 8 || Reached max NRR count<br />
|-<br />
| 0x1216 || 9 || Unable to verify NRO hash or NRR signature<br />
|-<br />
| 0x80216 || 1025 || Address not page-aligned<br />
|-<br />
| 0x80416 || 1026 || Incorrect NRO size<br />
|-<br />
| 0x80816 || 1028 || NRO not loaded<br />
|-<br />
| 0x80A16 || 1029 || NRR not loaded<br />
|-<br />
| 0x80C16 || 1030 || Already initialized<br />
|-<br />
| 0x80E16 || 1031 || Not initialized<br />
|-<br />
| 0x41A || 2 || Argument is invalid<br />
|-<br />
| 0xD01A || 104 || All AES engines busy<br />
|-<br />
| 0xD21A || 105 || Invalid AES engine-id<br />
|-<br />
| 0x272 || 1 || Generic error<br />
|-<br />
| 0xCC74 || 102 || Time not set<br />
|-<br />
| 0x287C || 20 || Argument is NULL<br />
|-<br />
| 0x2C7C || 22 || Argument is invalid<br />
|-<br />
| 0x3C7C || 30 || Bad input buffer size<br />
|-<br />
| 0x407C || 32 || Invalid input buffer<br />
|-<br />
| 0x668C || 51 || USB data-transfer in progress<br />
|-<br />
| 0x3C9D || 30 || Address is NULL<br />
|-<br />
| 0x3E9D || 31 || PID is NULL<br />
|-<br />
| 0x549D || 42 || Already bound<br />
|-<br />
| 0xCC9D || 102 || Invalid PID<br />
|-<br />
| 0x3CF089 || 7800 || Unknown/invalid libcurl error.<br />
|-<br />
| 0x3E8289-0x3F4089 || 8001-8096 || libcurl error 1-96. Some of the libcurl errors in the error-table map to the above unknown-libcurl-error however.<br />
|}<br />
<br />
== FS Error Codes ==<br />
<br />
The following are the error codes recognized by nn::fs::detail::LogErrorMessage found in some [[Factory Setup|factory]] titles:<br />
<br />
{| class=wikitable<br />
! Error Code || Description || Message<br />
|-<br />
| 0x7802 || 60 || Error: Specified mount name already exists.<br />
|-<br />
| 0xD401 || 106 || Error: Passed buffer is not usable for fs library.<br />
|-<br />
| 0x7D202 || 1001 || Error: Specified partition is not found.<br />
|-<br />
| 0x7D402 || 1002 || Error: Specified target is not found.<br />
|-<br />
| 0xFA002 - 0x138602 || 2000 - 2499 || Error: Failed to access SD card.<br />
|-<br />
| 0x136802 - 0x176E02 || 2500 - 2999 || Error: Failed to access game card.<br />
|-<br />
| 0x177202 || 3001 || Error: Specified operation is not implemented.<br />
|-<br />
| 0x177A02 || 3005 || Error: Specified value is out of range.<br />
|-<br />
| 0x1B5802 - 0x1F3E02 || 3500 - 3999 || Error: Failed to access MMC.<br />
|-<br />
| 0x1F4202 - 0x219602 || 4001 - 4299 || Error: ROM is corrupted.<br />
|-<br />
| 0x219A02 - 0x232602 || 4301 - 4499 || Error: Save data is corrupted.<br />
|-<br />
| 0x232A02 - 0x23EE02 || 4501 - 4599 || Error: NCA is corrupted.<br />
|-<br />
| 0x23F202 - 0x243E02 || 4601 - 4639 || Error: Integrity verification failed.<br />
|-<br />
| 0x244202 - 0x246602 || 4641 - 4659 || Error: Partition FS is corrupted.<br />
|-<br />
| 0x246A02 - 0x248E02 || 4661 - 4679 || Error: Built-in-storage is corrupted.<br />
|-<br />
| 0x249202 - 0x24B602 || 4681 - 4699 || Error: FAT FS is corrupted.<br />
|-<br />
| 0x24BA02 - 0x24DE02 || 4701 - 4719 || Error: HOST FS is corrupted.<br />
|-<br />
| 0x1F4002 - 0x270E02 || 4000, 4300, 4500, 4600, 4640, 4660, 4680, 4700, 4720-4999 || Error: Data is corrupted.<br />
|-<br />
| 0x271002 - 0x2EDE02 || 5000-5999 || Error: Unexpected failure occurred.<br />
|-<br />
| 0x2EE402 - 0x2F1A02 || 6002-6029 || Error: Invalid path was specified.<br />
|-<br />
| 0x2F5A02 || 6061 || Error: Invalid offset was specified.<br />
|-<br />
| 0x2F5C02 || 6062 || Error: Invalid size was specified.<br />
|-<br />
| 0x2F5E02 || 6063 || Error: Null pointer argument was specified.<br />
|-<br />
| 0x2EE002 || 6000 || Error: Precondition violation.<br />
|-<br />
| 0x2EE202 - 0x306E02 || 6001-6199 || Error: Invalid argument was specified.<br />
|-<br />
| 0x307202 || 6201 || Error: OpenMode_AllowAppend is required for implicit extension of file size by WriteFile().<br />
|-<br />
| 0x307002 - 0x313602 || 6200, 6202 - 6299 || Error: Invalid operation for the open mode.<br />
|-<br />
| 0x313802 - 0x31FE02 || 6300-6399 || Error: Unsupported operation.<br />
|-<br />
| 0x320002 - 0x32C602 || 6400-6499 || Error: Permission denied.<br />
|-<br />
| 0x346402 || 6706 || Error: Enough journal space is not left.<br />
|-<br />
| 0x346A02 || 6709 || Error: The open count of files and directories reached the limitation.<br />
|}<br />
<br />
= Fatal Errors =<br />
{| class=wikitable<br />
! Error || Description<br />
|-<br />
| 2162-0002<br />
| Can be triggered by running [[SVC|svcBreak]]. The svcBreak params have no affect on the value of the thrown error-code.<br />
|-<br />
| 2168-0000<br />
| Userland ARM undefined instruction exception<br />
|-<br />
| 2168-0001<br />
| Userland ARM prefetch-abort due to PC set to non-executable region<br />
|-<br />
| 2168-0002<br />
| Userland ARM data abort. Also caused by abnormal process termination via [[SVC|svcExitProcess]]. Note: directly jumping to nnMain()-retaddr from non-main-thread has the same result.<br />
|-<br />
| 2168-0003<br />
| Userland PC address not aligned to 4 bytes<br />
|}<br />
<br />
= Support Errors =<br />
{| class=wikitable<br />
! Error ! Module || Description || Notes<br />
|-<br />
| <br />
| {web-applets listed above}<br />
| 2750<br />
| MP4 parsing failed.<br />
|}<br />
Normal error-codes displayed by the system also use the same format as fatal-errors.</div>
Simon66
https://switchbrew.org/w/index.php?title=Error_codes&diff=2759
Error codes
2017-10-11T04:12:33Z
<p>Simon66: Reverted edits by Yellows8 (talk) to last revision by Qlutoo</p>
<hr />
<div>= Structure =<br />
These have been redesigned from the 3DS so that they fit within a Aarch64 MOV instruction immediate most of the time (without requiring the additional MOVK).<br />
<br />
{| class=wikitable<br />
! Bits || Field<br />
|-<br />
| 8-0 || Module<br />
|-<br />
| 21-9 || Description<br />
|}<br />
<br />
When a fatal-error is received the error code is outputted using the following formatter:<br />
%04d-%04x<br />
<br />
.. where the first code is <code>2000 + Module</code>, and the other being <code>Description</code>. Bits >=22 from the error-code are unused when displaying fatal-errors, since the Description ends with bit21.<br />
<br />
= Modules =<br />
{| class=wikitable<br />
! Value || Name<br />
|-<br />
| 1 || Kernel<br />
|-<br />
| 2 || FS<br />
|-<br />
| 3 || NVIDIA, TransferMemory<br />
|-<br />
| 5 || NCM<br />
|-<br />
| 6 || DD<br />
|-<br />
| 8 || LR<br />
|-<br />
| 9 || Loader<br />
|-<br />
| 10 || CMIF (IPC command interface)<br />
|-<br />
| 11 || HIPC (IPC)<br />
|-<br />
| 15 || PM<br />
|-<br />
| 16 || NS<br />
|-<br />
| 18 || HTC<br />
|-<br />
| 21 || SM<br />
|-<br />
| 22 || RO userland<br />
|-<br />
| 24 || SDMMC<br />
|-<br />
| 26 || SPL<br />
|-<br />
| 100 || ETHC<br />
|-<br />
| 101 || I2C<br />
|-<br />
| 105 || Settings<br />
|-<br />
| 110 || NIFM<br />
|-<br />
| 114 || Display<br />
|-<br />
| 116 || NTC<br />
|-<br />
| 117 || FGM<br />
|-<br />
| 120 || PCIE<br />
|-<br />
| 121 || Friends<br />
|-<br />
| 123 || SSL<br />
|-<br />
| 124 || Account<br />
|-<br />
| 126 || Mii<br />
|-<br />
| 128 || AM<br />
|-<br />
| 129 || Play Report<br />
|-<br />
| 133 || PCV<br />
|-<br />
| 134 || OMM<br />
|-<br />
| 137 || NIM<br />
|-<br />
| 138 || PSC<br />
|-<br />
| 140 || USB<br />
|-<br />
| 143 || BTM<br />
|-<br />
| 147 || ERPT<br />
|-<br />
| 148 || APM<br />
|-<br />
| 154 || NPNS<br />
|-<br />
| 157 || ARP<br />
|-<br />
| 158 || BOOT<br />
|-<br />
| 161 || NFC<br />
|-<br />
| 162 || Userland assert<br />
|-<br />
| 168 || Userland crash<br />
|-<br />
| 203 || HID<br />
|-<br />
| 206 || Capture<br />
|-<br />
| 345 || libnx<br />
|-<br />
| 651 || TC<br />
|-<br />
| 800 || [[Internet_Browser|General web-applet]]<br />
|-<br />
| 809 || [[Internet_Browser|WifiWebAuthApplet]]<br />
|-<br />
| 810 || [[Internet_Browser|Whitelisted-applet]]<br />
|-<br />
| 811 || [[Internet_Browser|ShopN]]<br />
|}<br />
<br />
8XX is for/includes system applets.<br />
<br />
= Error codes =<br />
{| class=wikitable<br />
! Value || Description || Description<br />
|-<br />
| 0x1C01 || 14 || Invalid kernel capability descriptor<br />
|-<br />
| 0x4201 || 33 || [[SPL_services#GetConfig|IsDebugMode]] isn't set.<br />
|-<br />
| 0xCA01 || 101 || Invalid size<br />
|-<br />
| 0xCC01 || 102 || Invalid address<br />
|-<br />
| 0xCE01 || 103 || Address is NULL / buffer size is too small.<br />
|-<br />
| 0xD001 || 104 || Memory full<br />
|-<br />
| 0xD201 || 105 || Handle-table full.<br />
|-<br />
| 0xD401 || 106 || Invalid memory state / invalid memory permissions.<br />
|-<br />
| 0xD801 || 108 || When trying to set executable permission on memory.<br />
|-<br />
| 0xDC01 || 110 || Invalid memory range<br />
|-<br />
| 0xE001 || 112 || Invalid thread priority.<br />
|-<br />
| 0xE201 || 113 || Invalid processor id.<br />
|-<br />
| 0xE401 || 114 || Invalid handle.<br />
|-<br />
| 0xE601 || 115 || Syscall copy from user failed.<br />
|-<br />
| 0xE801 || 116 || Invalid combination<br />
|-<br />
| 0xEA01 || 117 || Time out? When you give 0 handles to svcWaitSynchronizationN.<br />
|-<br />
| 0xEC01 || 118 || Canceled/interrupted [?]<br />
|-<br />
| 0xEE01 || 119 || Exceeding maximum<br />
|-<br />
| 0xF001 || 120 || Invalid enum<br />
|-<br />
| 0xF201 || 121 || No such entry<br />
|-<br />
| 0xF401 || 122 || Irq/DeviceAddressSpace/{...} already registered<br />
|-<br />
| 0xF601 || 123 || Port remote dead<br />
|-<br />
| 0xF801 || 124 || [Usermode] Unhandled interrupt<br />
|-<br />
| 0xFA01 || 125 || Wrong memory permission?<br />
|-<br />
| 0xFC01 || 126 || Reserved value<br />
|-<br />
| 0xFE01 || 127 || Invalid hardware breakpoint<br />
|-<br />
| 0x10001 || 128 || [Usermode] Fatal exception<br />
|-<br />
| 0x10601 || 131 || Port max sessions exceeded<br />
|-<br />
| 0x10801 || 132 || Resource limit exceeded<br />
|-<br />
| 0x41001 || 520 || Process not being debugged<br />
|-<br />
| 0xE02 || 7 || High byte in input u64 is zero.<br />
|-<br />
| 0x7802 || 60 || The specified [[NCA]]-type doesn't exist for this title.<br />
|-<br />
| 0x7D202 || 1001 || Process does not have RomFs <br />
|-<br />
| 0x7D402 || 1002 || Title-id not found / savedata not found.<br />
|-<br />
| 0xFA202 || 2001 || SD card not inserted<br />
|-<br />
| 0x13B002 || 2520 || Gamecard not inserted<br />
|-<br />
| 0x13DA02 || 2541 || Version check failed when mounting gamecard sysupdate partition?<br />
|-<br />
| 0x171402 || 2954 || Invalid gamecard handle.<br />
|-<br />
| 0x196002 || 3248 || Out of memory<br />
|-<br />
| 0x196202 || 3249 || Out of memory<br />
|-<br />
| 0x1A4A02 || 3365 || Out of memory<br />
|-<br />
| 0x235E02 || 4527 || NCA-path used with the wrong titleID.<br />
|-<br />
| 0x250E02 || 4743 || [[NAX0|Corrupted]] NAX0 header.<br />
|-<br />
| 0x251002 || 4744 || Invalid [[NAX0]] magicnum.<br />
|-<br />
| 0x2EE202 || 6001 || Invalid input<br />
|-<br />
| 0x2EE602 || 6003 || Path too long<br />
|-<br />
| 0x2F5A02 || 6061 || Offset outside storage<br />
|-<br />
| 0x313802 || 6300 || Operation not supported<br />
|-<br />
| 0x320002 || 6400 || Permission denied<br />
|-<br />
| 0x326602 || 6451 || Missing titlekey(?) required to mount content<br />
|-<br />
| 0x3EA03 || 501 || Invalid handle<br />
|-<br />
| 0x3EE03 || 503 || Invalid memory mirror<br />
|-<br />
| 0xA05 || 5 || [[Content_Manager_services|NcaID]] not found. Returned when attempting to mount titles which exist that aren't *8XX titles, the same way *8XX titles are mounted.<br />
|-<br />
| 0xE05 || 7 || TitleId not found<br />
|-<br />
| 0x1805 || 12 || Invalid StorageId<br />
|-<br />
| 0xDC05 || 110 || Gamecard not inserted<br />
|-<br />
| 0x17C05 || 190 || Gamecard not initialized<br />
|-<br />
| 0x1F405 || 250 || Sdcard not inserted<br />
|-<br />
| 0x20805 || 260 || Storage not mounted<br />
|-<br />
| 0x408 || 2 || Not initialized.<br />
|-<br />
| 0x608 || 3 || Invalid control StorageID.<br />
|-<br />
| 0x808 || 4 || Storage not found.<br />
|-<br />
| 0xA08 || 5 || Access denied.<br />
|-<br />
| 0xE08 || 7 || Title is not registered.<br />
|-<br />
| 0x409 || 2 || Maximum processes loaded.<br />
|-<br />
| 0x6609 || 51 || Invalid memory state/permission<br />
|-<br />
| 0x6A09 || 53 || Invalid NRR<br />
|-<br />
| 0xA209 || 81 || Unaligned NRR address<br />
|-<br />
| 0xA409 || 82 || Bad NRR size<br />
|-<br />
| 0xAA09 || 85 || Bad NRR address<br />
|-<br />
| 0x1A80A || 212 || Bad magic (expected 'SFCO')<br />
|-<br />
| 0x20B || 1 || Size too big to fit to marshal.<br />
|-<br />
| 0x11A0B || 141 || Went past maximum during marshalling.<br />
|-<br />
| 0x1900B || 200 || Session doesn't support domains.<br />
|-<br />
| 0x25A0B || 301 || Remote process is dead.<br />
|-<br />
| 0x3D60B || 491 || IPC Query 1 failed.<br />
|-<br />
| 0x20F || 1 || Pid not found<br />
|-<br />
| 0x60F || 3 || Process has no pending events<br />
|-<br />
| 0x410 || 2 || Title-id not found<br />
|-<br />
| 0xF010 || 120 || Gamecard sysupdate not required<br />
|-<br />
| 0x1F610 || 251 || Unexpected StorageId<br />
|-<br />
| 0x415 || 2 || Not initialized.<br />
|-<br />
| 0x615 || 3 || Max sessions<br />
|-<br />
| 0xC15 || 6 || Invalid name (all zeroes)<br />
|-<br />
| 0x1015 || 8 || Permission denied<br />
|-<br />
| 0x416 || 2 || Address space is full<br />
|-<br />
| 0x616 || 3 || NRO already loaded<br />
|-<br />
| 0x816 || 4 || Invalid NRO header values<br />
|-<br />
| 0xC16 || 6 || Bad NRR magic<br />
|-<br />
| 0x1016 || 8 || Reached max NRR count<br />
|-<br />
| 0x1216 || 9 || Unable to verify NRO hash or NRR signature<br />
|-<br />
| 0x80216 || 1025 || Address not page-aligned<br />
|-<br />
| 0x80416 || 1026 || Incorrect NRO size<br />
|-<br />
| 0x80816 || 1028 || NRO not loaded<br />
|-<br />
| 0x80A16 || 1029 || NRR not loaded<br />
|-<br />
| 0x80C16 || 1030 || Already initialized<br />
|-<br />
| 0x80E16 || 1031 || Not initialized<br />
|-<br />
| 0x41A || 2 || Argument is invalid<br />
|-<br />
| 0xD01A || 104 || All AES engines busy<br />
|-<br />
| 0xD21A || 105 || Invalid AES engine-id<br />
|-<br />
| 0x272 || 1 || Generic error<br />
|-<br />
| 0xCC74 || 102 || Time not set<br />
|-<br />
| 0x287C || 20 || Argument is NULL<br />
|-<br />
| 0x2C7C || 22 || Argument is invalid<br />
|-<br />
| 0x3C7C || 30 || Bad input buffer size<br />
|-<br />
| 0x407C || 32 || Invalid input buffer<br />
|-<br />
| 0x3C9D || 30 || Address is NULL<br />
|-<br />
| 0x3E9D || 31 || PID is NULL<br />
|-<br />
| 0x549D || 42 || Already bound<br />
|-<br />
| 0xCC9D || 102 || Invalid PID<br />
|-<br />
| 0x3CF089 || 7800 || Unknown/invalid libcurl error.<br />
|-<br />
| 0x3E8289-0x3F4089 || 8001-8096 || libcurl error 1-96. Some of the libcurl errors in the error-table map to the above unknown-libcurl-error however.<br />
|}<br />
<br />
== FS Error Codes ==<br />
<br />
The following are the error codes recognized by nn::fs::detail::LogErrorMessage found in some [[Factory Setup|factory]] titles:<br />
<br />
{| class=wikitable<br />
! Error Code || Description || Message<br />
|-<br />
| 0x7802 || 60 || Error: Specified mount name already exists.<br />
|-<br />
| 0xD401 || 106 || Error: Passed buffer is not usable for fs library.<br />
|-<br />
| 0x7D202 || 1001 || Error: Specified partition is not found.<br />
|-<br />
| 0x7D402 || 1002 || Error: Specified target is not found.<br />
|-<br />
| 0xFA002 - 0x138602 || 2000 - 2499 || Error: Failed to access SD card.<br />
|-<br />
| 0x136802 - 0x176E02 || 2500 - 2999 || Error: Failed to access game card.<br />
|-<br />
| 0x177202 || 3001 || Error: Specified operation is not implemented.<br />
|-<br />
| 0x177A02 || 3005 || Error: Specified value is out of range.<br />
|-<br />
| 0x1B5802 - 0x1F3E02 || 3500 - 3999 || Error: Failed to access MMC.<br />
|-<br />
| 0x1F4202 - 0x219602 || 4001 - 4299 || Error: ROM is corrupted.<br />
|-<br />
| 0x219A02 - 0x232602 || 4301 - 4499 || Error: Save data is corrupted.<br />
|-<br />
| 0x232A02 - 0x23EE02 || 4501 - 4599 || Error: NCA is corrupted.<br />
|-<br />
| 0x23F202 - 0x243E02 || 4601 - 4639 || Error: Integrity verification failed.<br />
|-<br />
| 0x244202 - 0x246602 || 4641 - 4659 || Error: Partition FS is corrupted.<br />
|-<br />
| 0x246A02 - 0x248E02 || 4661 - 4679 || Error: Built-in-storage is corrupted.<br />
|-<br />
| 0x249202 - 0x24B602 || 4681 - 4699 || Error: FAT FS is corrupted.<br />
|-<br />
| 0x24BA02 - 0x24DE02 || 4701 - 4719 || Error: HOST FS is corrupted.<br />
|-<br />
| 0x1F4002 - 0x270E02 || 4000, 4300, 4500, 4600, 4640, 4660, 4680, 4700, 4720-4999 || Error: Data is corrupted.<br />
|-<br />
| 0x271002 - 0x2EDE02 || 5000-5999 || Error: Unexpected failure occurred.<br />
|-<br />
| 0x2EE402 - 0x2F1A02 || 6002-6029 || Error: Invalid path was specified.<br />
|-<br />
| 0x2F5A02 || 6061 || Error: Invalid offset was specified.<br />
|-<br />
| 0x2F5C02 || 6062 || Error: Invalid size was specified.<br />
|-<br />
| 0x2F5E02 || 6063 || Error: Null pointer argument was specified.<br />
|-<br />
| 0x2EE002 || 6000 || Error: Precondition violation.<br />
|-<br />
| 0x2EE202 - 0x306E02 || 6001-6199 || Error: Invalid argument was specified.<br />
|-<br />
| 0x307202 || 6201 || Error: OpenMode_AllowAppend is required for implicit extension of file size by WriteFile().<br />
|-<br />
| 0x307002 - 0x313602 || 6200, 6202 - 6299 || Error: Invalid operation for the open mode.<br />
|-<br />
| 0x313802 - 0x31FE02 || 6300-6399 || Error: Unsupported operation.<br />
|-<br />
| 0x320002 - 0x32C602 || 6400-6499 || Error: Permission denied.<br />
|-<br />
| 0x346402 || 6706 || Error: Enough journal space is not left.<br />
|-<br />
| 0x346A02 || 6709 || Error: The open count of files and directories reached the limitation.<br />
|}<br />
<br />
= Fatal Errors =<br />
{| class=wikitable<br />
! Error || Description<br />
|-<br />
| 2162-0002<br />
| Can be triggered by running [[SVC|svcBreak]]. The svcBreak params have no affect on the value of the thrown error-code.<br />
|-<br />
| 2168-0000<br />
| Userland ARM undefined instruction exception<br />
|-<br />
| 2168-0001<br />
| Userland ARM prefetch-abort due to PC set to non-executable region<br />
|-<br />
| 2168-0002<br />
| Userland ARM data abort. Also caused by abnormal process termination via [[SVC|svcExitProcess]]. Note: directly jumping to nnMain()-retaddr from non-main-thread has the same result.<br />
|-<br />
| 2168-0003<br />
| Userland PC address not aligned to 4 bytes<br />
|}<br />
<br />
= Support Errors =<br />
{| class=wikitable<br />
! Error ! Module || Description || Notes<br />
|-<br />
| <br />
| {web-applets listed above}<br />
| 2750<br />
| MP4 parsing failed.<br />
|}<br />
Normal error-codes displayed by the system also use the same format as fatal-errors.</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=2326
FirmwareNews
2017-09-06T01:34:36Z
<p>Simon66: </p>
<hr />
<div>As of this writing, the latest firmware is ''' 3.0.2'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=2215
FirmwareNews
2017-08-25T03:15:28Z
<p>Simon66: </p>
<hr />
<div>As of this writing, the latest firmware is ''' 3.0.1'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=FirmwareNews&diff=1717
FirmwareNews
2017-07-20T04:51:05Z
<p>Simon66: Protected "FirmwareNews" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<hr />
<div>As of this writing, the latest firmware is ''' 3.0.0'''.</div>
Simon66
https://switchbrew.org/w/index.php?title=News&diff=1716
News
2017-07-20T04:50:40Z
<p>Simon66: Protected "News" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<hr />
<div><noinclude><br />
==Adding an item==<br />
* Log in to the wiki. Editing is disabled if you don't have an account.<br />
* Add the news event to the top of the list, using this format for the date: <tt><nowiki>'''</nowiki>{{#time: d F y}}<nowiki>''' </nowiki></tt>. Please include the application's creator, version number, and a link to a page on 3DBrew about the application. No external links please.<br />
* '''Move the last entry to the [[:News/Archive|news archive]]. There should be no more than 4 entries in the list.'''<br />
<br />
==Archives==<br />
For older news, see the [[:News/Archive|news archive]].<br />
<br />
=== News ===<br />
<!-- Add news below --></noinclude><br />
*'''19 June 17''' Nintendo released system update [[3.0.0]].<br />
*'''15 May 17''' Nintendo released system update [[2.3.0]].<br />
*'''17 April 17''' Nintendo released system update [[2.2.0]].<br />
*'''27 March 17''' Nintendo released system update [[2.1.0]].</div>
Simon66
https://switchbrew.org/w/index.php?title=News&diff=1715
News
2017-07-20T04:47:57Z
<p>Simon66: Reverted edits by Vengeance (talk) to last revision by SciresM</p>
<hr />
<div><noinclude><br />
==Adding an item==<br />
* Log in to the wiki. Editing is disabled if you don't have an account.<br />
* Add the news event to the top of the list, using this format for the date: <tt><nowiki>'''</nowiki>{{#time: d F y}}<nowiki>''' </nowiki></tt>. Please include the application's creator, version number, and a link to a page on 3DBrew about the application. No external links please.<br />
* '''Move the last entry to the [[:News/Archive|news archive]]. There should be no more than 4 entries in the list.'''<br />
<br />
==Archives==<br />
For older news, see the [[:News/Archive|news archive]].<br />
<br />
=== News ===<br />
<!-- Add news below --></noinclude><br />
*'''19 June 17''' Nintendo released system update [[3.0.0]].<br />
*'''15 May 17''' Nintendo released system update [[2.3.0]].<br />
*'''17 April 17''' Nintendo released system update [[2.2.0]].<br />
*'''27 March 17''' Nintendo released system update [[2.1.0]].</div>
Simon66
https://switchbrew.org/w/index.php?title=System_Versions&diff=472
System Versions
2017-05-01T05:22:18Z
<p>Simon66: Reverted edits by Simon66 (talk) to last revision by Treyplayx3</p>
<hr />
<div>{| class="wikitable"<br />
|-<br />
! System version <br />
! Release date<br />
|-<br />
| [[1.0.0]]<br />
| Unknown<br />
|-<br />
| [[2.0.0]]<br />
| March 2, 2017<br />
|-<br />
| [[2.1.0]]<br />
| March 27, 2017<br />
|-<br />
| [[2.2.0]]<br />
| April 17, 2017<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=Boot_Modes&diff=471
Boot Modes
2017-05-01T05:21:57Z
<p>Simon66: Reverted edits by Treyplayx3 (talk) to last revision by LameNobody</p>
<hr />
<div>The recovery mode (also known as Maintenance Mode on version 1.0.0) can be accessed when turning on the Nintendo Switch while holding + & - (volume buttons). This menu is made to update your Nintendo Switch through internet, if an update previously failed. It also includes the ability to format/initialize the console with or without keeping user info, screenshots, and saves<br />
<br />
<br />
However it is possible to use this menu to delete the nagging update message if your console downloaded an update. It is believed that this menu simply erases all update data, as it should normally be accessed when the update files are corrupted.<br />
<br />
<br />
'''Other Notes:'''<br />
<br />
Maintenance Mode (the 1.0.0 menu) does not have the system update option. However, downloaded update data is still deleted when this menu is accessed.</div>
Simon66
https://switchbrew.org/w/index.php?title=System_Versions&diff=470
System Versions
2017-05-01T05:21:22Z
<p>Simon66: Reverted edits by Treyplayx3 (talk) to last revision by Yellows8</p>
<hr />
<div>{| class="wikitable"<br />
|-<br />
! System version <br />
! Release date<br />
|-<br />
| [[1.0.0]]<br />
| <br />
|-<br />
| [[2.0.0]]<br />
| March 2, 2017<br />
|-<br />
| [[2.1.0]]<br />
| March 27, 2017<br />
|-<br />
| [[2.2.0]]<br />
| April 17, 2017<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=Hardware&diff=170
Hardware
2017-03-14T03:52:15Z
<p>Simon66: </p>
<hr />
<div>== Specifications ==<br />
{| class="wikitable"<br />
! Type !! <br />
|-<br />
| SoC || NVidia ODNX02-A2<br />
|-<br />
| Screen || [http://www.nintendo.com/switch/features/tech-specs/#switch-section 6.2-inch, multi-touch capacitive LCD screen]<br />
|-<br />
| Storage || Samsung KLMBG2JENB-B041 32 GB eMMC <br/> or <br/> Toshiba THGBMHG8C2LBAIL 32 GB eMMC<br />
|-<br />
| Wifi/BT || Broadcom BCM4356XKUBG<br />
|-<br />
| PMIC || Maxim Integrated MAX77620AEWJ+T <br />
|-<br />
| Audio || Realtek ALC5639<br />
|-<br />
|}<br />
<br />
{{:EMMC_pinout}}<br />
<br />
https://www.sosav.fr/guides/consoles/nintendo/nintendo-salon/nintendo-switch/demontage-complet/<br />
<br />
https://www.ifixit.com/Teardown/Nintendo+Switch+Teardown/78263</div>
Simon66
https://switchbrew.org/w/index.php?title=EMMC_pinout&diff=169
EMMC pinout
2017-03-14T03:50:46Z
<p>Simon66: </p>
<hr />
<div>=== Front ===<br />
[[File:HAC-EMMC-Side-B.png|600px]]<br />
<br />
=== Back ===<br />
[[File:HAC-EMMC-Side-A.png|600px]]<br />
<br />
Supply power via the VCC 3.3V and 1.8V pins, and solder the CLK, CMD, and DAT0 pins to an SD Card reader in order to extract the data off the eMMC chip.</div>
Simon66
https://switchbrew.org/w/index.php?title=Switch_Userland_Flaws&diff=163
Switch Userland Flaws
2017-03-13T23:43:15Z
<p>Simon66: https://twitter.com/qlutoo/status/838095607390679040</p>
<hr />
<div>(fill this)<br />
= List of Switch Userland Flaws =<br />
(fill this too)<br />
== Browser userspace == <br />
===WebKit===<br />
{| class="wikitable" border="1"<br />
! Summary<br />
! Description<br />
! Fixed with software update<br />
! Newest software update this flaw was checked for<br />
! Timeframe this was discovered<br />
! Discovered by<br />
|-<br />
| CVE-2016-4657 <br />
| A Proof-of-concept webkit exploit using switch web browser : https://github.com/LiveOverflow/lo_nintendoswitch/blob/master/poc1.html<br />
| None<br />
| 2.0.0<br />
| 04/03/17<br />
| ???<br />
|-<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=Joy-Con&diff=162
Joy-Con
2017-03-13T19:21:27Z
<p>Simon66: No need to collapse the table, we want to display everything so that someone was easily search without having to expand the table</p>
<hr />
<div>== Specifications ==<br />
{| class="wikitable"<br />
! Type !! <br />
|-<br />
| Technology || Bluetooth<br />
|-<br />
| Interface || HID<br />
|-<br />
<br />
|}<br />
<br />
<br />
== Left & Right Separate Joy-con ==<br />
<br />
When paired directly to a computer over bluetooth, the joy-con both provide identical HID input report descriptor. This does not appear to include motion controls, IR data, or NFC. They both behave as detached single-player controllers.<br />
<br />
HID Input Report Descriptor (Hexadecimal):<br />
<pre><br />
00000000: 05010905 A1010601 FF852109 21750895 ....¡...ÿ…!.!u.•<br />
00000010: 30810285 30093075 08953081 02853109 0..…0.0u.•0..…1.<br />
00000020: 31750896 69018102 85320932 75089669 1u.–i...…2.2u.–i<br />
00000030: 01810285 33093375 08966901 8102853F ...…3.3u.–i...…?<br />
00000040: 05091901 29101500 25017501 95108102 ....)...%.u.•...<br />
00000050: 05010939 15002507 75049501 81420509 ...9..%.u.•..B..<br />
00000060: 75049501 81010501 09300931 09330934 u.•......0.1.3.4<br />
00000070: 16000027 FFFF0000 75109504 81020601 ...'ÿÿ..u.•.....<br />
00000080: FF850109 01750895 30910285 10091075 ÿ…...u.•0‘.…...u<br />
00000090: 08953091 02851109 11750895 30910285 .•0‘.…...u.•0‘.…<br />
000000A0: 12091275 08953091 02C0 ...u.•0‘.À<br />
</pre><br />
<br />
{| class="wikitable"<br />
! Parsed Bytes || Description<br />
|-<br />
|0x05, 0x01, || Usage Page (Generic Desktop Ctrls)<br />
|-<br />
|0x09, 0x05, || Usage (Game Pad)<br />
|-<br />
|0xA1, 0x01, || Collection (Application)<br />
|-<br />
|0x06, 0x01, 0xFF, || Usage Page (Vendor Defined 0xFF01)<br />
|-<br />
|0x85, 0x21, || Report ID (33)<br />
|-<br />
|0x09, 0x21, || Usage (0x21)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x85, 0x30, || Report ID (48)<br />
|-<br />
|0x09, 0x30, || Usage (0x30)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x85, 0x31, || Report ID (49)<br />
|-<br />
|0x09, 0x31, || Usage (0x31)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x96, 0x69, 0x01, || Report Count (361)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x85, 0x32, || Report ID (50)<br />
|-<br />
|0x09, 0x32, || Usage (0x32)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x96, 0x69, 0x01, || Report Count (361)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x85, 0x33, || Report ID (51)<br />
|-<br />
|0x09, 0x33, || Usage (0x33)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x96, 0x69, 0x01, || Report Count (361)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x85, 0x3F, || Report ID (63)<br />
|-<br />
|0x05, 0x09, || Usage Page (Button)<br />
|-<br />
|0x19, 0x01, || Usage Minimum (0x01)<br />
|-<br />
|0x29, 0x10, || Usage Maximum (0x10)<br />
|-<br />
|0x15, 0x00, || Logical Minimum (0)<br />
|-<br />
|0x25, 0x01, || Logical Maximum (1)<br />
|-<br />
|0x75, 0x01, || Report Size (1)<br />
|-<br />
|0x95, 0x10, || Report Count (16)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x05, 0x01, || Usage Page (Generic Desktop Ctrls)<br />
|-<br />
|0x09, 0x39, || Usage (Hat switch)<br />
|-<br />
|0x15, 0x00, || Logical Minimum (0)<br />
|-<br />
|0x25, 0x07, || Logical Maximum (7)<br />
|-<br />
|0x75, 0x04, || Report Size (4)<br />
|-<br />
|0x95, 0x01, || Report Count (1)<br />
|-<br />
|0x81, 0x42, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,Null State)<br />
|-<br />
|0x05, 0x09, || Usage Page (Button)<br />
|-<br />
|0x75, 0x04, || Report Size (4)<br />
|-<br />
|0x95, 0x01, || Report Count (1)<br />
|-<br />
|0x81, 0x01, || Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x05, 0x01, || Usage Page (Generic Desktop Ctrls)<br />
|-<br />
|0x09, 0x30, || Usage (X)<br />
|-<br />
|0x09, 0x31, || Usage (Y)<br />
|-<br />
|0x09, 0x33, || Usage (Rx)<br />
|-<br />
|0x09, 0x34, || Usage (Ry)<br />
|-<br />
|0x16, 0x00, 0x00, || Logical Minimum (0)<br />
|-<br />
|0x27, 0xFF, 0xFF, 0x00, 0x00, || Logical Maximum (65534)<br />
|-<br />
|0x75, 0x10, || Report Size (16)<br />
|-<br />
|0x95, 0x04, || Report Count (4)<br />
|-<br />
|0x81, 0x02, || Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)<br />
|-<br />
|0x06, 0x01, 0xFF, || Usage Page (Vendor Defined 0xFF01)<br />
|-<br />
|0x85, 0x01, || Report ID (1)<br />
|-<br />
|0x09, 0x01, || Usage (0x01)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x91, 0x02, || Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)<br />
|-<br />
|0x85, 0x10, || Report ID (16)<br />
|-<br />
|0x09, 0x10, || Usage (0x10)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x91, 0x02, || Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)<br />
|-<br />
|0x85, 0x11, || Report ID (17)<br />
|-<br />
|0x09, 0x11, || Usage (0x11)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x91, 0x02, || Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)<br />
|-<br />
|0x85, 0x12, || Report ID (18)<br />
|-<br />
|0x09, 0x12, || Usage (0x12)<br />
|-<br />
|0x75, 0x08, || Report Size (8)<br />
|-<br />
|0x95, 0x30, || Report Count (48)<br />
|-<br />
|0x91, 0x02, || Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)<br />
|-<br />
|0xC0, || End Collection<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=Switch_Userland_Flaws&diff=161
Switch Userland Flaws
2017-03-13T18:57:49Z
<p>Simon66: Not that the exact date matters but it publicly was talked about on March 10th. It was actually discovered way before that</p>
<hr />
<div>(fill this)<br />
= List of Switch Userland Flaws =<br />
(fill this too)<br />
== Browser userspace == <br />
===WebKit===<br />
{| class="wikitable" border="1"<br />
! Summary<br />
! Description<br />
! Fixed with software update<br />
! Newest software update this flaw was checked for<br />
! Timeframe this was discovered<br />
! Discovered by<br />
|-<br />
| CVE-2016-4657 <br />
| A Proof-of-concept webkit exploit using switch web browser : https://github.com/LiveOverflow/lo_nintendoswitch/blob/master/poc1.html<br />
| None<br />
| 2.0.0<br />
| 10/03/17<br />
| ???<br />
|-<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=2.0.0&diff=151
2.0.0
2017-03-10T04:20:53Z
<p>Simon66: Reverted edits by Smoov22 (talk) to last revision by Smartperson</p>
<hr />
<div>The 2.0 release added the eShop functionality, the ability to add friends via Friend Codes, and to post screenshots to Facebook and Twitter.<br />
<br />
This is the [http://en-americas-support.nintendo.com/app/answers/detail/a_id/22525/p/897 official changelog] from Nintendo regarding this update:<br />
<br />
'''Improvements Included in Version 2.0.0'''<br />
<br />
'''The following network features are now available'''<br />
* Nintendo Account required. Some features may not be available in all countries/regions.<br />
* Playing online<br />
**Online multiplayer available for free until the paid online service launches in fall 2017. Not available in all countries.<br />
*Adding friends<br />
**Friends can be added from My Page, head to the HOME Menu and select your icon on the upper left.<br />
*Sharing Album screenshots to Facebook and Twitter<br />
*Browsing and purchasing content on Nintendo eShop<br />
*Receiving News relating to games, Nintendo eShop discounts, and promotions<br />
*Earning My Nintendo points for game card (retail version)<br />
<br />
'''Added the following system functionality'''<br />
*Update game software<br />
*Turn on the TV automatically when placing the Nintendo Switch console in the Nintendo Switch dock.<br />
**HDMI settings must also be enabled on your TV. Some TV models may be unable to use this feature. To turn on this feature for the Nintendo Switch console, head to System Settings > TV Settings > Match TV Power State<br />
*Display the battery percentage on the HOME Menu<br />
**To turn this ON/OFF, head to System Settings > System > Console Battery (%)<br />
*Format the microSD card<br />
**To format, head to System Settings > System > Initialize > Format microSD Card</div>
Simon66
https://switchbrew.org/w/index.php?title=Hardware&diff=130
Hardware
2017-03-04T06:25:10Z
<p>Simon66: /* Specifications */</p>
<hr />
<div>== Specifications ==<br />
{| class="wikitable"<br />
! Type !! <br />
|-<br />
| SoC || NVidia ODNX02-A2<br />
|-<br />
| Screen || [http://www.nintendo.com/switch/features/tech-specs/#switch-section 6.2-inch, multi-touch capacitive LCD screen]<br />
|-<br />
| Storage || Samsung KLMBG2JENB-B041 32 GB eMMC <br/> or <br/> Toshiba THGBMHG8C2LBAIL 32 GB eMMC<br />
|-<br />
| Wifi/BT || Broadcom BCM4356XKUBG<br />
|-<br />
|}<br />
<br />
https://www.sosav.fr/guides/consoles/nintendo/nintendo-salon/nintendo-switch/demontage-complet/<br />
<br />
https://www.ifixit.com/Teardown/Nintendo+Switch+Teardown/78263</div>
Simon66
https://switchbrew.org/w/index.php?title=Hardware&diff=129
Hardware
2017-03-04T06:24:36Z
<p>Simon66: /* Specifications */</p>
<hr />
<div>== Specifications ==<br />
{| class="wikitable"<br />
! Type !! <br />
|-<br />
| SoC || NVidia ODNX02-A2<br />
|-<br />
| Screen || [http://www.nintendo.com/switch/features/tech-specs/#switch-section 6.2-inch, multi-touch capacitive LCD screen]<br />
|-<br />
| Storage || Samsung KLMBG2JENB-B041 32 GB eMMC <br/> or <br/> Toshiba THGBMHG8C2LBAIL 32 GB eMMC<br />
|-<br />
| Wifi/BT || Broadcom BCM4356XKUBG<br />
|-<br />
|}<br />
<br />
https://www.sosav.fr/guides/consoles/nintendo/nintendo-salon/nintendo-switch/demontage-complet/</div>
Simon66
https://switchbrew.org/w/index.php?title=NSBrew:About&diff=127
NSBrew:About
2017-03-04T03:59:43Z
<p>Simon66: </p>
<hr />
<div>SwitchBrew is a wiki for the discussion and research of homebrew for the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div>
Simon66
https://switchbrew.org/w/index.php?title=Hardware&diff=126
Hardware
2017-03-04T03:58:12Z
<p>Simon66: Created page with "== Specifications == {| class="wikitable" ! Type !! |- | SoC || NVidia (ODNX02-A2)?? |- | Screen || [http://www.nintendo.com/switch/features/tech-specs/#switch-section 6..."</p>
<hr />
<div>== Specifications ==<br />
{| class="wikitable"<br />
! Type !! <br />
|-<br />
| SoC || NVidia (ODNX02-A2)??<br />
|-<br />
| Screen || [http://www.nintendo.com/switch/features/tech-specs/#switch-section 6.2-inch, multi-touch capacitive LCD screen]<br />
|-<br />
| Storage || Samsung KLMBG2JENB-B041 32GB <br />
|-<br />
| Wifi || ??<br />
|-<br />
|}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page&diff=125
Main Page
2017-03-04T03:40:40Z
<p>Simon66: </p>
<hr />
<div>__NOTOC__<br />
{{:Main Page/Header}}<br />
{{:Main Page/Events}}<br />
{{:Main Page/Navigation}}<br />
{{:Main Page/OtherSites}}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Navigation&diff=124
Main Page/Navigation
2017-03-04T03:38:55Z
<p>Simon66: </p>
<hr />
<div>{{Main page box|Navigation|:Navigation}}<br />
<div style="margin: -.3em -1em -1em -1em;"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''General'''<br />
! width="33%" | '''Homebrew'''<br />
! width="33%" | '''Switch hardware'''<br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
*[[Hardware|Overview]]<br />
|}<br />
</div><br />
<br />
<div style="margin: -.3em -1em -1em -1em; margin-top: +1em"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''Switch Operating System''' <br />
! width="33%" | '''Switch Software Stack'''<br />
! width="33%" | '''Switch Content'''<br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
|}<br />
</div><br />
{{box-footer-empty}}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Navigation&diff=123
Main Page/Navigation
2017-03-04T03:37:32Z
<p>Simon66: Blanked the page</p>
<hr />
<div></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Navigation&diff=122
Main Page/Navigation
2017-03-04T03:37:07Z
<p>Simon66: </p>
<hr />
<div>{{Main page box|Navigation|:Navigation}}<br />
<div style="margin: -.3em -1em -1em -1em;"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''General''' <!-- Stuff not directly related to reverse-engineering, system documentation, and homebrew --><br />
! width="33%" | '''Homebrew''' <!-- Homebrew and exploitation --><br />
! width="33%" | '''Switch hardware''' <!-- 3DS Hardware and its interfaces --><br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
*[[Hardware|Overview]]<br />
|}<br />
</div><br />
<br />
<div style="margin: -.3em -1em -1em -1em; margin-top: +1em"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''Switch Operating System''' <br />
! width="33%" | '''Switch Software Stack'''<br />
! width="33%" | '''Switch Content'''<br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
|}<br />
</div><br />
{{box-footer-empty}}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page&diff=119
Main Page
2017-03-04T03:32:42Z
<p>Simon66: </p>
<hr />
<div>{{:Main Page/Header}}<br />
{{:Main Page/Events}}<br />
{{:Main Page/Navigation}}<br />
{{:Main Page/OtherSites}}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Navigation&diff=118
Main Page/Navigation
2017-03-04T03:29:52Z
<p>Simon66: Created page with "{{Main page box|Navigation|Main Page/Navigation}} <div style="margin: -.3em -1em -1em -1em;"> {| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" sty..."</p>
<hr />
<div>{{Main page box|Navigation|Main Page/Navigation}}<br />
<div style="margin: -.3em -1em -1em -1em;"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''General''' <!-- Stuff not directly related to reverse-engineering, system documentation, and homebrew --><br />
! width="33%" | '''Homebrew''' <!-- Homebrew and exploitation --><br />
! width="33%" | '''Switch hardware''' <!-- 3DS Hardware and its interfaces --><br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
*[[Hardware|Overview]]<br />
|}<br />
</div><br />
<br />
<div style="margin: -.3em -1em -1em -1em; margin-top: +1em"><br />
{| width="100%" bgcolor="#fff" border="0" cellpadding="2px" cellspacing="2px" style="margin:auto;"<br />
|- align="center" bgcolor="#e7eef6"<br />
! width="33%" | '''Switch Operating System''' <br />
! width="33%" | '''Switch Software Stack'''<br />
! width="33%" | '''Switch Content'''<br />
|- valign="top" style="background: #F5FAFF;"<br />
| <br />
|<br />
|<br />
|}<br />
</div><br />
{{box-footer-empty}}</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=100
Main Page/Header
2017-03-02T15:28:58Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|SwitchBrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. Join our development conversations on the EFnet IRC channel #switchdev. </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=99
Main Page/Header
2017-03-02T15:25:50Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|Switchbrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. Join our development conversations on the EFnet IRC channel #switchdev. </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page&diff=98
Main Page
2017-03-01T20:13:08Z
<p>Simon66: Protected "Main Page" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<hr />
<div>{{:Main Page/Header}}<br />
{{:Main Page/Events}}<br />
{{:Main Page/OtherSites}}</div>
Simon66
https://switchbrew.org/w/index.php?title=News&diff=97
News
2017-03-01T20:12:22Z
<p>Simon66: </p>
<hr />
<div><noinclude><br />
=== News ===<br />
<!-- Add news below --></noinclude><br />
<noinclude> *'''3 March 2017''' Nintendo Switch global relase.</noinclude></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=30
Main Page/Header
2017-02-06T21:13:41Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|NSBrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. Join our development conversations on the EFnet IRC channel #switchdev. </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=26
Main Page/Header
2016-11-05T00:15:09Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|NSBrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. oin our development conversations on the EFnet IRC channel #switchdev. </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66
https://switchbrew.org/w/index.php?title=NSBrew:About&diff=25
NSBrew:About
2016-10-23T22:46:38Z
<p>Simon66: </p>
<hr />
<div>NSBrew is a wiki for the discussion and research of homebrew for the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=24
Main Page/Header
2016-10-23T22:37:52Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|NSBrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [https://en.wikipedia.org/wiki/Nintendo_Switch Nintendo Switch].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. We don't we have EFnet IRC channel yet. We will one day :) </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66
https://switchbrew.org/w/index.php?title=Main_Page/Header&diff=23
Main Page/Header
2016-10-23T22:16:34Z
<p>Simon66: </p>
<hr />
<div><div style="background-color:#e7eef6; border: 1px solid #ccc; color:#000; margin-top: 15px; margin-bottom: 10px; padding: 8px; text-align:center;"><br />
<div style="font-size: 162%; border: none; margin: 0; padding:.1em;">Welcome to [[NSBrew:About|NSBrew]],</div><br />
<div style="font-size: 95%">a wiki dedicated to homebrew on the [[Nintendo Switch]].</div><br />
<div style="font-size:85%;">We have [[Special:Statistics|{{NUMBEROFARTICLES}}]] articles. We don't we have EFnet IRC channel yet. We will one day :) </div><br />
<div style="font-size:85%;">Please keep in mind that this site is still under construction. Feel free to contribute :)</div><br />
</div></div>
Simon66