Provisioning is the storage of an asset in SICR. During provisioning, KMU copies data and permission policy from RAM to SICR.
Provisioning a key slot is possible when the key slot is in the ERASED state.
To provision an asset, perform the following steps:
- Populate the SRC data struct as an array in RAM.
- Write the SRC register to the address of the SRC data in RAM. See the following table for SRC data details.
- Configure the key slot ID in the KEY SLOT register.
- Using the RRAM controller, enable unbuffered RRAM write using register RRAMC.CONFIG. For more details on RRAMC, see RRAMC — Resistive random access memory controller.
- Trigger the PROVISION task. KMU writes data to SICR.
If copying of data was successful, KMU generates the PROVISIONED event, otherwise KMU generates the ERROR event.
- Disable the RRAM write operation. For details, see RRAMC — Resistive random access memory controller.
If a power failure occurs during provisioning, KMU will not write key slot data to RRAM and the key slot is not provisioned.
For more details on how to detect power failures, see Power-fail comparator.
The following lists the SRC data used for provisioning.
| Field | Byte offset | Size [bytes] | Description |
|---|---|---|---|
| METADATA | 24 | 4 | 32 bits of any cleartext metadata that belongs with the key slot. This metadata can later be read using the READMETADATA task (for details, see Read metadata). |
| DEST | 20 | 4 | 32-bit destination address. Note that DEST cannot point to SICR. DEST must be on a 128-bit boundary. |
| RPOLICY | 16 | 4 | Revocation policy (same definition as the key slot RPOLICY
field). Only two LSB's of the field are used, unused bits shall be
set to zero.
|
| VALUE[3:0] | 0 | 16 | Asset contents/value. This value can later be used by the PUSH task (for details, see Push). |