Difference between revisions of "Configuration Memory"

From 3dbrew
Jump to navigation Jump to search
(Hardware info)
 
(62 intermediate revisions by 14 users not shown)
Line 33: Line 33:
 
| 4
 
| 4
 
|-
 
|-
| UNITINFO
+
| ENVINFO
 
| 0x1FF80014
 
| 0x1FF80014
 
| 1
 
| 1
 
|-
 
|-
| ?
+
| UNITINFO
 
| 0x1FF80015
 
| 0x1FF80015
 
| 1
 
| 1
 
|-
 
|-
| ?
+
| PREV_FIRM
 
| 0x1FF80016
 
| 0x1FF80016
 
| 1
 
| 1
Line 47: Line 47:
 
| KERNEL_CTRSDKVERSION
 
| KERNEL_CTRSDKVERSION
 
| 0x1FF80018
 
| 0x1FF80018
 +
| 4
 +
|-
 +
| FIRMLAUNCHFLAGS
 +
| 0x1FF80020
 
| 4
 
| 4
 
|-
 
|-
Line 57: Line 61:
 
| 4
 
| 4
 
|-
 
|-
| ?
+
| SYSMEMALLOC
 
| 0x1FF80044
 
| 0x1FF80044
 
| 4
 
| 4
 
|-
 
|-
| ?
+
| BASEMEMALLOC
 
| 0x1FF80048
 
| 0x1FF80048
 
| 4
 
| 4
Line 90: Line 94:
 
|}
 
|}
  
This memory page is [[Memory_layout|read-only]] for ARM11 processes.
+
This memory page is mapped as "shared device" (it is thus uncached) and [[Memory_layout|read-only]] for ARM11 processes. This memory and the kernel code for it only exists under NATIVE_FIRM/SAFE_MODE_FIRM.
 +
 
 +
The FIRM_* fields are by default identical to the KERNEL_* fields. However, the FIRM_* fields can be overridden via FIRM-launch parameters, see [[FIRM|here]].
 +
 
 +
Besides mem-region related fields, the data written here by the old 3DS/new 3DS kernels is identical.
  
 
= Shared Memory Page For ARM11 Processes =
 
= Shared Memory Page For ARM11 Processes =
Line 97: Line 105:
 
!  PROCESS VIRTUAL ADDRESS
 
!  PROCESS VIRTUAL ADDRESS
 
!  WIDTH
 
!  WIDTH
 +
|-
 +
| bit0 selects DATETIME_0 or DATETIME_1.
 +
| 0x1FF81000
 +
| 4
 +
|-
 +
| RUNNING_HW (1=product, 2=devboard, 3=debugger, 4=capture, 5=?)
 +
| 0x1FF81004
 +
| 1
 +
|-
 +
| MCU_HW_INFO
 +
| 0x1FF81005
 +
| 1
 +
|-
 +
| DATETIME_0 {(u64)MillisecondsSinceFirstJan1900,(u64)SystemTickLastTimeThisWasUpdated,(u32)unk(set to 0xFFB0FF0 by PTM),(u32)Set to 0 by PTM,(u32)Set to 0 by PTM,(u32)set to 0 by PTM}
 +
| 0x1FF81020
 +
| 32
 +
|-
 +
| DATETIME_1
 +
| 0x1FF81040
 +
| 32
 
|-
 
|-
 
| WIFI_MACADDR
 
| WIFI_MACADDR
 
| 0x1FF81060
 
| 0x1FF81060
 
| 6
 
| 6
 +
|-
 +
| WIFI_LINKLEVEL Ranges from 0-3; 0 stands for no or a poor network connection; 3 stands for a good connection. This corresponds with the number of wifi bars displayed by [[Home Menu]].
 +
| 0x1FF81066
 +
| 1
 +
|-
 +
| NETWORK_STATE The network state displayed by [[Home Menu]]. 2: Internet, 3/4/6: Local, 7: Disabled, Everything else: Enabled
 +
| 0x1FF81067
 +
| 1
 
|-
 
|-
 
| 3D_SLIDERSTATE
 
| 3D_SLIDERSTATE
Line 108: Line 144:
 
| 3D_LEDSTATE
 
| 3D_LEDSTATE
 
| 0x1FF81084
 
| 0x1FF81084
 +
| 1
 +
|-
 +
| BATTERY_LEDSTATE
 +
| 0x1FF81085
 +
| 1
 +
|-
 +
| PTM sets bit0 to 1 when it has done writing MCU-originating hw info to [[#RUNNING_HW|RUNNING_HW]], [[#MCU_HW_INFO|MCU_HW_INFO]]. There are no other bits.
 +
| 0x1FF81086
 
| 1
 
| 1
 
|-
 
|-
Line 117: Line 161:
 
| 0x1FF810A8
 
| 0x1FF810A8
 
| 8
 
| 8
 +
|-
 +
| Signed? Headsets connected?
 +
| 0x1FF810C0
 +
| 1
 
|}
 
|}
  
This memory page is normally read-only for ARM11 processes, write-access is [[Memory_layout|determined]] by the process exheader kernel "Shared page writing" flag.
+
This memory page is normally read-only for ARM11 processes, write-access is [[Memory_layout|determined]] by the process exheader kernel "shared page writing" flag. It is mapped as "shared device" (it is thus uncached) in both cases.
 +
 
 +
This memory only exists under NATIVE_FIRM/SAFE_MODE_FIRM.
  
 
= ARM11 Kernel Config Fields =
 
= ARM11 Kernel Config Fields =
Line 137: Line 187:
 
== KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR ==
 
== KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR ==
 
This is the version-major for the currently running [[FIRM]].
 
This is the version-major for the currently running [[FIRM]].
 +
 +
The kernel initializes KERNEL_VERSIONMAJOR and SYSCOREVER with the same constant value.
  
 
== UPDATEFLAG ==
 
== UPDATEFLAG ==
Normally this flag is zero. When the ARM11 kernel is booting it will set this flag to 1, when bit0 from the data which field 0x1FF80016 is loaded from is clear, if the following [[PAD]] buttons are pressed: L, R, A, Up. When this flag is set, [[NS]] will launch the [[System_Settings#System_Updater|System Updater]] title instead of [[Home Menu]].
+
Normally this flag is zero. When the ARM11 kernel is booting on non-factory FIRM it will set this flag to 1, when bit0 from the data which field 0x1FF80016 is loaded from is clear, if the following [[PAD]] buttons are pressed: L, R, A, Up. When this flag is set, [[NS]] will launch the [[System_Settings#System_Updater|System Updater]] title instead of [[Home Menu]].
  
 
== NSTID ==
 
== NSTID ==
This field contains the titleID of the first title to launch from CTR-NAND after the [[FIRM]] system processes are loaded. The [[Process_Manager_Services|PM]] module launches this title. If this field titleID is all-zero, the system will not attempt to launch the title. The regular ARM11 kernel sets this to the regular [[NS]] titleID, while the SAFE_MODE ARM11 kernel sets this to the SAFE_MODE NS titleID.
+
This field contains the titleID of the first title to launch from CTR-NAND after the [[FIRM]] system processes are loaded. The [[Process_Manager_Services|PM]] module launches this title. If this field titleID is all-zero, the system will not attempt to launch the title. The regular ARM11 kernel sets this to the regular [[NS]] titleID, while the SAFE_MODE ARM11 kernel sets this to the SAFE_MODE NS titleID. The factory FIRM ARM11-kernel sets this to the NS TID from [[Factory_Setup|here]].
  
 
== SYSCOREVER ==
 
== SYSCOREVER ==
When launching [[NCCH#CXI|CXIs]], the value stored here must match the core version field stored in the CXI exheader. If they do not match, the [[Process_Manager_Services|PM]] module will refuse to launch the ARM11 process. The regular ARM11 kernel sets this to 0x2, while the SAFE_MODE ARM11 kernel sets this to 0x3.
+
This field is initialized by the ARM11 kernel, this is the programID-low of the running FIRM. When launching [[NCCH#CXI|CXIs]], the value stored here must match the core version field stored in the CXI exheader. If they do not match, the [[Process_Manager_Services|PM]] module will refuse to launch the ARM11 process.
 +
 
 +
With [[Factory_Setup|factory]] NATIVE_FIRM, this is set to 0x0, even though the FIRM programID-low is 0x2. However, the factory system-titles have core-version set to 0x2. Hence, this config-mem SYSCOREVER field might not be used by factory system processes?
  
 
== FIRM_SYSCOREVER ==
 
== FIRM_SYSCOREVER ==
 
Normally this is the same as SYSCOREVER. This used by [[AM:InstallNATIVEFIRM]] for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, [[AM:InstallNATIVEFIRM]] will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, [[AM:InstallNATIVEFIRM]] will return an error.
 
Normally this is the same as SYSCOREVER. This used by [[AM:InstallNATIVEFIRM]] for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, [[AM:InstallNATIVEFIRM]] will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, [[AM:InstallNATIVEFIRM]] will return an error.
  
== UNITINFO ==
+
== ENVINFO ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!  Bit
 
!  Bit
Line 156: Line 210:
 
|-
 
|-
 
| 0
 
| 0
| Clear for dev unit, set for retail.(See 0x1FF80015)
+
| Clear for developer unit, set for retail.(See 0x1FF80015)
 
|-
 
|-
 
| 1
 
| 1
| Set for debug units
+
| IsJtagConnected
 
|-
 
|-
 
| 2-7
 
| 2-7
| ?
+
|?
 +
|}
 +
 
 +
Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set (halting debug-mode enabled). [[NS]] loads the menu TID from MENUTID when bits 1-7 of this field are clear. [[ErrDisp]] will display development error info when bit0 is clear.
 +
 
 +
== UNITINFO ==
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Boot Env
 +
|-
 +
| 0
 +
| Prod
 +
|-
 +
| 1
 +
| Dev
 +
|-
 +
| 2
 +
| Debugger
 +
|-
 +
| 3
 +
| Firm
 
|}
 
|}
  
Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set. [[NS]] loads the menu TID from MENUTID when bits 1-7 of this register are clear. [[ErrDisp]] will display development error info when bit0 is clear.
+
The ARM11 loads the value of [[CONFIG_Registers#CFG_UNITINFO|CFG_UNITINFO]] from 0x1FFFFFF0+1 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.
 +
 
 +
When this field is zero, bit0 for ENVINFO is set for retail. When this field is non-zero, bit0 for ENVINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set. JTAG is only enabled for debugger and "firm" modes (bit1).
  
== 0x1FF80015 ==
+
== PREV_FIRM ==
When this field is zero, bit0 for UNITINFO is set for retail. When this field is non-zero, bit0 for UNITINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set.
+
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0
 +
| Cold Boot
 +
|-
 +
| 1
 +
| Reset from CTR mode
 +
|-
 +
| 3
 +
| Reset from TWL mode
 +
|-
 +
| 5
 +
| Reset from NTR mode
 +
|-
 +
| 7
 +
| Reset from AGB mode
 +
|}
 +
 
 +
The ARM11 loads this value from 0x1FFFFFF0+2 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.
  
== 0x1FF80016 ==
 
 
This originates from the low 8-bits of register [[CONFIG|0x10010000]]. When bit0 is set, the ARM11 kernel will not set the UPDATEFLAG to value 1.
 
This originates from the low 8-bits of register [[CONFIG|0x10010000]]. When bit0 is set, the ARM11 kernel will not set the UPDATEFLAG to value 1.
  
Line 177: Line 272:
  
 
== APPMEMTYPE ==
 
== APPMEMTYPE ==
 +
The value of this field determines the size for APPMEMALLOC. The retail type(value0) is used when the type is not values 2-5. See [[Memory_layout]] for the table of values for this and the mem-region sizes.
 +
 +
== APPMEMALLOC ==
 +
This contains the total size of the memory that can be allocated with the APPLICATION [[SVC|memory-region]], see [[Memory_layout|here]].
 +
 +
== SYSMEMALLOC ==
 +
Same as APPMEMALLOC except for the SYSTEM mem-region, see [[Memory_layout|here]].
 +
 +
== BASEMEMALLOC ==
 +
Same as APPMEMALLOC except for the BASE mem-region, see [[Memory_layout|here]].
 +
 +
= Shared Memory Page Fields =
 +
 +
== RUNNING_HW ==
 +
Converted from [[#MCU_HW_INFO|MCU_HW_INFO]] (names extracted from TestMenu) by PTM, depending on whether or not the system is a N3DS/N2DS or not:
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!  Value
 
!  Value
Size
+
Description
 
|-
 
|-
 
| 0
 
| 0
| 0x4000000 64MB (retail)
+
| Invalid (unknown)
 +
|-
 +
| 1
 +
| PRODUCT
 
|-
 
|-
 
| 2
 
| 2
| 0x6000000 96MB
+
| TS_BOARD
 
|-
 
|-
 
| 3
 
| 3
| 0x5000000 80MB
+
| KMC_DEBUGGER
 
|-
 
|-
 
| 4
 
| 4
| 0x4800000 72MB
+
| KMC_CAPTURE
 
|-
 
|-
 
| 5
 
| 5
| 0x2000000 32MB
+
| IS_DEBUGGER
 +
|-
 +
| 6
 +
| SNAKE_PRODUCT
 +
|-
 +
| 7
 +
| SNAKE_IS_DEBUGGER
 +
|-
 +
| 8
 +
| SNAKE_IS_CAPTURE
 +
|-
 +
| 9
 +
| SNAKE_KMC_DEBUGGER
 
|}
 
|}
  
The value of this field determines the size for APPMEMALLOC. The retail type is used when the type is not values 2-5.
+
== MCU_HW_INFO ==
  
== APPMEMALLOC ==
+
Converted to [[#RUNNING_HW|RUNNING_HW]] by PTM.
This contains the total size of the memory that can be allocated with the application [[SVC|memory-type]]. On retail this is 64MB for [[3DS_Development_Unit_Software#Config|prod]].
 
  
== 0x1FF80044 ==
+
{| class="wikitable" border="1"
The size value for this field is: 0x08000000 - (APPMEMALLOC + *0x1FF80048).(Total FCRAM size - APPMEMALLOC - *0x1FF80048)
+
!  Value
 
+
!  Description
== 0x1FF80048 ==
+
|-
Normally this is value 0x1400000, for size 20MB.
+
| 0
 
+
| PRODUCT
= Shared Memory Page Fields =
+
|-
 +
| 1
 +
| TS_BOARD
 +
|-
 +
| 2
 +
| KMC_DEBUGGER
 +
|-
 +
| 4
 +
| KMC_CAPTURE
 +
|-
 +
| 5
 +
| IS_DEBUGGER
 +
|-
 +
| 6
 +
| IS_CAPTURE (N3DS only)
 +
|}
  
 
== WIFI_MACADDR ==
 
== WIFI_MACADDR ==
This is the wifi MAC address for this 3DS. This is initialized by the [[NWM_Services|NWM]] module, it's unknown where the the MAC address written here was originally loaded from.
+
This is the WiFi MAC address for the 3DS. This is initialized by the [[NWM_Services|NWM]] module and is loaded from the WiFi card's EEPROM.
  
 
== 3D_SLIDERSTATE ==
 
== 3D_SLIDERSTATE ==
 
This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max.
 
This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max.
 +
 +
This is written/updated by [[HID_Services|HID]] module.
  
 
== 3D_LEDSTATE ==
 
== 3D_LEDSTATE ==
 
When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]].
 
When non-zero, the 3D LED is disabled. See [[GSPGPU:SetLedForceOff]].
 +
 +
== BATTERY_LEDSTATE ==
 +
Bit[0] is set when the adapter is connected. Bit[1] is set when the battery is charging. Bit[2:4] is the value of [[PTM:GetBatteryLevel|battery level]]. If the connection bit is set but the charging bit is clear, it means the battery is already fully charged but still with adapter connected.
  
 
== MENUTID ==
 
== MENUTID ==
Unknown, contains the menu TID(used by [[NS]]).
+
Unknown, contains the menu TID (used by [[NS]])
  
 
== ACTIVEMENUTID ==
 
== ACTIVEMENUTID ==
Line 226: Line 371:
  
 
= NATIVE_FIRM Versions =
 
= NATIVE_FIRM Versions =
{| class="wikitable" border="1"
 
!  Title-version
 
!  Kernel/FIRM version
 
|-
 
| [[1.0.0-0|v432]]
 
| 2.27-0
 
|-
 
| [[1.1.0-1|v1472]]
 
| 2.28-0
 
|-
 
| [[2.0.0-2|v2516]]
 
| 2.29-7
 
|-
 
| [[2.1.0-3|v3553]]
 
| 2.30-18
 
|-
 
| [[2.2.0-X|v4595]]
 
| 2.31-40
 
|-
 
| [[3.0.0-5|v5647]]
 
| 2.32-15
 
|-
 
| [[4.0.0-7|v6677]]
 
| 2.33-4
 
|-
 
| [[4.1.0-8|v7712]]
 
| 2.34-0
 
|-
 
| [[5.0.0-11|v8758]]
 
| 2.35-6
 
|-
 
| [[5.1.0-11|v9792]]
 
| 2.36-0
 
|-
 
| [[6.0.0-11|v10833]]
 
| 2.37-0
 
|-
 
| [[6.1.0-11|v11872]]
 
| 2.38-0
 
|-
 
| [[7.0.0-13|v12916]]
 
| 2.39-4
 
|}
 
  
The above kernel/FIRM versions are in the format: <KERNEL_VERSIONMAJOR>.<KERNEL_VERSIONMINOR>-<KERNEL_VERSIONREVISION>.
+
See [[FIRM#NATIVE_FIRM|FIRM]].

Latest revision as of 20:02, 8 January 2021

ARM11 Kernel Configuration Memory[edit]

NAME PROCESS VIRTUAL ADDRESS WIDTH
KERNEL_? 0x1FF80000 1
KERNEL_VERSIONREVISION 0x1FF80001 1
KERNEL_VERSIONMINOR 0x1FF80002 1
KERNEL_VERSIONMAJOR 0x1FF80003 1
UPDATEFLAG 0x1FF80004 4
NSTID 0x1FF80008 8
SYSCOREVER 0x1FF80010 4
ENVINFO 0x1FF80014 1
UNITINFO 0x1FF80015 1
PREV_FIRM 0x1FF80016 1
KERNEL_CTRSDKVERSION 0x1FF80018 4
FIRMLAUNCHFLAGS 0x1FF80020 4
APPMEMTYPE 0x1FF80030 4
APPMEMALLOC 0x1FF80040 4
SYSMEMALLOC 0x1FF80044 4
BASEMEMALLOC 0x1FF80048 4
FIRM_? 0x1FF80060 1
FIRM_VERSIONREVISION 0x1FF80061 1
FIRM_VERSIONMINOR 0x1FF80062 1
FIRM_VERSIONMAJOR 0x1FF80063 1
FIRM_SYSCOREVER 0x1FF80064 4
FIRM_CTRSDKVERSION 0x1FF80068 4

This memory page is mapped as "shared device" (it is thus uncached) and read-only for ARM11 processes. This memory and the kernel code for it only exists under NATIVE_FIRM/SAFE_MODE_FIRM.

The FIRM_* fields are by default identical to the KERNEL_* fields. However, the FIRM_* fields can be overridden via FIRM-launch parameters, see here.

Besides mem-region related fields, the data written here by the old 3DS/new 3DS kernels is identical.

Shared Memory Page For ARM11 Processes[edit]

NAME PROCESS VIRTUAL ADDRESS WIDTH
bit0 selects DATETIME_0 or DATETIME_1. 0x1FF81000 4
RUNNING_HW (1=product, 2=devboard, 3=debugger, 4=capture, 5=?) 0x1FF81004 1
MCU_HW_INFO 0x1FF81005 1
DATETIME_0 {(u64)MillisecondsSinceFirstJan1900,(u64)SystemTickLastTimeThisWasUpdated,(u32)unk(set to 0xFFB0FF0 by PTM),(u32)Set to 0 by PTM,(u32)Set to 0 by PTM,(u32)set to 0 by PTM} 0x1FF81020 32
DATETIME_1 0x1FF81040 32
WIFI_MACADDR 0x1FF81060 6
WIFI_LINKLEVEL Ranges from 0-3; 0 stands for no or a poor network connection; 3 stands for a good connection. This corresponds with the number of wifi bars displayed by Home Menu. 0x1FF81066 1
NETWORK_STATE The network state displayed by Home Menu. 2: Internet, 3/4/6: Local, 7: Disabled, Everything else: Enabled 0x1FF81067 1
3D_SLIDERSTATE 0x1FF81080 4
3D_LEDSTATE 0x1FF81084 1
BATTERY_LEDSTATE 0x1FF81085 1
PTM sets bit0 to 1 when it has done writing MCU-originating hw info to RUNNING_HW, MCU_HW_INFO. There are no other bits. 0x1FF81086 1
MENUTID 0x1FF810A0 8
ACTIVEMENUTID 0x1FF810A8 8
Signed? Headsets connected? 0x1FF810C0 1

This memory page is normally read-only for ARM11 processes, write-access is determined by the process exheader kernel "shared page writing" flag. It is mapped as "shared device" (it is thus uncached) in both cases.

This memory only exists under NATIVE_FIRM/SAFE_MODE_FIRM.

ARM11 Kernel Config Fields[edit]

0x1FF80000 / 0x1FF80060[edit]

Unknown, this is normally value 0.

KERNEL_VERSIONREVISION / FIRM_VERSIONREVISION[edit]

This is the version-revision for the currently running FIRM.

KERNEL_VERSIONMINOR[edit]

This is the version-minor from ((title-version & 0x3FF) >> 4), for the currently running FIRM. The values from KERNEL_VERSIONMINOR and KERNEL_VERSIONMAJOR can be stored in applications' CXI exheader.

FIRM_VERSIONMINOR[edit]

This is the same as KERNEL_VERSIONMINOR. After AM:InstallNATIVEFIRM checks FIRM_SYSCOREVER, AM:InstallNATIVEFIRM then compares FIRM_VERSIONMINOR with the NATIVE_FIRM ((title-version & 0x3FF) >> 4), when the latter is larger than FIRM_VERSIONMINOR AM:InstallNATIVEFIRM will trigger a FIRM install.

KERNEL_VERSIONMAJOR / FIRM_VERSIONMAJOR[edit]

This is the version-major for the currently running FIRM.

The kernel initializes KERNEL_VERSIONMAJOR and SYSCOREVER with the same constant value.

UPDATEFLAG[edit]

Normally this flag is zero. When the ARM11 kernel is booting on non-factory FIRM it will set this flag to 1, when bit0 from the data which field 0x1FF80016 is loaded from is clear, if the following PAD buttons are pressed: L, R, A, Up. When this flag is set, NS will launch the System Updater title instead of Home Menu.

NSTID[edit]

This field contains the titleID of the first title to launch from CTR-NAND after the FIRM system processes are loaded. The PM module launches this title. If this field titleID is all-zero, the system will not attempt to launch the title. The regular ARM11 kernel sets this to the regular NS titleID, while the SAFE_MODE ARM11 kernel sets this to the SAFE_MODE NS titleID. The factory FIRM ARM11-kernel sets this to the NS TID from here.

SYSCOREVER[edit]

This field is initialized by the ARM11 kernel, this is the programID-low of the running FIRM. When launching CXIs, the value stored here must match the core version field stored in the CXI exheader. If they do not match, the PM module will refuse to launch the ARM11 process.

With factory NATIVE_FIRM, this is set to 0x0, even though the FIRM programID-low is 0x2. However, the factory system-titles have core-version set to 0x2. Hence, this config-mem SYSCOREVER field might not be used by factory system processes?

FIRM_SYSCOREVER[edit]

Normally this is the same as SYSCOREVER. This used by AM:InstallNATIVEFIRM for comparing with the NATIVE_FIRM titleID-low. When the low u8 from the NATIVE_FIRM titleID-low is larger than FIRMSYSCOREVER, AM:InstallNATIVEFIRM will trigger FIRM installing. When that u8 is not larger than FIRM_SYSCOREVER, and these two values don't match, AM:InstallNATIVEFIRM will return an error.

ENVINFO[edit]

Bit Description
0 Clear for developer unit, set for retail.(See 0x1FF80015)
1 IsJtagConnected
2-7 ?

Bit1 in this field is set by the ARM11 kernel when ARM debug CP14 DSCR bit14 is set (halting debug-mode enabled). NS loads the menu TID from MENUTID when bits 1-7 of this field are clear. ErrDisp will display development error info when bit0 is clear.

UNITINFO[edit]

Value Boot Env
0 Prod
1 Dev
2 Debugger
3 Firm

The ARM11 loads the value of CFG_UNITINFO from 0x1FFFFFF0+1 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.

When this field is zero, bit0 for ENVINFO is set for retail. When this field is non-zero, bit0 for ENVINFO is clear for dev/debug units, and an ARM11 kernel state flag which enables debugging is set. JTAG is only enabled for debugger and "firm" modes (bit1).

PREV_FIRM[edit]

Value Description
0 Cold Boot
1 Reset from CTR mode
3 Reset from TWL mode
5 Reset from NTR mode
7 Reset from AGB mode

The ARM11 loads this value from 0x1FFFFFF0+2 during startup, which is written by the ARM9 during ARM9<>ARM11 kernel sync.

This originates from the low 8-bits of register 0x10010000. When bit0 is set, the ARM11 kernel will not set the UPDATEFLAG to value 1.

KERNEL_CTRSDKVERSION / FIRM_CTRSDKVERSION[edit]

This is the CTR-SDK version which was used to build the currently running FIRM.

APPMEMTYPE[edit]

The value of this field determines the size for APPMEMALLOC. The retail type(value0) is used when the type is not values 2-5. See Memory_layout for the table of values for this and the mem-region sizes.

APPMEMALLOC[edit]

This contains the total size of the memory that can be allocated with the APPLICATION memory-region, see here.

SYSMEMALLOC[edit]

Same as APPMEMALLOC except for the SYSTEM mem-region, see here.

BASEMEMALLOC[edit]

Same as APPMEMALLOC except for the BASE mem-region, see here.

Shared Memory Page Fields[edit]

RUNNING_HW[edit]

Converted from MCU_HW_INFO (names extracted from TestMenu) by PTM, depending on whether or not the system is a N3DS/N2DS or not:

Value Description
0 Invalid (unknown)
1 PRODUCT
2 TS_BOARD
3 KMC_DEBUGGER
4 KMC_CAPTURE
5 IS_DEBUGGER
6 SNAKE_PRODUCT
7 SNAKE_IS_DEBUGGER
8 SNAKE_IS_CAPTURE
9 SNAKE_KMC_DEBUGGER

MCU_HW_INFO[edit]

Converted to RUNNING_HW by PTM.

Value Description
0 PRODUCT
1 TS_BOARD
2 KMC_DEBUGGER
4 KMC_CAPTURE
5 IS_DEBUGGER
6 IS_CAPTURE (N3DS only)

WIFI_MACADDR[edit]

This is the WiFi MAC address for the 3DS. This is initialized by the NWM module and is loaded from the WiFi card's EEPROM.

3D_SLIDERSTATE[edit]

This float contains the state of the 3D slider. The range of this float is value 0.0f for "off", and 1.0f for max.

This is written/updated by HID module.

3D_LEDSTATE[edit]

When non-zero, the 3D LED is disabled. See GSPGPU:SetLedForceOff.

BATTERY_LEDSTATE[edit]

Bit[0] is set when the adapter is connected. Bit[1] is set when the battery is charging. Bit[2:4] is the value of battery level. If the connection bit is set but the charging bit is clear, it means the battery is already fully charged but still with adapter connected.

MENUTID[edit]

Unknown, contains the menu TID (used by NS)

ACTIVEMENUTID[edit]

This contains the titleID of the currently running menu launched by NS.

NATIVE_FIRM Versions[edit]

See FIRM.