Documentation
¶
Overview ¶
Package ocotp implements a driver for the NXP On-Chip OTP Controller (OCOTP_CTRL), included in i.MX6 series SoCs to interface with on-chip fuses, including write operation.
WARNING: Fusing SoC OTPs is an **irreversible** action that permanently fuses values on the device. This means that any errors in the process, or lost fused data such as cryptographic key material, might result in a **bricked** device.
The use of this package is therefore **at your own risk**.
This package is only meant to be used with `GOOS=tamago GOARCH=arm` as supported by the TamaGo framework for bare metal Go on ARM SoCs, see https://github.com/f-secure-foundry/tamago.
Index ¶
Constants ¶
const ( OCOTP_BASE = 0x021bc000 OCOTP_CTRL = OCOTP_BASE CTRL_WRUNLOCK = 16 CTRL_RELOAD_SHADOWS = 10 CTRL_ERROR = 9 CTRL_BUSY = 8 CTRL_ADDR = 0 OCOTP_CTRL_CLR = OCOTP_BASE + 0x0008 OCOTP_DATA = OCOTP_BASE + 0x0020 OCOTP_VERSION = OCOTP_BASE + 0x0090 VERSION_MAJOR = 24 VERSION_MINOR = 16 VERSION_STEP = 0 OCOTP_BANK0_WORD0 = OCOTP_BASE + 0x0400 )
OCOTP registers (p2388, 37.5 OCOTP Memory Map/Register Definition, IMX6ULLRM).
const ( // WordSize represents the number of bytes per OTP word. WordSize = 4 // BankSize represents the number of words per OTP bank. BankSize = 8 )
Configuration constants
Variables ¶
var Timeout = 10 * time.Millisecond
Timeout for OCOTP controller operations
Functions ¶
func Blow ¶
Blow fuses a value in the argument bank and word location. (p2384, 37.3.1.3 Fuse and Shadow Register Writes, IMX6ULLRM).
WARNING: Fusing SoC OTPs is an **irreversible** action that permanently fuses values on the device. This means that any errors in the process, or lost fused data such as cryptographic key material, might result in a **bricked** device.
The use of this function is therefore **at your own risk**.
Types ¶
This section is empty.