packages/chip/docs/security/debug-policy.md
Status: pre-silicon specification. JTAG/SWD gating logic is not implemented.
| Lifecycle | JTAG TAP | SWD | CoreSight ETM/ETB | Boot ROM UART | Debug-auth required | Key-erasure on debug-enable |
|---|---|---|---|---|---|---|
| BLANK | open | open | open | verbose | no | n/a |
| DEV | open | open | open | verbose | no | no |
| MFG | gated | gated | gated | structured | yes (mfg key) | no |
| LOCKED | disabled | disabled | disabled | halt records only | n/a (must transition to RMA) | yes |
| RMA | gated | gated | gated | structured | yes (RMA key) | yes (on RMA entry) |
| SCRAP | hard-tied low | hard-tied low | hard-tied low | none | n/a | n/a |
"gated" = TAP responds to IDCODE only; functional scan chains held in reset until debug-authentication challenge succeeds.
The debug controller reads three OTP fields at reset:
Derived enable signals are combinational from these fuses; NOT software-writable.
jtag_enable = (state==DEV)
| (state==BLANK)
| ((state==MFG | state==RMA) & debug_auth_valid)
swd_enable = jtag_enable
etm_enable = jtag_enable
rom_uart_full = (state==DEV) | (state==BLANK)
If debug_disable[port] is programmed, that port is forced disabled regardless of state (one-way kill switch for incident response).
Used in MFG and RMA states.
Nonce includes boot_counter to prevent cross-power-cycle replay.
LOCKED devices cannot be debugged directly.
oem rma-request over fastboot with OEM-signed
authorization for the specific device UID.rma_wipe_done
fuse recorded for idempotence.There is no "service unlock" that preserves user data.
A user on a LOCKED device may invoke fastboot oem unlock:
unlocked flag, erases all KeyMint keys
and user data, then reboots.fastboot oem lock) requires another full wipe.Any failed debug-auth attempt increments a saturating 8-bit counter in OTP. After 16 failures, device emits tamper log entry and refuses further auth attempts for 24 h (RTC-gated). A LOCKED device observing JTAG activity logs a halt record but otherwise ignores it.
threat-model.md mitigations M7, M8, M12boot-image-format.md §5 lifecycle statesotp-fuse-map.md debug fuse allocationtest-plan.md cases TC-DEBUG-*