Caliptra Common Commands

Overview

This document defines the common Caliptra device management commands. These commands are transport-agnostic and common across all vendors integrating the Caliptra subsystem. They are accessed via the following transport mechanisms:

For the unified software architecture that handles both paths, see Unified Caliptra Command Handling.

Command List

The following table describes the commands defined under this specification. There are two categories: (1) Required commands (R) that are mandatory for all implementations, (2) Optional commands (O) that may be utilized if the specific implementation requires it.

Device Information

Message NameR/ODescription
Firmware VersionRRetrieve firmware version information.
Device CapabilitiesRRetrieve device capabilities.
Device IDRRetrieve device ID.
Device InformationRRetrieve device information.

Logging

Message NameR/ODescription
Get Debug LogRRetrieve debug log.
Clear Debug LogRClear debug log.
Get Attestation LogORetrieve attestation measurement log.
Clear Attestation LogOClear attestation log (requires authorization).

Attestation

Message NameR/ODescription
Get AttestationORetrieve attestation evidence. Supports OCP EAT claims token and signed PCR quote formats.

Debug Unlock

Message NameR/ODescription
Request Debug UnlockORequest debug unlock in production environment.
Authorize Debug Unlock TokenOSend debug unlock token to device for authorization.

Lifecycle & Provisioning

Certificate Provisioning

Message NameR/ODescription
Export IDevID CSRRExport IDevID self-signed certificate signing request. Only available when device lifecycle state is Manufacturing.
Set Slot 0 CertRSet CA-signed IDevID certificate in slot 0 (Vendor PKI).
Get Slot 0 StateOCheck the provisioning state of certificate slot 0 (Vendor PKI).
Export Attested CSROExport attested CSR for a Caliptra device identity key (LDevID, FMC Alias, or RT Alias).

Device Lifecycle

Message NameR/ODescription
Program Field EntropyOProgram field entropy into the device. Requires authorization.
Device Ownership TransferOTransfer device ownership. Requires authorization.

Command Definitions

This section defines the request and response payloads for each command.

Firmware Version

Retrieves the version of the target firmware.

Request Payload:

Byte(s)NameTypeDescription
0:3area_indexu32Area Index:
- 00h = Caliptra core firmware
- 01h = MCU runtime firmware
- 02h = SoC firmware
Additional indexes are firmware-specific

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:35versionu8[32]Firmware Version Number in ASCII format

Device Capabilities

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:35capsu8[32]Device Capabilities:
- Bytes [0:7]: Reserved for Caliptra RT
- Bytes [8:11]: Reserved for Caliptra FMC
- Bytes [12:15]: Reserved for Caliptra ROM
- Bytes [16:23]: Reserved for MCU RT
- Bytes [24:27]: Reserved for MCU ROM
- Bytes [28:31]: Reserved

Device ID

This command retrieves the device ID.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:5vendor_idu16Vendor ID; LSB
6:7device_idu16Device ID; LSB
8:9subsystem_vendor_idu16Subsystem Vendor ID; LSB
10:11subsystem_idu16Subsystem ID; LSB

Device Information

This command retrieves information about the target device.

Request Payload:

Byte(s)NameTypeDescription
0:3info_indexu32Information Index:
- 00h = Unique Chip Identifier
Additional indexes are firmware-specific

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7data_sizeu32Size of the requested data in bytes
8:Ndatau8[data_size]Requested information in binary format

Export IDevID CSR

Exports the IDevID Certificate Signing Request (CSR) so that a Certificate Authority (CA) can endorse it and issue an IDevID certificate. The CSR is available in two algorithm variants: ECC P-384 and ML-DSA (post-quantum). This command is only available when the device lifecycle state is Manufacturing.

Request Payload:

Byte(s)NameTypeDescription
0:3algorithmu32Asymmetric Algorithm:
- 0x0000 = ECC P-384
- 0x0001 = ML-DSA-87

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7data_sizeu32Length in bytes of the valid data in the data field
8:Ndatau8[data_size]DER-encoded IDevID certificate signing request

Set Slot 0 Cert

Sets the CA-signed IDevID certificate in certificate slot 0 (Vendor slot). This is a one-time operation performed during manufacturing — the command will fail if slot 0 has already been provisioned.

Request Payload:

Byte(s)NameTypeDescription
0:3cert_sizeu32Size of the DER-encoded IDevID certificate.
4:Ncertu8[cert_size]DER-encoded CA-signed IDevID certificate

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status

Get Slot 0 State

Determines the provisioning state of certificate slot 0 (Vendor PKI). This slot holds the device identity certificate provisioned during manufacturing. For other certificate slots (Owner, Tenant), use the SPDM GET_DIGESTS command.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7stateu32Slot State:
- 0 = Not provisioned — slot does not have a certificate.
- 1 = Provisioned — slot has a certificate.

Get Debug Log

Retrieves the debug log for the RoT. The debug log contains RoT application information and machine state, useful for diagnostics and troubleshooting.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7data_sizeu32Size of the log data in bytes
8:Ndatau8[data_size]Debug log contents

The length is determined by the end of the log or the packet size based on device capabilities. If the response spans multiple messages, the end of the response will be determined by a message with a payload smaller than the maximum payload supported by both devices.

Debug Log Format:

The debug log reported by the device has no specified format, as this can vary between different devices and is not necessary for attestation. It is expected that diagnostic utilities for the device will be able to understand the exposed log information. A recommended entry format is provided here:

OffsetDescription
1:7Log Entry Header
8:9Format of the entry (e.g., 1 for current format)
10Severity of the entry
11Identifier for the component that generated the message
12Identifier for the entry message
13:16Message-specific argument
17:20Message-specific argument

Clear Debug Log

Clears the debug log in the RoT subsystem. No authorization is required.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status

Request Debug Unlock

Requests debug unlock in production environment.

Request Payload:

Byte(s)NameTypeDescription
0:3lengthu32Length of the message in DWORDs
4unlock_levelu8Debug unlock level (1-8)
5:7reservedu8[3]Reserved field

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7lengthu32Length of the message in DWORDs
8:39unique_device_identifieru8[32]Device identifier of the Caliptra device
40:87challengeu8[48]Random number challenge

Authorize Debug Unlock Token

Authorizes the debug unlock token.

Request Payload:

Byte(s)NameTypeDescription
0:3lengthu32Length of the message in DWORDs
4:35unique_device_identifieru8[32]Device identifier of the Caliptra device
36unlock_levelu8Debug unlock level (1-8)
37:39reservedu8[3]Reserved field
40:87challengeu8[48]Random number challenge
88:183ecc_public_keyu32[24]ECC public key in hardware format (little endian)
184:2635mldsa_public_keyu32[648]MLDSA public key in hardware format (little endian)
2636:2731ecc_signatureu32[24]ECC P-384 signature of the message hashed using SHA2-384 (R and S coordinates)
2732:6195mldsa_signatureu32[1157]MLDSA signature of the message hashed using SHA2-512 (4627 bytes + 1 reserved byte)

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status

Export Attested CSR

Exports an attested Certificate Signing Request (CSR) for a specified device key.

Request Payload:

Byte(s)NameTypeDescription
0:3device_key_idu32Device Key Identifier:
- 0x0001 = LDevID
- 0x0002 = FMC Alias
- 0x0003 = RT Alias
4:7algorithmu32Asymmetric Algorithm:
- 0x0000 = ECC P-384
- 0x0001 = ML-DSA-87

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status
4:7data_sizeu32Length in bytes of the attested CSR data
8:Ndatau8[data_size]Attested CSR data blob

Program Field Entropy

Programs field entropy into the device. Requires authorization.

Request Payload:

Byte(s)NameTypeDescription
0:Nentropyu8[N]Field entropy data

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status

Device Ownership Transfer

Transfers device ownership. Requires authorization.

Request Payload: TBD

Response Payload:

Byte(s)NameTypeDescription
0:3completion_codeu32Command completion status

Completion Codes

Command responses include a completion code indicating the result of the operation. Standard codes (0x00-0x0F) follow the OCP command registry. Codes 0xC0-0xFF are reserved for Caliptra project-specific errors.

OCP Standard Codes

CodeNameDescription
0x00SuccessCommand completed successfully
0x01General ErrorUnspecified error
0x02Invalid ParameterOne or more parameters are invalid
0x03Invalid LengthRequest/response length mismatch
0x04Invalid IdentifierUnknown or invalid identifier
0x05Operation FailedOperation could not be completed
0x06Insufficient ResourcesNot enough resources to complete command
0x07Unsupported OperationCommand is not supported
0x08Device Not ReadyDevice is not ready to process command
0x09Invalid Command VersionCommand version not supported
0x0AInvalid Payload SizePayload size does not match expected
0x0BTimeoutOperation timed out
0x0CAccess DeniedAuthorization required
0x0DResource UnavailableRequested resource is not available
0x0EPolicy ViolationOperation violates configured policy
0x0FInvalid StateDevice is not in the correct state

Caliptra Project-Specific Codes (0xC0-0xFF)

CodeNameDescription
0xC0Caliptra Mailbox BusyCaliptra mailbox is not ready
0xC1Caliptra Buffer Too SmallResponse buffer too small