Configuration Memory

From 3dbrew
Revision as of 21:02, 13 April 2013 by Yellows8 (talk | contribs)
Jump to navigation Jump to search

Memory

NAME PROCESS VIRTUAL ADDRESS WIDTH
? 0x1FF80000 1
KERNEL_VERSIONMINOR 0x1FF80001 1
KERNEL_VERSIONMAJOR 0x1FF80002 1
? 0x1FF80003 1
UPDATEFLAG 0x1FF80004 4
NSTID 0x1FF80008 8
SYSCOREVER 0x1FF80010 4
UNITINFO 0x1FF80014 1
KERNEL_CTRSDKVERSION 0x1FF80018 4
APPMEMALLOC 0x1FF80040 4
? 0x1FF80060 1
FIRM_VERSIONMINOR 0x1FF80061 1
FIRM_VERSIONMAJOR 0x1FF80062 1
? 0x1FF80063 1
FIRM_SYSCOREVER 0x1FF80064 4
FIRM_CTRSDKVERSION 0x1FF80068 4
MENUTID 0x1FF810A0 8
ACTIVEMENUTID 0x1FF810A8 8

All of these fields are initialized by the ARM11 kernel, except for MENUTID and ACTIVEMENUTID which are set by NS.

0x1FF80000 / 0x1FF80060

Unknown, this is normally value 0.

KERNEL_VERSIONMINOR / FIRM_VERSIONMINOR

This is the FIRM version-minor, this likely isn't obtained from the FIRM title-version.

KERNEL_VERSIONMAJOR

This is the ((title-version & 0x3FF) >> 4), for the currently running FIRM.

FIRM_VERSIONMAJOR

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

0x1FF80003 / 0x1FF80063

Unknown, this is normally value 2.

UPDATEFLAG

Normally this flag is zero, however when the ARM11 kernel is booting it will set this flag to 1, if the following PAD buttons are pressed: L, R, A, Up. When this flag is set, the system will launch the System Updater title instead of displaying the Home Menu.

NSTID

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.

SYSCOREVER

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. The regular ARM11 kernel sets this to 0x2, while the SAFE_MODE ARM11 kernel sets this to 0x3.

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.

UNITINFO

Bit Description
0 Clear for dev unit, set for retail
1 Set for debug units
2-7 ?

Normally this register is all-zero, however 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.

KERNEL_CTRSDKVERSION / FIRM_CTRSDKVERSION

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

APPMEMALLOC

This contains the total size of the memory that can be allocated with the application memory-type. On retail this is 64MB for prod.

MENUTID

This contains the titleID of the retail menu which will be launched by NS.

ACTIVEMENUTID

This contains the titleID of the currently running menu launched by NS. Normally this is the home menu TID from MENUTID, but if launching that fails this titleID is the alternate menu.(On debug units this is the TID loaded from config)