XCI: Difference between revisions

No edit summary
mNo edit summary
 
(7 intermediate revisions by one other user not shown)
Line 17: Line 17:
|-
|-
| 0x1200
| 0x1200
| 0x6E00
| 0x200
| ReservedArea
| [11.0.0+] [[#NewCardHeader]]
|-
| 0x1400
| 0x400
| [11.0.0+] [[#NewCardHeaderCertArea]]
|-
| 0x1800
| 0x100
| [11.0.0+] NewCardHeaderCertAreaModulus
|-
| 0x1900
| 0x6700
| Reserved
|-
|-
| 0x8000
| 0x8000
Line 76: Line 88:
| 0x8
| 0x8
| 0x8
| 0x8
| Empty
| Reserved
|-
|-
| 0x10
| 0x10
Line 130: Line 142:
| 0x100
| 0x100
| 0x4
| 0x4
| MagicCode ("HEAD")
| Magic ("HEAD")
|-
|-
| 0x104
| 0x104
Line 150: Line 162:
| 0x10E
| 0x10E
| 0x1
| 0x1
| CardHeaderVersion
| [[#Version]]
|-
|-
| 0x10F
| 0x10F
Line 190: Line 202:
| 0x180
| 0x180
| 0x4
| 0x4
| SelSec (0x01 = T1, 0x02 = T2)
| [[#SelSec]]
|-
|-
| 0x184
| 0x184
Line 206: Line 218:
| 0x190
| 0x190
| 0x70
| 0x70
| [[#CardInfo]]
| [[#CardHeaderEncryptedData]]
|}
 
=== RomSize ===
[[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardSize|GameCardSize]].
 
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0xFA
| 1GB
|-
| 0xF8
| 2GB
|-
| 0xF0
| 4GB
|-
| 0xE0
| 8GB
|-
| 0xE1
| 16GB
|-
| 0xE2
| 32GB
|}
 
=== Version ===
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0
| Default
|-
| 1
|
|-
| 2
|
|-
| 3
| [20.0.0+] T2Supported
|}
 
=== Flags ===
[[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardAttribute|GameCardAttribute]].
 
{| class="wikitable" border="1"
|-
! Bits
! Description
|-
| 0
| AutoBoot
|-
| 1
| HistoryErase
|-
| 2
| [4.0.0+] RepairTool
|-
| 3
| [9.0.0+] DifferentRegionCupToTerraDevice
|-
| 4
| [9.0.0+] DifferentRegionCupToGlobalDevice
|-
| 7
| [11.0.0+] CardHeaderSignKey
|}
 
=== SelSec ===
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 1
| T1
|-
| 2
| T2
|}
|}


=== CardInfo ===
=== CardHeaderEncryptedData ===
This region is stored encrypted (AES-128-CBC).
This region is stored encrypted (AES-128-CBC).


Line 256: Line 354:
| 0x25
| 0x25
| 0x3
| 0x3
| Empty
| Reserved
|-
|-
| 0x28
| 0x28
Line 268: Line 366:
| 0x38
| 0x38
| 0x38
| 0x38
| Empty
| Reserved
|}
|}


Line 301: Line 399:
! Value
! Value
! Description
! Description
|-
| 0x00A10011
| 25MHz
|-
|-
| 0x00A10010
| 0x00A10010
| 50MHz access
| 50MHz
|-
| 0x00A10011
| 25MHz access
|}
|}


Line 322: Line 420:
|}
|}


=== RomSize ===
== NewCardHeader ==
[[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardSize|GameCardSize]].
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0
| 0x100
| RSA-2048 PKCS #1 signature over the header (data from 0x100 to 0x200)
|-
| 0x100
| 0x4
| Magic ("HEAD")
|-
| 0x104
| 0x4
| RomAreaStartPageAddress (in Gamecard page units, which are 0x200 bytes)
|-
| 0x108
| 0x4
| BackupAreaStartPageAddress (always 0xFFFFFFFF)
|-
| 0x10C
| 0x1
| TitleKeyDecIndex (high nibble) and KekIndex (low nibble)
|-
| 0x10D
| 0x1
| [[#RomSize]]
|-
| 0x10E
| 0x1
| [[#Version]]
|-
| 0x10F
| 0x1
| [[#Flags]]
|-
| 0x110
| 0x8
| PackageId (used for challenge–response authentication)
|-
| 0x118
| 0x4
| ValidDataEndAddress (in Gamecard page units, which are 0x200 bytes)
|-
| 0x11C
| 0x1
| [20.0.0+] CardHeaderSignKeyIndex ([1.0.0-19.0.1] Reserved)
|-
| 0x11D
| 0x1
| [18.0.0+] [[#Flags2]] ([1.0.0-17.0.1] Reserved)
|-
| 0x11E
| 0x2
| [19.0.0+] [[#NumberOfApplicationIds]] ([1.0.0-18.1.0] Reserved)
|-
| 0x120
| 0x10
| Iv (reversed)
|-
| 0x130
| 0x8
| PartitionFsHeaderAddress
|-
| 0x138
| 0x8
| PartitionFsHeaderSize
|-
| 0x140
| 0x20
| PartitionFsHeaderHash (SHA-256 hash of the [[#PartitionFsHeader]])
|-
| 0x160
| 0x20
| InitialDataHash (SHA-256 hash of the [[#InitialData]])
|-
| 0x180
| 0x4
| [[#SelSec]]
|-
| 0x184
| 0x4
| SelT1Key (always 2)
|-
| 0x188
| 0x4
| SelKey (always 0)
|-
| 0x18C
| 0x4
| LimArea (in Gamecard page units, which are 0x200 bytes)
|-
| 0x190
| 0x70
| [[#NewCardHeaderEncryptedData]]
|}
 
=== Flags2 ===
[[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardAttribute2|GameCardAttribute2]].
 
=== NumberOfApplicationIds ===
This is the number of entries in the ApplicationIdList located right before ValidDataEndAddress.
 
=== NewCardHeaderEncryptedData ===
This region is stored encrypted (AES-128-CBC).


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Offset
! Size
! Description
! Description
|-
|-
| 0xFA
| 0x0
| 1GB
| 0x8
| [[#FwVersion]]
|-
| 0x8
| 0x4
| [[#AccCtrl1]]
|-
| 0xC
| 0x4
| Wait1TimeRead (always 0x1388)
|-
| 0x10
| 0x4
| Wait2TimeRead (always 0)
|-
| 0x14
| 0x4
| Wait1TimeWrite (always 0)
|-
| 0x18
| 0x4
| Wait2TimeWrite (always 0)
|-
| 0x1C
| 0x4
| FwMode (the current SdkAddonVersion)
|-
| 0x20
| 0x4
| UppVersion
|-
| 0x24
| 0x1
| [[#CompatibilityType]]
|-
| 0x25
| 0x3
| Reserved
|-
|-
| 0xF8
| 0x28
| 2GB
| 0x8
| UppHash (SHA-256 hash of the [[#UpdatePartition]])
|-
|-
| 0xF0
| 0x30
| 4GB
| 0x8
| UppId (always 0x0100000000000816)
|-
|-
| 0xE0
| 0x38
| 8GB
| 0x8
| Reserved
|-
|-
| 0xE1
| 0x40
| 16GB
| 0x20
| RelatedCardHeaderHash (SHA-256 hash of [[#CardHeader]])
|-
|-
| 0xE2
| 0x60
| 32GB
| 0x10
| Reserved
|}
|}


=== Flags ===
== NewCardHeaderCertArea ==
[[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardAttribute|GameCardAttribute]].
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Bits
! Offset
! Size
! Description
! Description
|-
|-
| 0
| 0x0
| AutoBoot
| 0x100
| RSA-2048 PKCS #1 signature over the data from 0x100 to 0x400
|-
| 0x100
| 0x4
| Magic
|-
| 0x104
| 0x4
| Version
|-
| 0x108
| 0x8
|
|-
| 0x110
| 0x1
| CardHeaderSignKeyIndex
|-
|-
| 1
| 0x111
| HistoryErase
| 0x1F
| Reserved
|-
|-
| 2
| 0x130
| [4.0.0+] RepairTool
| 0x100
| Modulus
|-
|-
| 3
| 0x230
| [9.0.0+] DifferentRegionCupToTerraDevice
| 0x3
| PublicExponent
|-
|-
| 4
| 0x233
| [9.0.0+] DifferentRegionCupToGlobalDevice
| 0x1CD
| Reserved
|}
|}


Line 390: Line 657:
| 0x100
| 0x100
| 0x4
| 0x4
| MagicCode ("CERT")
| Magic ("CERT")
|-
|-
| 0x104
| 0x104
Line 406: Line 673:
| 0x110
| 0x110
| 0x10
| 0x10
| DeviceId
| T1CardDeviceId
|-
|-
| 0x120
| 0x120
Line 413: Line 680:
|-
|-
| 0x130
| 0x130
| 0xD0
| 0x10
| Data (encrypted)
| HwKey (encrypted)
|-
| 0x140
| 0xC0
| Reserved (encrypted)
|-
|-
| 0x200
| 0x200
Line 507: Line 778:
| 0x0
| 0x0
| 0x4
| 0x4
| MagicCode ("HFS0")
| Magic ("HFS0")
|-
|-
| 0x4
| 0x4