blob: d5fc569b05a26ad4745d87aedebb852f950f4050 [file] [log] [blame]
Raef Colesa5e540a2022-11-24 15:46:51 +00001RSS provisioning
2================
3
4The LifeCycle Manager controls access to the RSS OTP, and includes a
5state-machine that controls Lifecycle-state transitions. The LCM is derived from
6the OTP management and state machine components of the CryptoCell-3XX series
7accelerators, and will be familiar to those who have worked with them.
8
9When the chip hasn't been provisioned, the OTP is blank, which means the LCM is
10in "Virgin" Test/Production mode "TP mode" state. The first step for
11provisioning must be to set the LCM to either test-chip mode "TCI" or
12production-chip mode "PCI". In TCI mode the RTL key is masked to avoid
13disclosure, several OTP fields are changed from write-only to read-write, to aid
14in debugging, and debugging is not limited in secure provisioning mode.
15
16Once the TP mode has been set, the chip is then is Chip Manufacturer
17provisioning state "CM". This mode is intended for the provisioning of the HUK,
18GUK, CM provisioning key, CM code-encryption key, the root-of-trust public key
19and the CM config. To provision these fields, The firmware must first receive a
20provisioning bundle via a side-band channel (UART or debug interface). This
21bundle either contains just the keys, or more usually the keys and also
22provisioning code. The chip must then enter secure provisioning mode by setting
23the SP_ENABLE register. This causes a reset (but does not clear the RSS SRAMs),
24and allows access to the RTL key by exporting it to the KMU. The RSS must then
25decrypt and authenticate the bundle using the RTL key. Under TCI mode the RTL
26key is zeroed, so encryption and signing must use a zeroed key. Once the CM
27provisioning bundle has been unpacked, run if it contains code, and the CM
28values have been set. The RSS must be cold-reset.
29
30After the cold reset, the RSS will then be in Device Manufacturer provisioning
31state "DM". This state is designed to provision the DM provisioning key, the DM
32code-encryption key and the DM config. The procedure follows the same steps as
33the CM provisioning flow, with the exception that the bundle will now be
34encrypted and signed using the CM provisioning key. Once the provisioning bundle
35has been unpacked/run, the RSS must be cold-reset.
36
37After the cold reset, the device will now be in Secure Enable "SE" mode. Debug
38may be limited based on the hardware DCU mask for SE state. Provisioning will
39not be run on boot.
40
41--------------
42
43*Copyright (c) 2022, Arm Limited. All rights reserved.*