The Nintendo Switch makes use of Tegra's efuse driver for a number of operations. This driver is mapped to physical address 0x7000F800 with a total size of 0x400 bytes and exposes several registers for fuse programming and other miscellaneous functions.
- 1 Registers
- 2 eFuses
- 3 Anti-downgrade
Below is a list of fuse driver registers used by the Switch's bootloaders.
|0-1||Fuse command (1 = FUSE_READ; 2 = FUSE_WRITE; 3 = FUSE_SENSE)|
|26||Fuse power down mode flag (FUSE_CTRL_PD)|
Before fuse reading/writing the power down mode must be disabled.
This register takes the address of the fuse to be read/written/sensed.
This register receives the value read from the fuse.
This register takes the value to be written to the fuse.
This register takes the fuse programming pulse (0xC0 == 19200 kHz).
If set to 0x01, this register disables fuse programming.
If set to 0x01, this register disables software writes to the fuse registers.
Stores the SKU ID (must be 0x83).
Seems to store the bootrom patch version.
|0-1||Unit type (3 = debug; 0 = retail)|
|2||Unknown config (must be 1 on retail)|
|8||Unknown config mask (must be 0 on retail)|
|9||Unit type mask (0 = debug; 1 = retail)|
This stores some device configuration parameters.
Must be non-zero on retail units, otherwise the first bootloader panics. On debug units it can be zero, which tells the bootloader to choose from two debug master key seeds. If set to non-zero on a debug unit, it tells the bootloader to choose from two retail master key seeds (only the last one matches the retail master key seed).
This register returns the value programmed into offset 0x3A of the fuse array.
This register returns the value programmed into offset 0x3C of the fuse array.
The actual hardware fuses can be programmed through the fuse driver after enabling fuse programming.
Below is a list of common fuse offsets used by Tegra devices (and applicable to the Switch). Note that offsets are relative to the start of the fuse array and a single fuse write operation always writes the same word at both (fuse_offset + 0) and (fuse_offset + 1).
The first bootloader only burns fuses in this region. Both fuse offsets 0x3A (odm_reserved + 0x0C) and 0x3C (odm_reserved + 0x0E) are used for anti-downgrade control.
The fisrt bootloader verifies FUSE_BURNT_FUSE_COUNT_1 to prevent downgrading. How many fuses are expected to be burnt depends the device's unit type as below.
|System version||Expected number of burnt fuses (retail)||Expected number of burnt fuses (non-retail)|
If too many fuses are burnt the bootloader will panic immediately.
If too few are burnt, the bootloader will enable fuse programming and write the expected value to fuse offsets 0x3A and 0x3C. Afterwards, fuse programming is disabled and a magic value (0x21 == TEGRA210) is written to an unknown PMC register (0x7000EC40). Finally, the watchdog timer is initialized and programmed to force a reset.
On a subsequent boot, after the anti-downgrade fuses are checked again, PMC_RST_STATUS (0x7000E5B4) is checked and if set to 0x01 (watchdog reset) the unknown PMC register (0x7000EC40) will be checked for the magic value 0x21. PMC_RST_STATUS will only be set back to 0 (power on reset) if the fuse count matches the new expected value, otherwise the system will panic.