Changes to Runtime Specification

Comparing version 2.1 to 2.0
+739 additions -132 deletions
@@ -1,10 +1,10 @@
11 <div style="font-size: 0.85em; color: #656d76; margin-bottom: 1em; padding: 0.5em; background: #f6f8fa; border-radius: 4px;">
2-📄 Source: <a href="https://github.com/chipsalliance/caliptra-sw/blob/b86bbb793cc236e80b37f3d4359a9758672b70a1/runtime/README.md" target="_blank">chipsalliance/caliptra-sw/runtime/README.md</a> @ <code>b86bbb7</code>
2+📄 Source: <a href="https://github.com/chipsalliance/caliptra-sw/blob/a38c99b60c97df406201e098df1b89e9301a26d1/runtime/README.md" target="_blank">chipsalliance/caliptra-sw/runtime/README.md</a> @ <code>a38c99b</code>
33 </div>
44
5-# Caliptra Runtime Firmware v2.0.1
6-
7-*Spec version: 0.3*
5+# Caliptra Runtime Firmware v2.1
6+
7+*Spec version: 1.0*
88
99 This specification describes the Caliptra Runtime Firmware.
1010
@@ -25,9 +25,14 @@
2525 * [Cryptographic mailbox commands](#cryptographic-mailbox-commands-new-in-20)
2626 * `ECDSA384_SIGNATURE_VERIFY` and `LMS_SIGNATURE_VERIFY`require the hash to be included in the message, as the SHA accelerator registers are no longer accessible outside Caliptra.
2727
28+v2.1:
29+
30+* [External mailbox commands](#external-mailbox-cmd)
31+* [Encrypted firmware support](#encrypted-firmware-support-21-subsystem-mode-only)
32+* [OCP LOCK v1.0 commands](#mailbox-commands-ocp-lock-v10)
33+
34+
2835 ## Spec Opens
29-
30-* Cryptographic Mailbox: ML-KEM support
3136
3237 ## Runtime Firmware environment
3338
@@ -40,6 +45,20 @@
4045 * Initialize the [DICE Protection Environment (DPE)](#dice-protection-environment-dpe)
4146 * Initialize any SRAM structures used by Runtime Firmware
4247 * Upload the firwmare to the Manufacturer Control Unit (2.0, susbystem mode only)
48+
49+#### Encrypted Firmware Support (2.1, subsystem mode only)
50+
51+When ROM receives the `RI_DOWNLOAD_ENCRYPTED_FIRMWARE` command instead of `RI_DOWNLOAD_FIRMWARE`, it sets the boot mode to `EncryptedFirmware`. In this mode:
52+
53+1. Runtime downloads the encrypted MCU firmware to MCU SRAM via the recovery interface
54+2. Runtime does **not** activate the MCU firmware immediately
55+3. The MCU ROM can then:
56+ - Import an AES key using `CM_IMPORT`
57+ - Decrypt the firmware in-place using `CM_AES_GCM_DECRYPT_DMA`
58+ - Send `ACTIVATE_FIRMWARE` with the `INITIAL_ACTIVATE` flag set, so Runtime publishes `FW_EXEC_CTRL[MCU]` without performing the hitless-update reload/verify dance (the firmware was already integrity-checked end-to-end by `RI_DOWNLOAD_ENCRYPTED_FIRMWARE` and `CM_AES_GCM_DECRYPT_DMA`). See [`ACTIVATE_FIRMWARE`](#activate_firmware) for the gating rules.
59+ - Trigger a warm reset; MCI releases MCU once `FW_EXEC_CTRL[MCU]` is asserted, and MCU FwBoot jumps into the decrypted firmware.
60+
61+The `CM_AES_GCM_DECRYPT_DMA` command is intended to be used for the `EncryptedFirmware` boot mode and performs a SHA384 integrity check of the ciphertext before decryption, but can be used to decrypt other images as well in any boot mode.
4362
4463 For behavior during other types of reset, see [Runtime firmware updates](#runtime-firmware-updates).
4564
@@ -94,7 +113,7 @@
94113
95114 CM itself does not provide any storage for the keys: when generated, they are returned to the caller in encrypted form, and must be passed back to be used.
96115
97-These mailbox commands provide SHA, HMAC, HKDF, AES, RNG, MLDSA, and ECDSA services.
116+These mailbox commands provide SHA, HMAC, HKDF, AES, RNG, MLDSA, ECDSA, and ML-KEM services.
98117
99118 Note that while MLDSA and ECDSA keys can be imported, generated, and used in the cryptographic mailbox commands (i.e., `CM_*` commands) through CMKs, these keys are *NOT* tied DICE or DPE, so their use may be restricted for certain purposes.
100119
@@ -126,8 +145,7 @@
126145
127146 | **Name** | **Bits** | **Description** |
128147 | ------------- | -------- | -------------------------------------- |
129-| version | 8 | CMK version. Currently always 1. |
130-| flags | 8 | Bit 0 = FIPS valid |
148+| version | 16 | CMK version. Currently always 1. |
131149 | length | 16 | how many bits of key material are used |
132150 | key usage | 8 | represents which kind of key this is |
133151 | id | 24 | ID number |
@@ -162,8 +180,10 @@
162180 | --------- | --------- |
163181 | 0 | Reserved |
164182 | 1 | HMAC |
165-| 2 | HKDF |
166-| 3 | AES |
183+| 2 | AES |
184+| 3 | ECDSA |
185+| 4 | MLDSA |
186+| 5 | ML-KEM |
167187
168188
169189 #### Replay Prevention and Deletion
@@ -187,7 +207,7 @@
187207
188208 Each of these abilities are tied to Caliptra Vendor and Owner FW signing keys and should be independent of any SoC RoT FW signing keys.
189209
190-Manifest-based image authorization is implemented via two mailbox commands: [`SET_AUTH_MANIFEST`](#set-auth-manifest), and [`AUTHORIZE_AND_STASH`](#authorize-and-stash).
210+Manifest-based image authorization is implemented via two mailbox commands: [`SET_AUTH_MANIFEST`](#set_auth_manifest), and [`AUTHORIZE_AND_STASH`](#authorize_and_stash).
191211
192212 ### Caliptra-Endorsed Aggregated Measured Boot
193213
@@ -303,6 +323,68 @@
303323 Mailbox user 0xFFFF_FFFF is reserved for Caliptra internal use. All mailbox
304324 commands from that user will fail.
305325
326+### Byte order of cryptographic fields
327+
328+Several mailbox commands include ECC P-384 and ML-DSA-87 public keys,
329+signatures, and SHA digest values stored as `[u32]` arrays.
330+The "big endian" / "little endian" labels in individual command tables describe
331+how the **standard byte representation** produced by cryptographic
332+tools maps to those `u32` words.
333+
334+Generally, any fields specified as **little-endian** byte representation will match the standard byte representation of the cryptographic protocols, since the RISC-V processor is a little-endian processor.
335+
336+#### ECC P-384 fields (big-endian words)
337+
338+Each 4-byte group from the standard representation is byte-reversed on the
339+wire.
340+
341+Example — suppose OpenSSL produces a 48-byte X coordinate starting with:
342+
343+```
344+OpenSSL raw bytes: AB CD EF 01 23 45 67 89 ...
345+ ~~~~~~~~~~~ ~~~~~~~~~~~
346+Mailbox bytes: 01 EF CD AB 89 67 45 23 ...
347+```
348+
349+In other words: split the tool output into 4-byte groups, then reverse each
350+group.
351+
352+#### ML-DSA-87 fields (little-endian words)
353+
354+No conversion is needed. Copy the raw bytes produced by an ML-DSA-87
355+implementation (e.g., OpenSSL 3.5+, the `fips204` crate, or the NIST reference
356+implementation) directly into the mailbox buffer.
357+
358+```
359+openssl pkey output: AB CD EF 01 23 45 67 89 ...
360+Mailbox bytes: AB CD EF 01 23 45 67 89 ... (identical)
361+```
362+
363+#### SHA digest fields (big-endian words)
364+
365+Hash digests stored as `u32[N]` arrays use the same big-endian word convention
366+as ECC fields. Each 4-byte group of the standard hash output is byte-reversed
367+on the wire.
368+
369+Example — suppose `openssl dgst -sha384` produces a digest starting with:
370+
371+```
372+openssl output: A1 B2 C3 D4 E5 F6 07 18 ...
373+ ~~~~~~~~~~~ ~~~~~~~~~~~
374+Mailbox u32[12]: D4 C3 B2 A1 18 07 F6 E5 ...
375+```
376+
377+#### u8 byte-array fields (no conversion needed)
378+
379+When ECC P-384 keys, signatures, or SHA digests are declared as `u8[48]` (rather
380+than `u32[12]`), they use standard big-endian byte order — the same format
381+produced by OpenSSL and other cryptographic tools. No byte-swapping is required.
382+
383+For example, the `ECDSA384_SIGNATURE_VERIFY` input fields (`pub_key_x`,
384+`pub_key_y`, `signature_r`, `signature_s`, `hash`) and the `QUOTE_PCRS_ECC384`
385+output fields (`digest`, `signature_r`, `signature_s`) can be used directly with
386+`openssl` or OpenSSL's `BN_bin2bn()` without any conversion.
387+
306388 ### FW\_LOAD
307389
308390 The `FIRMWARE_LOAD` command is handled by both ROM and Runtime Firmware.
@@ -367,7 +449,14 @@
367449 | -------- | -------- | ---------------
368450 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
369451 | fips\_status | u32 | Indicates if the command is FIPS approved or an error.
370-| capabilities | u8[16] | Firmware capabilities
452+| capabilities | u8[16] | Firmware capabilities. See table below for details.
453+
454+*Table: Firmware Capabilities Flags*
455+
456+| **Name** | **Bit** | **Description**
457+| --------------- | ------- | ---------------
458+| `RT_BASE` | 64 | Base capabilities for Caliptra Runtime v2.1.
459+| `RT_OCP_LOCK` | 65 | Runtime firmware and hardware supports OCP LOCK.
371460
372461 ### GET\_IDEV\_ECC384\_CERT
373462
@@ -740,7 +829,7 @@
740829 | **Name** | **Type** | **Description**
741830 | -------- | -------- | ---------------
742831 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
743-| digest | u32[12] | Owner public key hash.
832+| digest | u32[12] | Owner public key hash. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields).
744833
745834 *Table: `INSTALL_OWNER_PK_HASH` output arguments*
746835
@@ -811,13 +900,13 @@
811900 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
812901 | fips\_status | u32 | Indicates if the command is FIPS approved or an error.
813902
814-### INVOKE\_DPE\_COMMAND
815-
816-Invokes a serialized DPE command.
903+### INVOKE\_DPE\_ECC384
904+
905+Invokes a serialized EC-P384 DPE profile command.
817906
818907 Command Code: `0x4450_4543` ("DPEC")
819908
820-*Table: `INVOKE_DPE_COMMAND` input arguments*
909+*Table: `INVOKE_DPE_ECC384` input arguments*
821910
822911 | **Name** | **Type** | **Description**
823912 | -------- | -------- | ---------------
@@ -825,7 +914,49 @@
825914 | data\_size | u32 | Length in bytes of the valid data in the data field.
826915 | data | u8[...] | DPE command structure as defined in the DPE iRoT profile.
827916
828-*Table: `INVOKE_DPE_COMMAND` output arguments*
917+*Table: `INVOKE_DPE_ECC384` output arguments*
918+
919+| **Name** | **Type** | **Description**
920+| -------- | -------- | ---------------
921+| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
922+| fips\_status | u32 | Indicates if the command is FIPS approved or an error.
923+| data\_size | u32 | Length in bytes of the valid data in the data field.
924+| data | u8[...] | DPE response structure as defined in the DPE iRoT profile.
925+
926+### INVOKE\_DPE\_MLDSA87
927+
928+Invokes a serialized ML-DSA-87 DPE profile command. In subsystem mode a response
929+can be DMA'ed to an external address. This is especially useful for large
930+commands like `CertifyKey` or `DeriveContext` when exporting a CDI. Both of
931+these responses contain a potentially large certificate/CSR. To use this
932+feature, set the EXTERNAL_AXI_RESPONSE in `flags` and set the corresponding
933+AXI address and size fields. The response over the mailbox will only contain a
934+mailbox header (`chksum` and `fips_status`). The full response including the
935+mailbox header will be found at the given address.
936+
937+Command Code: `0x4450_4543` ("DPEC")
938+
939+*Table: `INVOKE_DPE_MLDSA87` input arguments*
940+
941+| **Name** | **Type** | **Description** |
942+| -------------- | -------- | --------------------------------------------------------------------------- |
943+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
944+| flags | u32 | Flags to give configurations of the command. |
945+| axi\_addr\_lo | u32 | Lower word of the destination physical address. |
946+| axi\_addr\_hi | u32 | Upper word of the destination physical address. |
947+| axi\_max\_size | u32 | Maximum DMA response size. |
948+| data\_size | u32 | Length in bytes of the valid data in the data field. |
949+| data | u8[...] | DPE command structure as defined in the DPE iRoT profile. |
950+
951+
952+*Table: `INVOKE_DPE_MLDSA87` input flags*
953+
954+| **Name** | **Value** |
955+| ----------------------- | --------- |
956+| EXTERNAL\_AXI\_RESPONSE | 1 << 31 |
957+
958+
959+*Table: `INVOKE_DPE_MLDSA87` output arguments*
829960
830961 | **Name** | **Type** | **Description**
831962 | -------- | -------- | ---------------
@@ -888,8 +1019,36 @@
8881019 | PCRs | PcrValue[32] | Values of all PCRs.
8891020 | nonce | u8[32] | Return the nonce used as input for convenience.
8901021 | reset\_ctrs | u32[32] | Reset counters for all PCRs.
891-| digest | u8[64] | Return the SHA2-512 digest over the PCR values and the nonce, in byte reversed order.
1022+| digest | u8[64] | SHA2-512 digest over the PCR values and the nonce, in DWORD-reversed order with per-word byte swap. See note below.
8921023 | signature | u8[4628] | MLDSA-87 signature over the `digest` (4627 bytes + 1 Reserved byte). </br> The FMC Alias MLDSA seed stored in Key Vault slot 8 is utilized to generate the private key, which is subsequently used for the signing operation.
1024+
1025+**Digest byte order:** The `digest` field has two transformations applied relative
1026+to the standard `openssl dgst -sha512` output: (1) the 16 u32 words are in
1027+reversed order, and (2) the bytes within each word are reversed. For example, if
1028+`openssl dgst -sha512` produces `A1 B2 C3 D4 E5 F6 07 18 ... P1 P2 P3 P4`,
1029+the mailbox response contains `P4 P3 P2 P1 ... 18 07 F6 E5 D4 C3 B2 A1`.
1030+
1031+To **independently recompute** this digest from PCR values and nonce, compute the
1032+SHA2-512 hash, then apply two steps:
1033+
1034+```
1035+openssl dgst -sha512 output (64 bytes, shown as 16 four-byte groups):
1036+ A1 B2 C3 D4 | E5 F6 07 18 | ... | M1 M2 M3 M4 | P1 P2 P3 P4
1037+
1038+Step 1 — reverse the bytes within each 4-byte group:
1039+ D4 C3 B2 A1 | 18 07 F6 E5 | ... | M4 M3 M2 M1 | P4 P3 P2 P1
1040+
1041+Step 2 — reverse the order of all 16 groups:
1042+ P4 P3 P2 P1 | M4 M3 M2 M1 | ... | 18 07 F6 E5 | D4 C3 B2 A1
1043+ ^^^^^^^^^^^^ ^^^^^^^^^^^^
1044+ (last group from Step 1 is now first) (first group is now last)
1045+
1046+Mailbox digest = result of Step 2
1047+```
1048+
1049+To **verify the signature** with an external tool such as OpenSSL, pass the `digest`
1050+bytes as-is as the pre-hashed message to ML-DSA-87 verification — no conversion
1051+is needed because the signature was computed over these exact bytes.
8931052
8941053 ### EXTEND\_PCR
8951054
@@ -1149,35 +1308,69 @@
11491308 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
11501309 | fips\_status | u32 | Indicates if the command is FIPS approved or an error.
11511310
1152-### CERTIFY\_KEY\_EXTENDED
1153-
1154-Produces a DPE leaf certificate or CSR containing custom extensions provided by the SoC.
1311+### CERTIFY\_KEY\_EXTENDED\_ECC384
1312+
1313+Produces an ECC-P384 DPE leaf certificate or CSR containing custom extensions provided by the SoC.
11551314
11561315 Command Code: `0x434B_4558` ("CKEX")
11571316
1158-*Table: `CERTIFY_KEY_EXTENDED` input arguments*
1317+*Table: `CERTIFY_KEY_EXTENDED_ECC384` input arguments*
11591318
11601319 | **Name** | **Type** | **Description** |
11611320 | ----------------- | -------- | --------------------------------------------------------------------------- |
11621321 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
1322+| flags | u32 | Flags determining which custom extensions to include in the certificate. |
11631323 | certify\_key\_req | u8[72] | Certify Key Request. |
1164-| flags | u32 | Flags determining which custom extensions to include in the certificate. |
1165-
1166-
1167-*Table: `CERTIFY_KEY_EXTENDED` input flags*
1324+
1325+
1326+*Table: `CERTIFY_KEY_EXTENDED_ECC384` input flags*
11681327
11691328 | **Name** | **Offset** |
1170-| --------------- | ---------- |
1171-| DMTF_OTHER_NAME | 1 << 31 |
1172-
1173-
1174-*Table: `CERTIFY_KEY_EXTENDED` output arguments*
1175-
1176-| **Name** | **Type** | **Description** |
1177-| ------------------ | -------- | -------------------------------------------------------------------------- |
1329+| ----------------- | ---------- |
1330+| DMTF\_OTHER\_NAME | 1 << 31 |
1331+
1332+
1333+*Table: `CERTIFY_KEY_EXTENDED_ECC384` output arguments*
1334+
1335+| **Name** | **Type** | **Description** |
1336+| ------------------ | --------- | -------------------------------------------------------------------------- |
11781337 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
11791338 | fips\_status | u32 | Indicates if the command is FIPS approved or an error. |
1180-| certify\_key\_resp | u8[2176] | Certify Key Response. |
1339+| size | u32 | The size of the response in the certify\_key\_resp field. |
1340+| certify\_key\_resp | u8[25152] | Certify Key Response. |
1341+
1342+
1343+### CERTIFY\_KEY\_EXTENDED\_MLDSA87
1344+
1345+Produces an ML-DSA-87 DPE leaf certificate or CSR containing custom extensions provided by the SoC.
1346+
1347+Command Code: `0x434B_584D` ("CKXM")
1348+
1349+*Table: `CERTIFY_KEY_EXTENDED_MLDSA87` input arguments*
1350+
1351+| **Name** | **Type** | **Description** |
1352+| ----------------- | -------- | --------------------------------------------------------------------------- |
1353+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
1354+| flags | u32 | Flags determining which custom extensions to include in the certificate. |
1355+| certify\_key\_req | u8[72] | Certify Key Request. |
1356+
1357+
1358+*Table: `CERTIFY_KEY_EXTENDED_MLDSA87` input flags*
1359+
1360+| **Name** | **Offset** |
1361+| ----------------------- | ---------- |
1362+| DMTF\_OTHER\_NAME | 1 << 31 |
1363+| EXTERNAL\_AXI\_RESPONSE | 1 << 30 |
1364+
1365+
1366+*Table: `CERTIFY_KEY_EXTENDED_MLDSA87` output arguments*
1367+
1368+| **Name** | **Type** | **Description** |
1369+| ------------------ | --------- | -------------------------------------------------------------------------- |
1370+| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
1371+| fips\_status | u32 | Indicates if the command is FIPS approved or an error. |
1372+| size | u32 | The size of the response in the certify\_key\_resp field. |
1373+| certify\_key\_resp | u8[25152] | Certify Key Response. |
11811374
11821375
11831376 ### SET_AUTH_MANIFEST
@@ -1188,26 +1381,26 @@
11881381
11891382 *Table: `SET_AUTH_MANIFEST` input arguments*
11901383
1191-| **Name** | **Type** | **Description**
1192-| -------- | -------- | ---------------
1384+| **Name** | **Type** | **Description** |
1385+| -------- | -------- | --------------- |
11931386 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
11941387 | manifest size | u32 | The size of the full Authentication Manifest |
11951388 | preamble\_marker | u32 | Marker needs to be 0x4154_4D4E for the preamble to be valid |
11961389 | preamble\_size | u32 | Size of the preamble |
11971390 | preamble\_version | u32 | Version of the preamble |
11981391 | preamble\_flags | u32 | Manifest flags. See AUTH_MANIFEST_FLAGS below |
1199-| preamble\_vendor\_ecc384\_key | u32[24] | Vendor ECC384 key with X and Y coordinates in that order |
1200-| preamble\_vendor\_pqc\_key | u32[648] | Vendor MLDSA-87 or LMS-SHA192-H15 key |
1201-| preamble\_vendor\_ecc384\_sig | u32[24] | Vendor ECC384 signature |
1202-| preamble\_vendor\_PQC\_sig | u32[1157] | Vendor MLDSA-87 or LMOTS-SHA192-W4 signature |
1203-| preamble\_owner\_ecc384\_key | u32[24] | Owner ECC384 key with X and Y coordinates in that order |
1204-| preamble\_owner\_pqc\_key | u32[648] | Owner MLDSA-87 or LMS-SHA192-H15 key |
1205-| preamble\_owner\_ecc384\_sig | u32[24] | Owner ECC384 signature |
1206-| preamble\_owner\_PQC\_sig | u32[1157] | Owner MLDSA-87 or LMOTS-SHA192-W4 signature |
1207-| metadata\_vendor\_ecc384\_sig | u32[24] | Metadata Vendor ECC384 signature |
1208-| metadata\_vendor\_PQC\_sig | u32[1157] | Metadata Vendor MLDSA-87 or LMOTS-SHA192-W4 signature |
1209-| metadata\_owner\_ecc384\_sig | u32[24] | Metadata Owner ECC384 signature |
1210-| metadata\_owner\_PQC\_sig | u32[1157] | Metadata Owner MLDSA-87 or LMOTS-SHA192-W4 signature |
1392+| preamble\_vendor\_ecc384\_key | u32[24] | Vendor ECC384 key with X and Y coordinates in that order. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1393+| preamble\_vendor\_pqc\_key | u32[648] | Vendor MLDSA-87 or LMS-SHA192-H15 key. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1394+| preamble\_vendor\_ecc384\_sig | u32[24] | Vendor ECC384 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1395+| preamble\_vendor\_PQC\_sig | u32[1157] | Vendor MLDSA-87 or LMOTS-SHA192-W4 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1396+| preamble\_owner\_ecc384\_key | u32[24] | Owner ECC384 key with X and Y coordinates in that order. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1397+| preamble\_owner\_pqc\_key | u32[648] | Owner MLDSA-87 or LMS-SHA192-H15 key. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1398+| preamble\_owner\_ecc384\_sig | u32[24] | Owner ECC384 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1399+| preamble\_owner\_PQC\_sig | u32[1157] | Owner MLDSA-87 or LMOTS-SHA192-W4 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1400+| metadata\_vendor\_ecc384\_sig | u32[24] | Metadata Vendor ECC384 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1401+| metadata\_vendor\_PQC\_sig | u32[1157] | Metadata Vendor MLDSA-87 or LMOTS-SHA192-W4 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1402+| metadata\_owner\_ecc384\_sig | u32[24] | Metadata Owner ECC384 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
1403+| metadata\_owner\_PQC\_sig | u32[1157] | Metadata Owner MLDSA-87 or LMOTS-SHA192-W4 signature. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields). |
12111404 | metadata\_entry\_entry\_count | u32 | number of metadata entries |
12121405 | metadata\_entries | Metadata[127] | The max number of metadata entries is 127 but less can be used |
12131406
@@ -1225,17 +1418,17 @@
12251418 | **Name** | **Type** | **Description** |
12261419 | ------------------------ | --------- | ---------------- |
12271420 | Image Hash | u8[48] | SHA2-384 hash of a SOC image. |
1228-
1229-| Image_id | u32 | This corresponds to the `Image Identifier` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1230-| Component_id | u32 | This corresponds to the `Component Id` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1231-| flags | u32 | This corresponds to the `flags` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1232-| Image Load Address High | u32 | This corresponds to the `Image Load Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1233-| Image Load Address Low | u32 | This corresponds to the `Image Load Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1234-| Staging Address High | u32 | This corresponds to the `Staging Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1235-| Staging Address Low | u32 | This corresponds to the `Staging Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1236-| Classification | u32 | This corresponds to the `Classification` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1237-| Version Number | u32 | This corresponds to the `Version Number` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1238-| Version String | u8[32] | This corresponds to the `Version String` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main-2.x/auth-manifest/README.md)
1421+| Image_id | u32 | This corresponds to the `Image Identifier` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1422+| Component_id | u32 | This corresponds to the `Component Id` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1423+| flags | u32 | This corresponds to the `flags` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1424+| Image Load Address High | u32 | This corresponds to the `Image Load Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1425+| Image Load Address Low | u32 | This corresponds to the `Image Load Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1426+| Staging Address High | u32 | This corresponds to the `Staging Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1427+| Staging Address Low | u32 | This corresponds to the `Staging Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1428+| Classification | u32 | This corresponds to the `Classification` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1429+| Version Number | u32 | This corresponds to the `Version Number` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1430+| Version String | u8[32] | This corresponds to the `Version String` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1431+
12391432
12401433 ### VERIFY_AUTH_MANIFEST
12411434
@@ -1257,8 +1450,8 @@
12571450
12581451 *Table: `AUTHORIZE_AND_STASH` input arguments*
12591452
1260-| **Name** | **Type** | **Description**
1261-| ------------| -------- | ---------------
1453+| **Name** | **Type** | **Description** |
1454+| ------------ | -------- | --------------- |
12621455 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
12631456 | fw_id | u8[4] | Firmware id of the image, in little-endian format |
12641457 | measurement | u8[48] | Digest of the image requested for authorization. The `source` field needs to be set to '1` for InRequest, otherwise<br />this field is ignored. |
@@ -1280,8 +1473,8 @@
12801473 | --------------- | -------- | -------------------------------------------------------------------------- |
12811474 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
12821475 | fips_status | u32 | Indicates if the command is FIPS approved or an error. |
1283-
1284-| auth_req_result | u32 |AUTHORIZE_IMAGE (0xDEADC0DE), IMAGE_NOT_AUTHORIZED (0x21523F21) or IMAGE_HASH_MISMATCH (0x8BFB95CB)
1476+| auth_req_result | u32 | AUTHORIZE_IMAGE (0xDEADC0DE), IMAGE_NOT_AUTHORIZED (0x21523F21) or IMAGE_HASH_MISMATCH (0x8BFB95CB) |
1477+
12851478
12861479 ### GET_IMAGE_INFO
12871480
@@ -1294,8 +1487,8 @@
12941487 | **Name** | **Type** | **Description** |
12951488 | -------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
12961489 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
1297-
1298-| fw_id | u32 | Firmware id of the image, in little-endian format
1490+| fw_id | u32 | Firmware id of the image, in little-endian format |
1491+
12991492
13001493 *Table: `GET_IMAGE_INFO` output arguments*
13011494
@@ -1303,13 +1496,36 @@
13031496 | -------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13041497 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
13051498 | fips_status | u32 | Indicates if the command is FIPS approved or an error. |
1306-| Component_id | u32 | This corresponds to the `Component Id` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1307-| flags | u32 | This corresponds to the `flags` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1308-| Image Load Address High | u32 | This corresponds to the `Image Load Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1309-| Image Load Address Low | u32 | This corresponds to the `Image Load Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1310-| Staging Address High | u32 | This corresponds to the `Staging Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1311-| Staging Address Low | u32 | This corresponds to the `Staging Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/caliptra-2.0/auth-manifest/README.md) |
1499+| Component_id | u32 | This corresponds to the `Component Id` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1500+| flags | u32 | This corresponds to the `flags` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1501+| Image Load Address High | u32 | This corresponds to the `Image Load Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1502+| Image Load Address Low | u32 | This corresponds to the `Image Load Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1503+| Staging Address High | u32 | This corresponds to the `Staging Address High` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
1504+| Staging Address Low | u32 | This corresponds to the `Staging Address Low` field in the [SoC Manifest](https://github.com/chipsalliance/caliptra-sw/blob/main/auth-manifest/README.md) |
13121505 | digest | u8[48] | SHA-384 digest of the image. **Only present in FW 2.0.2+ and 2.1.1+.** |
1506+
1507+
1508+### GET\_MCU\_FW\_SIZE
1509+
1510+Returns the size and SHA-384 digest of the MCU firmware image that was downloaded during the recovery flow. This command is used by MCU ROM during encrypted boot so it can issue `CM_AES_GCM_DECRYPT_DMA` with the correct size and without recomputing the digest.
1511+
1512+Command Code: `0x474D_4653` ("GMFS")
1513+
1514+*Table: `GET_MCU_FW_SIZE` input arguments*
1515+
1516+| **Name** | **Type** | **Description** |
1517+| -------------- | -------------- | --------------------------------------------------------------------------- |
1518+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
1519+
1520+
1521+*Table: `GET_MCU_FW_SIZE` output arguments*
1522+
1523+| **Name** | **Type** | **Description** |
1524+| -------------- | -------------- | -------------------------------------------------------------------------- |
1525+| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
1526+| fips_status | u32 | Indicates if the command is FIPS approved or an error. |
1527+| size | u32 | Size of the MCU firmware image in bytes. |
1528+| sha384 | u8[48] | SHA-384 digest of the encrypted MCU firmware image. |
13131529
13141530
13151531 ### ACTIVATE_FIRMWARE
@@ -1327,7 +1543,43 @@
13271543 | count | u32 | Number of image_ids to activate. Item count of image_ids array parameter |
13281544 | mcu_image_size | u32 | Size of MCU image, if included in the activation |
13291545 | image_ids | Array of u8[4] | Array of Image ids in little-endian format |
1330-
1546+| flags | u32 | Optional flags (see below). Caliptra runtime 2.1.1+ only. |
1547+
1548+
1549+*Flags*
1550+
1551+| **Bit** | **Name** | **Description** |
1552+| ------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
1553+| 0 | `INITIAL_ACTIVATE` | First-time MCU activation after the encrypted-boot flow. Caliptra runtime 2.1.1+ only. See below. |
1554+
1555+
1556+Unknown flag bits are rejected with `RUNTIME_MAILBOX_INVALID_PARAMS`.
1557+
1558+`INITIAL_ACTIVATE` is used exclusively by MCU ROM at the tail of the
1559+`EncryptedFirmware` boot flow. MCU ROM has already loaded firmware into MCU
1560+SRAM via `RI_DOWNLOAD_ENCRYPTED_FIRMWARE` and decrypted it in place via
1561+`CM_AES_GCM_DECRYPT_DMA`. When this flag is set, Caliptra Runtime:
1562+
1563+- Skips the hitless-update steps (set `RESET_REASON.FwHitlessUpd`, clear
1564+ `FW_EXEC_CTRL`, wait for MCU reset request and reset assertion, DMA-reload
1565+ from staging, re-`AuthorizeAndStash`).
1566+- Just publishes `FW_EXEC_CTRL[MCU]` (and any other requested bits) so that
1567+ MCI's `BOOT_RST_MCU` state releases MCU from reset on the next warm reset
1568+ that MCU ROM triggers.
1569+
1570+Caliptra Runtime only honors `INITIAL_ACTIVATE` when **all** of the following
1571+are true; otherwise the command fails with `IMAGE_VERIFIER_ACTIVATION_FAILED`:
1572+
1573+1. The MCU image bit is included in the activation request.
1574+2. The boot mode set by ROM is `EncryptedFirmware` (i.e., ROM received
1575+ `RI_DOWNLOAD_ENCRYPTED_FIRMWARE`).
1576+3. `FW_EXEC_CTRL[MCU]` is currently `0` — this is an initial activation,
1577+ not a hitless update masquerading as one.
1578+
1579+Together, these checks ensure that the MCU SRAM contents are
1580+integrity-protected end-to-end (ciphertext digest verified during recovery;
1581+GCM tag verified during `CM_AES_GCM_DECRYPT_DMA`) before Caliptra releases
1582+MCU to execute them.
13311583
13321584 *Table: `ACTIVATE_FIRMWARE` output arguments*
13331585
@@ -1336,6 +1588,28 @@
13361588 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
13371589 | fips_status | u32 | Indicates if the command is FIPS approved or an error. |
13381590
1591+
1592+## Mailbox commands: OCP LOCK v1.0
1593+
1594+These commands are defined in the OCP LOCK v1.0 [specification](https://github.com/chipsalliance/Caliptra/blob/main/doc/ocp_lock/releases/OCP_LOCK_Specification_v1.0_RC2.pdf).
1595+
1596+### ENUMERATE_HPKE_HANDLES
1597+### REPORT_HEK_METADATA
1598+### GET_ALGORITHMS
1599+### INITIALIZE_MEK_SECRET
1600+### ROTATE_HPKE_KEY
1601+### GENERATE_MEK
1602+### GENERATE_MPK
1603+### REWRAP_MPK
1604+### ENABLE_MPK
1605+### MIX_MPK
1606+### GET_HPKE_PUB_KEY
1607+### TEST_ACCESS_KEY
1608+### GET_STATUS
1609+### CLEAR_KEY_CACHE
1610+### UNLOAD_MEK
1611+### LOAD_MEK
1612+### DERIVE_MEK
13391613
13401614 ## Mailbox commands: Cryptographic Mailbox (2.0)
13411615
@@ -1439,6 +1713,99 @@
14391713 | fips_status | u32 | FIPS approved or an error |
14401714 | hash size | u32 ||
14411715 | hash | u8[hash size] ||
1716+
1717+
1718+### CM\_SHAKE256\_INIT
1719+
1720+This starts the computation of a SHAKE256 extendable-output hash, which may be larger than a single mailbox command allows.
1721+
1722+**Note:** Unlike the CM\_SHA commands, SHAKE256 cannot save and restore hardware state between calls. Instead, the SHA3 hardware state is kept live, and the context returned to the caller is an encrypted random session token. If any other SHA3 operation occurs between INIT and FINAL, the session is invalidated and UPDATE/FINAL will return an error.
1723+
1724+The sequence to use these are:
1725+* 1 `CM_SHAKE256_INIT` command
1726+* 0 or more `CM_SHAKE256_UPDATE` commands
1727+* 1 `CM_SHAKE256_FINAL` command
1728+
1729+For each command, the context from the previous command's output must be passed as an input.
1730+
1731+The `SHAKE256_CONTEXT_SIZE` is always exactly 44 bytes long (encrypted session token).
1732+
1733+The maximum supported input data size per command is 4096 bytes.
1734+
1735+Command Code: `0x434D_5849` ("CMXI")
1736+
1737+*Table: `CM_SHAKE256_INIT` input arguments*
1738+
1739+| **Name** | **Type** | **Description** |
1740+| --------- | ------------- | --------------- |
1741+| chksum | u32 ||
1742+| data size | u32 ||
1743+| data | u8[data size] | Data to hash |
1744+
1745+
1746+*Table: `CM_SHAKE256_INIT` output arguments*
1747+
1748+| **Name** | **Type** | **Description** |
1749+| ----------- | ------------------------- | -------------------------------------------------- |
1750+| chksum | u32 ||
1751+| fips_status | u32 | FIPS approved or an error |
1752+| context | u8[SHAKE256_CONTEXT_SIZE] | Passed to `CM_SHAKE256_UPDATE` / `CM_SHAKE256_FINAL` |
1753+
1754+
1755+### CM\_SHAKE256\_UPDATE
1756+
1757+This continues a SHAKE256 computation started by `CM_SHAKE256_INIT` or from another `CM_SHAKE256_UPDATE`.
1758+
1759+The context MUST be passed in from `CM_SHAKE256_INIT` or `CM_SHAKE256_UPDATE`.
1760+
1761+Command Code: `0x434D_5855` ("CMXU")
1762+
1763+*Table: `CM_SHAKE256_UPDATE` input arguments*
1764+
1765+| **Name** | **Type** | **Description** |
1766+| --------- | ------------------------- | ---------------------------------------------------- |
1767+| chksum | u32 ||
1768+| context | u8[SHAKE256_CONTEXT_SIZE] | From `CM_SHAKE256_INIT` / `CM_SHAKE256_UPDATE` |
1769+| data size | u32 ||
1770+| data | u8[data size] | Data to hash |
1771+
1772+
1773+*Table: `CM_SHAKE256_UPDATE` output arguments*
1774+
1775+| **Name** | **Type** | **Description** |
1776+| ----------- | ------------------------- | -------------------------------------------------- |
1777+| chksum | u32 ||
1778+| fips_status | u32 | FIPS approved or an error |
1779+| context | u8[SHAKE256_CONTEXT_SIZE] | Passed to `CM_SHAKE256_UPDATE` / `CM_SHAKE256_FINAL` |
1780+
1781+
1782+### CM\_SHAKE256\_FINAL
1783+
1784+This finalizes the SHAKE256 computation and produces the hash of all of the data.
1785+
1786+The context MUST be passed in from `CM_SHAKE256_INIT` or `CM_SHAKE256_UPDATE`.
1787+
1788+The output is always a 64-byte SHAKE256 digest.
1789+
1790+Command Code: `0x434D_5846` ("CMXF")
1791+
1792+*Table: `CM_SHAKE256_FINAL` input arguments*
1793+
1794+| **Name** | **Type** | **Description** |
1795+| ----------- | ------------------------- | ---------------------------------------------- |
1796+| chksum | u32 ||
1797+| context | u8[SHAKE256_CONTEXT_SIZE] | From `CM_SHAKE256_INIT` / `CM_SHAKE256_UPDATE` |
1798+| data size | u32 | May be 0 |
1799+| data | u8[data size] | Data to hash |
1800+
1801+
1802+*Table: `CM_SHAKE256_FINAL` output arguments*
1803+
1804+| **Name** | **Type** | **Description** |
1805+| ----------- | -------- | ------------------------- |
1806+| chksum | u32 ||
1807+| fips_status | u32 | FIPS approved or an error |
1808+| hash | u8[64] | SHAKE256 digest |
14421809
14431810
14441811 ### CM\_HMAC
@@ -1729,6 +2096,79 @@
17292096 | fips_status | u32 | FIPS approved or an error |
17302097
17312098
2099+### CM_MLKEM_KEY_GEN
2100+
2101+Generates an ML-KEM-1024 encapsulation key from the seed (seed\_d || seed\_z, 64 bytes) stored in a CMK with key usage `Mlkem`.
2102+
2103+The key generation algorithm is described in [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final).
2104+
2105+Command Code: `0x434D_4C4B` ("CMLK")
2106+
2107+*Table: `CM_MLKEM_KEY_GEN` input arguments*
2108+| **Name** | **Type** | **Description** |
2109+| -------- | -------- | ---------------------------------------- |
2110+| chksum | u32 ||
2111+| CMK | CMK | ML-KEM seed (seed\_d &#124;&#124; seed\_z) |
2112+
2113+
2114+*Table: `CM_MLKEM_KEY_GEN` output arguments*
2115+| **Name** | **Type** | **Description** |
2116+| ----------- | -------- | ---------------------------------------- |
2117+| chksum | u32 ||
2118+| fips_status | u32 | FIPS approved or an error |
2119+| encaps_key | u8[1568] | ML-KEM-1024 encapsulation key |
2120+
2121+
2122+### CM_MLKEM_ENCAPSULATE
2123+
2124+Performs ML-KEM-1024 encapsulation against the provided encapsulation key, producing a ciphertext and a shared key wrapped as a CMK.
2125+
2126+The encapsulation algorithm is described in [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final).
2127+
2128+Command Code: `0x434D_4C45` ("CMLE")
2129+
2130+*Table: `CM_MLKEM_ENCAPSULATE` input arguments*
2131+| **Name** | **Type** | **Description** |
2132+| ----------- | -------- | ---------------------------------------- |
2133+| chksum | u32 ||
2134+| key_usage | u32 | Key usage for the output CMK |
2135+| encaps_key | u8[1568] | ML-KEM-1024 encapsulation key |
2136+
2137+
2138+*Table: `CM_MLKEM_ENCAPSULATE` output arguments*
2139+| **Name** | **Type** | **Description** |
2140+| ----------- | -------- | ---------------------------------------- |
2141+| chksum | u32 ||
2142+| fips_status | u32 | FIPS approved or an error |
2143+| ciphertext | u8[1568] | ML-KEM-1024 ciphertext |
2144+| shared_key | CMK | CMK of the shared secret key |
2145+
2146+
2147+### CM_MLKEM_DECAPSULATE
2148+
2149+Performs ML-KEM-1024 decapsulation using the seed in the provided CMK and the given ciphertext, recovering the shared key wrapped as a CMK. This uses the hardware's combined keygen\_decapsulate operation to avoid materializing the full 3168-byte decapsulation key in memory.
2150+
2151+The decapsulation algorithm is described in [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final).
2152+
2153+Command Code: `0x434D_4C44` ("CMLD")
2154+
2155+*Table: `CM_MLKEM_DECAPSULATE` input arguments*
2156+| **Name** | **Type** | **Description** |
2157+| ----------- | -------- | ---------------------------------------- |
2158+| chksum | u32 ||
2159+| key_usage | u32 | Key usage for the output CMK |
2160+| CMK | CMK | ML-KEM seed (seed\_d &#124;&#124; seed\_z) |
2161+| ciphertext | u8[1568] | ML-KEM-1024 ciphertext to decapsulate |
2162+
2163+
2164+*Table: `CM_MLKEM_DECAPSULATE` output arguments*
2165+| **Name** | **Type** | **Description** |
2166+| ----------- | -------- | ---------------------------------------- |
2167+| chksum | u32 ||
2168+| fips_status | u32 | FIPS approved or an error |
2169+| shared_key | CMK | CMK of the shared secret key |
2170+
2171+
17322172 ### CM_AES_ENCRYPT_INIT
17332173
17342174 Generic AES operation for unauthenticated AES operations.
@@ -1775,8 +2215,7 @@
17752215 | mode | u32 ||
17762216 | key | u8[32] ||
17772217 | iv | u8[16] ||
1778-| fips_status | u8 | 1 = FIPS valid |
1779-| reserved | u8[75] | Reserved for additional fields |
2218+| reserved | u8[76] | Reserved for additional fields |
17802219
17812220
17822221 The size of the (encrypted) context is always exactly 156 bytes,
@@ -1925,8 +2364,7 @@
19252364 | GHASH state | u8[16] ||
19262365 | current length | u32 | value mod 16 is buffer size |
19272366 | buffer | u8[16] ||
1928-| fips_status | u8 | 1 = FIPS valid |
1929-| reserved | u8[15] ||
2367+| reserved | u8[16] ||
19302368
19312369
19322370 The size of the (encrypted) context is always exactly 128 bytes,
@@ -2198,6 +2636,44 @@
21982636 | plaintext | u8[plaintext size] ||
21992637
22002638
2639+### CM_AES_GCM_DECRYPT_DMA
2640+
2641+Performs in-place AES-256-GCM decryption of data at an AXI address using DMA. This command is specifically designed for decrypting MCU firmware that was downloaded via the `RI_DOWNLOAD_ENCRYPTED_FIRMWARE` command.
2642+
2643+**Important restrictions:**
2644+- This command is only available in subsystem mode, as DMA is only available in subsystem.
2645+- This command is only available when the boot mode is `EncryptedFirmware`, which is set by ROM when it receives the `RI_DOWNLOAD_ENCRYPTED_FIRMWARE` command.
2646+- The command performs a two-pass operation:
2647+ 1. First pass: Verifies the SHA384 hash of the encrypted data at the AXI address
2648+ 2. Second pass: Performs in-place AES-GCM decryption via DMA
2649+
2650+The CMK must be an AES key (key usage = 3) that was previously imported using `CM_IMPORT`.
2651+
2652+Command Code: `0x434D_4444` ("CMDD")
2653+
2654+*Table: `CM_AES_GCM_DECRYPT_DMA` input arguments*
2655+| **Name** | **Type** | **Description** |
2656+| --------------------- | --------- | ---------------------------------------------------- |
2657+| chksum | u32 | Checksum over other input arguments |
2658+| cmk | CMK | Encrypted CMK containing the AES-256 key |
2659+| iv | u32[3] | AES-GCM initialization vector (12 bytes) |
2660+| tag | u32[4] | AES-GCM authentication tag (16 bytes) |
2661+| encrypted_data_sha384 | u8[48] | SHA384 hash of the encrypted data for verification |
2662+| axi_addr_lo | u32 | Lower 32 bits of the AXI address |
2663+| axi_addr_hi | u32 | Upper 32 bits of the AXI address |
2664+| length | u32 | Length of data to decrypt in bytes |
2665+| aad_length | u32 | Length of AAD in bytes (0-4095) |
2666+| aad | u8[...] | Additional authenticated data |
2667+
2668+
2669+*Table: `CM_AES_GCM_DECRYPT_DMA` output arguments*
2670+| **Name** | **Type** | **Description** |
2671+| ------------ | -------- | ----------------------------------------------------- |
2672+| chksum | u32 | Checksum over other output arguments |
2673+| fips_status | u32 | FIPS approved or an error |
2674+| tag_verified | u32 | 1 if GCM tag verification succeeded, 0 if it failed |
2675+
2676+
22012677 ### CM_ECDH_GENERATE
22022678
22032679 This computes the first half of an Elliptic Curve Diffie-Hellman exchange to compute an ephemeral shared key pair with another party.
@@ -2316,9 +2792,9 @@
23162792 ### CM\_DERIVE\_STABLE\_KEY
23172793
23182794 Derives an HMAC key that has a stable value across resets from either
2319-IDevId or LDevId.
2320-
2321-The (interior) value of the returned CMK will be the stable across resets as it is derived indirectly from the IDevId or LDevId CDIs.
2795+IDevId, LDevId, or the Owner Root Key (derived from HEK seed).
2796+
2797+The (interior) value of the returned CMK will be the stable across resets as it is derived indirectly from the IDevId or LDevId CDIs, or from the HEK-seed-derived Owner Root Key.
23222798 The actual encrypted bytes of the CMK will *not* be the same, and
23232799 the encrypted CMK itself cannot be used across resets. So, the key
23242800 will always need to be re-derived after every *cold* reset.
@@ -2326,22 +2802,32 @@
23262802 If a key usage other than HMAC is desired, then the KDF or HKDF
23272803 mailbox functions can be used to derive a key from the returned CMK.
23282804
2329-Note that in Caliptra 2.0 in subsystem mode, derived stable keys, their derivatives, and commands using them will be marked with a FIPS status of invalid since the UDS and FE cannot be completely zeroized.
2805+`key_type = OwnerKey` is only available in subsystem mode when the Stable Owner
2806+Key strap is enabled (`SS_STRAP_GENERIC[3]` bit 0 set to 1) and OCP LOCK is not
2807+enabled. If these requirements are not met, the command fails with
2808+`CMB_STABLE_OWNER_KEY_NOT_AVAILABLE`.
2809+
2810+For `OwnerKey`, this command derives from the ROM-populated Stable Owner Root
2811+Key. It first runs AES-256-CMAC KDF with `info` as the input data to produce an
2812+intermediate key, then runs HMAC-SHA512 KDF with `b"Stable Owner Key" || info`
2813+as the domain-separation input to produce the returned 64-byte HMAC key
2814+material. Caliptra wraps that key material as an encrypted CMK before returning
2815+it to the caller.
23302816
23312817 Command Code: `0x434D_4453` ("CMDS")
23322818
23332819 *Table: `CM_DERIVE_STABLE_KEY` input arguments*
23342820
2335-| **Name** | **Type** | **Description**
2336-| -------- | -------- | ---------------
2821+| **Name** | **Type** | **Description** |
2822+| -------- | -------- | --------------- |
23372823 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
2338-| key_type | u32 | Source key to derive the stable key from. **0x0000_0001:** IDevId <br> **0x0000_0002:** LDevId |
2824+| key_type | u32 | Source key to derive the stable key from. **0x0000_0001:** IDevId <br> **0x0000_0002:** LDevId <br> **0x0000_0003:** OwnerKey (derived from HEK seed) |
23392825 | info | u8[32] | Data to use in the key derivation. |
23402826
23412827
23422828 *Table: `CM_DERIVE_STABLE_KEY` output arguments*
2343-| **Name** | **Type** | **Description**
2344-| -------- | -------- | ---------------
2829+| **Name** | **Type** | **Description** |
2830+| -------- | -------- | --------------- |
23452831 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
23462832 | cmk | CMK | CMK that stores the stable key material |
23472833
@@ -2351,9 +2837,6 @@
23512837 Imports the specified key and returns a CMK for it.
23522838
23532839 Usage information is required so that the key can be verified and used appropriately.
2354-
2355-Note that it is the caller's responsibility to ensure that the source
2356-key material meets FIPS requirements, such as zeroization.
23572840
23582841 Command Code: `0x434D_494D` ("CMIM")
23592842
@@ -2438,14 +2921,14 @@
24382921
24392922 *Table: `GET_IDEV_ECC384_CSR` input arguments*
24402923
2441-| **Name** | **Type** | **Description**
2442-| -------- | -------- | ---------------
2924+| **Name** | **Type** | **Description** |
2925+| -------- | -------- | --------------- |
24432926 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
24442927
24452928
24462929 *Table: `GET_IDEV_ECC384_CSR` output arguments*
2447-| **Name** | **Type** | **Description**
2448-| -------- | -------- | ---------------
2930+| **Name** | **Type** | **Description** |
2931+| -------- | -------- | --------------- |
24492932 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
24502933 | data\_size | u32 | Length in bytes of the valid data in the data field. |
24512934 | data | u8[...] | DER-encoded ECC384 IDevID certificate signing request. |
@@ -2457,14 +2940,14 @@
24572940
24582941 *Table: `GET_IDEV_MLDSA87_CSR` input arguments*
24592942
2460-| **Name** | **Type** | **Description**
2461-| -------- | -------- | ---------------
2943+| **Name** | **Type** | **Description** |
2944+| -------- | -------- | --------------- |
24622945 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
24632946
24642947
24652948 *Table: `GET_IDEV_MLDSA87_CSR` output arguments*
2466-| **Name** | **Type** | **Description**
2467-| -------- | -------- | ---------------
2949+| **Name** | **Type** | **Description** |
2950+| -------- | -------- | --------------- |
24682951 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
24692952 | data\_size | u32 | Length in bytes of the valid data in the data field. |
24702953 | data | u8[...] | DER-encoded MLDSA87 IDevID certificate signing request. |
@@ -2484,14 +2967,14 @@
24842967
24852968 *Table: `GET_FMC_ALIAS_ECC384_CSR` input arguments*
24862969
2487-| **Name** | **Type** | **Description**
2488-| -------- | -------- | ---------------
2970+| **Name** | **Type** | **Description** |
2971+| -------- | -------- | --------------- |
24892972 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
24902973
24912974
24922975 *Table: `GET_FMC_ALIAS_ECC384_CSR` output arguments*
2493-| **Name** | **Type** | **Description**
2494-| -------- | -------- | ---------------
2976+| **Name** | **Type** | **Description** |
2977+| -------- | -------- | --------------- |
24952978 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
24962979 | data\_size | u32 | Length in bytes of the valid data in the data field. |
24972980 | data | u8[...] | DER-encoded ECC384 FMC Alias certificate signing request. |
@@ -2503,14 +2986,14 @@
25032986
25042987 *Table: `GET_FMC_ALIAS_MLDSA87_CSR` input arguments*
25052988
2506-| **Name** | **Type** | **Description**
2507-| -------- | -------- | ---------------
2989+| **Name** | **Type** | **Description** |
2990+| -------- | -------- | --------------- |
25082991 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
25092992
25102993
25112994 *Table: `GET_FMC_ALIAS_MLDSA87_CSR` output arguments*
2512-| **Name** | **Type** | **Description**
2513-| -------- | -------- | ---------------
2995+| **Name** | **Type** | **Description** |
2996+| -------- | -------- | --------------- |
25142997 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
25152998 | data\_size | u32 | Length in bytes of the valid data in the data field. |
25162999 | data | u8[...] | DER-encoded MLDSA87 FMC Alias certificate signing request. |
@@ -2524,8 +3007,8 @@
25243007
25253008 *Table: `GET_ATTESTED_ECC384_CSR` input arguments*
25263009
2527-| **Name** | **Type** | **Description**
2528-| -------- | -------- | ---------------
3010+| **Name** | **Type** | **Description** |
3011+| -------- | -------- | --------------- |
25293012 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
25303013 | key_id | u32 | Key ID for which CSR is requested.<br> **0x0000_0001:** LDevId <br> **0x0000_0002:** FMC Alias <br> **0x0000_0003:** RT Alias |
25313014 | nonce | u8[32] | Nonce to be included in the CSR EAT. |
@@ -2533,8 +3016,8 @@
25333016
25343017 *Table: `GET_ATTESTED_ECC384_CSR` output arguments*
25353018
2536-| **Name** | **Type** | **Description**
2537-| -------- | -------- | ---------------
3019+| **Name** | **Type** | **Description** |
3020+| -------- | -------- | --------------- |
25383021 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
25393022 | data\_size | u32 | Length in bytes of the valid data in the data field. |
25403023 | data | u8[...] | DER-encoded ECC384 attested certificate signing request. |
@@ -2548,8 +3031,8 @@
25483031
25493032 *Table: `GET_ATTESTED_MLDSA87_CSR` input arguments*
25503033
2551-| **Name** | **Type** | **Description**
2552-| -------- | -------- | ---------------
3034+| **Name** | **Type** | **Description** |
3035+| -------- | -------- | --------------- |
25533036 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
25543037 | key_id | u32 | Key ID for which CSR is requested.<br> **0x0000_0001:** LDevId <br> **0x0000_0002:** FMC Alias <br> **0x0000_0003:** RT Alias |
25553038 | nonce | u8[32] | Nonce to be included in the CSR EAT. |
@@ -2557,8 +3040,8 @@
25573040
25583041 *Table: `GET_ATTESTED_MLDSA87_CSR` output arguments*
25593042
2560-| **Name** | **Type** | **Description**
2561-| -------- | -------- | ---------------
3043+| **Name** | **Type** | **Description** |
3044+| -------- | -------- | --------------- |
25623045 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
25633046 | data\_size | u32 | Length in bytes of the valid data in the data field. |
25643047 | data | u8[...] | DER-encoded MLDSA87 attested certificate signing request. |
@@ -2572,16 +3055,16 @@
25723055
25733056 *Table: `SIGN_WITH_EXPORTED_ECDSA` input arguments*
25743057
2575-| **Name** | **Type** | **Description**
2576-| -------- | -------- | ---------------
3058+| **Name** | **Type** | **Description** |
3059+| -------- | -------- | --------------- |
25773060 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
2578-| exported_cdi_handle | u8[32] | The Exported CDI handle returned by the DPE `DeriveContext` command. Little endian. |
2579-| tbs | u8[48] | The bytes to be signed. Little endian. |
3061+| exported_cdi_handle | u8[32] | The exported CDI handle returned by the DPE `DeriveContext` command. Opaque byte array; copy the bytes exactly as returned. |
3062+| tbs | u8[48] | The 48-byte SHA-384 digest to be signed. Raw byte array; no byte swapping is required. |
25803063
25813064
25823065 *Table: `SIGN_WITH_EXPORTED_ECDSA` output arguments*
2583-| **Name** | **Type** | **Description**
2584-| -------- | -------- | ---------------
3066+| **Name** | **Type** | **Description** |
3067+| -------- | -------- | --------------- |
25853068 | derived_pubkey_x | u8[48] | The X BigNum of the ECDSA public key associated with the signing key. |
25863069 | derived_pubkey_y | u8[48] | The Y BigNum of the ECDSA public key associated with the signing key. |
25873070 | signature_r | u8[48] | The R BigNum of an ECDSA signature. |
@@ -2598,10 +3081,10 @@
25983081
25993082 *Table: `REVOKE_EXPORTED_CDI_HANDLE` input arguments*
26003083
2601-| **Name** | **Type** | **Description**
2602-| -------- | -------- | ---------------
3084+| **Name** | **Type** | **Description** |
3085+| -------- | -------- | --------------- |
26033086 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
2604-| exported_cdi_handle | u8[32] | The Exported CDI handle returned by the DPE `DeriveContext` command. Little endian. |
3087+| exported_cdi_handle | u8[32] | The exported CDI handle returned by the DPE `DeriveContext` command. Opaque byte array; copy the bytes exactly as returned. |
26053088
26063089
26073090 The `exported_cdi` can be created by calling `DeriveContext` with the `export-cdi` and `create-certificate` flags.
@@ -2609,6 +3092,35 @@
26093092 The `exported_cdi_handle` is no longer usable after calling `REVOKE_EXPORTED_CDI_HANDLE` with it. After the `exported_cdi_handle`
26103093 has been revoked, a new exported CDI can be created by calling `DeriveContext` with the `export-cdi` and `create-certificate` flags.
26113094
3095+### EXTERNAL_MAILBOX_CMD
3096+
3097+Command Code: `0x4558_544D` ("EXTM")
3098+
3099+**Note**: This command is only available in subsystem mode in 2.1+.
3100+
3101+Executes a mailbox command located at an AXI address.
3102+This allows for executing mailbox commands that are larger than the mailbox allows.
3103+
3104+This is currently mostly useful for FIRMWARE_LOAD (as part of an update) or SET_AUTH_MANIFEST.
3105+
3106+The response is still written to the mailbox.
3107+
3108+The checksum is over the EXTM command, *not* the command that is loaded over AXI.
3109+That external command will still need its own checksum, if applicable.
3110+
3111+*Table: `EXTERNAL_MAILBOX_CMD` input arguments*
3112+
3113+| **Name** | **Type** | **Description** |
3114+| -------- | -------- | --------------- |
3115+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
3116+| command_id | u32 | Command ID for the mailbox command to be executed. Little endian. |
3117+| command_size | u32 | Size of the mailbox command to be executed. Little endian. |
3118+| axi_address_low | u32 | Lower 32 bits of the AXI address that contains the mailbox command. Little endian. |
3119+| axi_address_high | u32 | High 32 bits of the AXI address that contains the mailbox command. Little endian. |
3120+
3121+
3122+The response will be the response of the executed external command.
3123+
26123124 ### REALLOCATE\_DPE\_CONTEXT\_LIMITS
26133125
26143126 Command Code: '5243_5458` ("RCTX")
@@ -2617,24 +3129,119 @@
26173129
26183130 *Table: `REALLOCATE_DPE_CONTEXT_LIMITS` input arguments*
26193131
2620-| **Name** | **Type** | **Description**
2621-| -------- | -------- | ---------------
3132+| **Name** | **Type** | **Description** |
3133+| -------- | -------- | --------------- |
26223134 | chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian. |
26233135 | pl0_context_limit | u32 | Number of contexts to allocate to PL0. PL1 will receive remaining contexts. |
26243136
26253137
26263138 *Table: `REALLOCATE_DPE_CONTEXT_LIMITS` output arguments*
2627-| **Name** | **Type** | **Description**
2628-| -------- | -------- | ---------------
3139+| **Name** | **Type** | **Description** |
3140+| -------- | -------- | --------------- |
26293141 | chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian. |
26303142 | fips_status | u32 | Indicates if the command is FIPS approved or an error. |
26313143 | new_pl0_context_limit | u32 | Number of contexts assigned to PL0 after the reallocation |
26323144 | new_pl1_context_limit | u32 | Number of contexts assigned to PL1 after the reallocation |
26333145
26343146
2635-This allows the user to reallocate the 32 DPE contexts between PL0 and PL1. By default, each gets 16 contexts.
3147+This allows the user to reallocate the 64 DPE contexts between PL0 and PL1. By default, each gets 32 contexts.
26363148
26373149 **Note**: 2 PL0 contexts are used by Caliptra itself during initialization.
3150+
3151+### FE\_PROG
3152+
3153+Programs Field Entropy (FE) into one of 4 FE partitions in the OTP fuse controller. This command
3154+is typically used during device provisioning flows.
3155+
3156+**Note**: This command is only available when the device is in the **Production** lifecycle state.
3157+
3158+Command Code: `0x4645_5052` ("FEPR")
3159+
3160+*Table: `FE_PROG` input arguments*
3161+
3162+| **Name** | **Type** | **Description**
3163+| -------- | -------- | ---------------
3164+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
3165+| partition | u32 | FE partition number (valid values: 0–3).
3166+
3167+`FE_PROG` returns no output arguments other than the mailbox response header.
3168+
3169+### PRODUCTION\_AUTH\_DEBUG\_UNLOCK\_REQ
3170+
3171+Initiates the production debug unlock flow by generating a cryptographic challenge. The caller
3172+must solve the challenge by signing it with the appropriate ECC and MLDSA keys and returning
3173+the result via the [`PRODUCTION_AUTH_DEBUG_UNLOCK_TOKEN`](#production_auth_debug_unlock_token)
3174+command.
3175+
3176+This command performs the same function as the ROM's `AUTH_DEBUG_UNLOCK_REQ` command
3177+(documented in the [ROM README](../rom/dev/README.md#debug-unlock)), but is available at
3178+runtime.
3179+
3180+**Note**: This command requires the device to be in the **Production** lifecycle state and the
3181+`PROD_DEBUG_UNLOCK_REQ` bit in the `SS_DBG_MANUF_SERVICE_REG_REQ` register to be set.
3182+
3183+Command Code: `0x5044_5552` ("PDUR")
3184+
3185+*Table: `PRODUCTION_AUTH_DEBUG_UNLOCK_REQ` input arguments*
3186+
3187+| **Name** | **Type** | **Description**
3188+| -------- | -------- | ---------------
3189+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
3190+| length | u32 | Length of the payload in DWORDs.
3191+| unlock\_level | u8 | Debug unlock level (1–8).
3192+| reserved | u8[3] | Reserved.
3193+
3194+*Table: `PRODUCTION_AUTH_DEBUG_UNLOCK_REQ` output arguments*
3195+
3196+| **Name** | **Type** | **Description**
3197+| -------- | -------- | ---------------
3198+| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
3199+| fips\_status | u32 | Indicates if the command is FIPS approved or an error.
3200+| length | u32 | Length of the response payload in DWORDs.
3201+| unique\_device\_identifier | u8[32] | Device identifier of the Caliptra device. Byte array; pass through as-is to the token command.
3202+| challenge | u8[48] | Random challenge number generated by Caliptra. Byte array; pass through as-is to the token command.
3203+
3204+### PRODUCTION\_AUTH\_DEBUG\_UNLOCK\_TOKEN
3205+
3206+Completes the production debug unlock handshake by validating the caller's solution to the
3207+challenge generated by
3208+[`PRODUCTION_AUTH_DEBUG_UNLOCK_REQ`](#production_auth_debug_unlock_req). The caller must
3209+provide the device identifier and challenge from the previous request along with ECC-384 and
3210+ML-DSA-87 signatures proving possession of the authorized debug unlock key.
3211+
3212+Upon successful validation, Caliptra authorizes the debug unlock by setting the unlock level
3213+in the `SS_SOC_DBG_UNLOCK_LEVEL` register.
3214+
3215+This command performs the same function as the ROM's `AUTH_DEBUG_UNLOCK_TOKEN` command
3216+(documented in the [ROM README](../rom/dev/README.md#debug-unlock)), but is available at
3217+runtime.
3218+
3219+**Note**: This command requires a preceding successful `PRODUCTION_AUTH_DEBUG_UNLOCK_REQ` in
3220+the same boot session. The challenge is consumed on use and cannot be replayed.
3221+
3222+Command Code: `0x5044_5554` ("PDUT")
3223+
3224+*Table: `PRODUCTION_AUTH_DEBUG_UNLOCK_TOKEN` input arguments*
3225+
3226+| **Name** | **Type** | **Description**
3227+| -------- | -------- | ---------------
3228+| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
3229+| length | u32 | Length of the payload in DWORDs.
3230+| unique\_device\_identifier | u8[32] | Device identifier (must match value from challenge response). Byte array; copied verbatim from the challenge response.
3231+| unlock\_level | u8 | Debug unlock level (1–8, must match the original request).
3232+| reserved | u8[3] | Reserved.
3233+| challenge | u8[48] | Challenge (must match value from challenge response). Byte array; copied verbatim from the challenge response.
3234+| ecc\_public\_key | u8[96] | ECC P-384 public key (X &#124;&#124; Y, 48 bytes each). See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields).
3235+| mldsa\_public\_key | u8[2592] | ML-DSA-87 public key. See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields).
3236+| ecc\_signature | u8[96] | ECC P-384 signature over the SHA2-384 message digest. R (48 bytes) &#124; S (48 bytes). See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields).
3237+| mldsa\_signature | u8[4628] | ML-DSA-87 signature over the SHA2-512 message digest (4627 bytes + 1 reserved byte). See [Byte order of cryptographic fields](#byte-order-of-cryptographic-fields).
3238+
3239+The signed message for both ECC and ML-DSA signatures is the hash of the concatenation:
3240+`unique_device_identifier || unlock_level || reserved || challenge` (all as raw bytes).
3241+ECC uses SHA2-384; ML-DSA uses SHA2-512.
3242+
3243+`PRODUCTION_AUTH_DEBUG_UNLOCK_TOKEN` returns no output arguments other than the mailbox
3244+response header.
26383245
26393246 ## Checksum
26403247
@@ -2745,14 +3352,14 @@
27453352 To prevent this, we establish active context limits for each PAUSER
27463353 privilege level:
27473354
2748-* PL0 - 16 active contexts
2749-* PL1 - 16 active contexts
3355+* PL0 - 32 active contexts
3356+* PL1 - 32 active contexts
27503357
27513358 If a DPE command were to activate a new context such that the total number of
27523359 active contexts in a privilege level is above its active context limit, the
27533360 InvokeDpe command should fail.
27543361
2755-At boot Caliptra Runtime FW consumes part of the PL0 active contexts (initially 16) to DeriveContext for:
3362+At boot Caliptra Runtime FW consumes part of the PL0 active contexts (initially 32) to DeriveContext for:
27563363 - RTFW Journey (RTFJ) Measurement (1)
27573364 - Caliptra Configured Initialization Values digest (CCIV) (1)
27583365 - ROM Stashed Measurements (max 8)