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.

Transport-specific command codes are defined by the transport documents. This document defines the common command names, transport assignment, and payload semantics.

Transport Selection

Commands are assigned to MCTP VDM IANA when they do not require SPDM authorization, SPDM-defined semantics, or SPDM streaming/chunking. Commands are assigned to SPDM VDM IANA when they require those properties. The MCI mailbox provides the in-band path for the same common command semantics where implemented.

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.

Message NameR/OTransport(s)Description
Firmware VersionRMCTP VDM, MCI MailboxRetrieve firmware version information.
Device CapabilitiesRMCTP VDM, MCI MailboxRetrieve device capabilities.
Get Debug LogRMCTP VDM, MCI MailboxRetrieve debug log.
Clear Debug LogRMCTP VDM, MCI MailboxClear debug log.
Get AttestationOSPDM VDM, MCI MailboxRetrieve signed attestation evidence in a requester-selected format.
Request Debug UnlockOSPDM VDM, MCI MailboxRequest debug unlock in production environment.
Authorize Debug Unlock TokenOSPDM VDM, MCI MailboxSend debug unlock token to device for authorization.
Export Attested CSROSPDM VDM, MCI MailboxExport attested CSR for a Caliptra device identity key (LDevID, FMC Alias, or RT Alias).
Authorization-Gated SubcommandsOSPDM VDM, MCI MailboxSecurity-sensitive provisioning and fuse subcommands. SPDM VDM uses a one-use challenge and hybrid signature.

Authorization-Gated Subcommands

The following subcommands are assigned to the SPDM VDM IANA authorization-gated path and are also available through the MCI mailbox path where implemented. SPDM VDM requests use the challenge and hybrid-signature flow described in Caliptra SPDM VDM Commands. For the MCI mailbox path, access control is governed by the mailbox security boundary and platform policy.

Subcommand NameTransport(s)Description
Get Auth ChallengeSPDM VDM IANA, MCI MailboxChallenge acquisition for authorization-gated use.
Provision Vendor PK HashSPDM VDM IANA, MCI MailboxProvision vendor public key hash.
Fuse Increase Caliptra Min SVNSPDM VDM IANA, MCI MailboxIncrease Caliptra minimum SVN.
Program Field EntropySPDM VDM IANA, MCI MailboxProgram field entropy.
Fuse Revoke Vendor Public KeySPDM VDM IANA, MCI MailboxRevoke vendor public key.
Fuse Revoke Vendor PK HashSPDM VDM IANA, MCI MailboxRevoke vendor public key hash.
Fuse Lock PartitionSPDM VDM IANA, MCI MailboxLock fuse partition.
Dot LockSPDM VDM IANA, MCI MailboxLock the DOT after ownership validation.
Dot DisableSPDM VDM IANA, MCI MailboxDisable DOT while preserving ownership state.
Dot RotateSPDM VDM IANA, MCI MailboxRotate ownership keys and increment the epoch.
Get Dot Backup BlobSPDM VDM IANA, MCI MailboxExport the current DOT backup blob.

Command Definitions

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

Common response payload tables describe command-specific response data only. They exclude transport-specific status and framing fields such as SPDM VDM completion codes, MCTP VDM completion codes, MCI mailbox chksum, MCI mailbox fips_status, and MCI mailbox variable-length data_len headers.

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 = Optional integrator-defined aggregate SoC firmware-set version
Additional indexes are firmware-specific

Response Payload:

Byte(s)NameTypeDescription
0:31versionu8[32]Firmware Version Number in ASCII format

Versions use major.minor.patch ASCII format. Index 02h returns UnsupportedOperation when the integrator does not provide a single aggregate SoC firmware-set version. Individual SoC component versions may use firmware-specific additional indexes.

Device Capabilities

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:7caliptra_rtu64Caliptra Runtime capabilities, copied from Core, big-endian
8:11caliptra_fmcu32Caliptra FMC capabilities, copied from Core, big-endian
12:15caliptra_romu32Caliptra ROM capabilities, copied from Core, big-endian
16:19mcu_romu32MCU ROM capabilities, big-endian
20:23mcu_rtu32MCU Runtime feature capabilities, big-endian
24:27external_commandsu32Supported top-level common commands, big-endian
28:31authorized_subcommandsu32Supported subcommands under AuthorizedCommand, big-endian
32:35reservedu8[4]Reserved; responders set to zero

external_commands covers the OCP command codes 01h through 20h. Command code N maps to bitmap bit N - 1, allowing all 32 top-level codes to fit in this field. This is Caliptra common-command discovery carried by DeviceCapabilities; it is not MCTP Control Protocol command discovery.

External Common-Command Capability Flags:

Bitmap BitCommand CodeCommandTransport
001hFirmwareVersionMCTP VDM
102hDeviceCapabilitiesMCTP VDM
203hGetDebugLogMCTP VDM
304hClearDebugLogMCTP VDM
405hGetAttestationSPDM VDM, MCU mailbox
506hRequestDebugUnlockSPDM VDM
607hAuthorizeDebugUnlockTokenSPDM VDM
708hExportAttestedCsrSPDM VDM
1611hDeviceOwnershipTransferSPDM VDM
1712hAuthorizedCommandSPDM VDM

This table defines the bit assignment for every allocated command code. A responder sets a bit only when the corresponding command is implemented. GetAttestation is set when a responder that carries it is built and the device can produce at least one evidence format. AuthorizedCommand is set when its wrapper and at least one authorized subcommand are implemented.

Authorized-Subcommand Capability Flags:

Bitmap BitSubcommandStatus
0GetAuthChallengeImplemented
1ProvisionVendorPkHashImplemented
2FuseIncreaseCaliptraMinSvnImplemented
3ProgramFieldEntropyImplemented
4FuseRevokeVendorPublicKeyImplemented
5FuseRevokeVendorPkHashImplemented
6FuseLockPartitionImplemented
7ProvisionOwnerPkHashImplemented
8DotLockImplemented
9DotDisableImplemented
10DotRotateImplemented
11GetDotBackupBlobImplemented
12:31Reserved

The authorized-subcommand assignments are stable capability indexes; they are not transport command IDs. A responder sets a bit only when that subcommand is implemented under AuthorizedCommand. Authorization, lifecycle, or policy restrictions do not clear an implementation capability bit; execution can still return AccessDenied, PolicyViolation, or InvalidState.

MCU Runtime Capability Flags:

BitNameDescription
0FLASH_BOOTMCU Runtime supports flash-based image loading
1STREAMING_BOOTMCU Runtime supports streaming image loading
2FIRMWARE_UPDATEMCU Runtime supports firmware update
3SPDM_RESPONDERMCU Runtime includes the SPDM responder
4MCTP_VDM_RESPONDERMCU Runtime includes the MCTP VDM responder
5USERSPACE_DEBUG_LOGMCU Runtime includes userspace debug logging
6MCI_MAILBOX_SERVICEMCU Runtime includes the external MCI mailbox service
7DOEMCU Runtime includes the DOE transport

The mcu_rom field is reserved for a future versioned ROM-to-Runtime capability handoff. Until that handoff is specified, responders set mcu_rom to zero and the following assignments are not advertised.

Proposed MCU ROM Capability Flags:

BitNameDescription
0STREAMING_BOOT_I3CMCU ROM supports streaming boot over I3C
1FLASH_BOOTMCU ROM supports flash boot
2NETWORK_BOOTMCU ROM supports network boot

Get Debug Log

Retrieves the debug log for the MCU Runtime.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:3more_datau321 if more log data remains
4:7data_sizeu32Size of the valid log data in bytes
8:Ndatau8[data_size]Debug log contents

For defmt-based debug logs, the device exposes a sequential drain interface rather than random access to individual log entries. Callers drain the debug log by repeating this command until more_data is 0. Each response contains zero or more complete defmt frames. The host concatenates the returned data and decodes the resulting frame stream using the matching firmware ELF.

Debug Log Format:

The debug log payload is an opaque byte stream. For the MCU Runtime debug log, the current implementation uses the defmt crate. Each defmt log macro emits one complete rzCOBS-encoded frame, and the MCU runtime logging backend appends that complete frame as one flash log entry. Get Debug Log returns the concatenated raw frame bytes.

The device does not store human-readable log strings in the debug log. A host tool decodes the returned byte stream with defmt-decoder or defmt-print using the exact app's ELF that produced the log; the ELF .defmt section contains the interned format strings and metadata required to render readable messages.

Clear Debug Log

Clears the debug log in the MCU Runtime. No authorization is required.

Request Payload: Empty

Response Payload: Empty. Command completion status is carried by the transport-specific response framing.

Get Attestation

Retrieves signed attestation evidence bound to a requester-supplied nonce.

The requester selects the evidence format at runtime. The set of formats a device can produce is fixed at build time by the evidence generators it links. A requester discovers that set with the format-discovery query below.

All formats are signed with the device attestation key that terminates the device's SPDM certificate chain. Evidence retrieved over the MCI mailbox verifies against a certificate chain retrieved over SPDM, and the reverse.

Evidence Formats

ValueNameDescription
0x0000(query)Reserved. Selects the format-discovery query.
0x0001OCP EATSigned OCP Entity Attestation Token (COSE_Sign1) carrying OCP EAT profile claims.
0x0002PCR QuoteCaliptra PCR quote.

A device that supports a format need not support it under every algorithm. The OCP EAT signer emits ES384 only; ML-DSA-87 EATs are not implemented yet. A request naming an unsupported (evidence_format, algorithm) pair returns UNSUPPORTED_OPERATION and no evidence is generated.

PKI Entity Slot

pki_entity_slot names the PKI entity whose hierarchy endorses the signing key.

ValueNameDescription
0x0000VendorDevice manufacturer hierarchy.
0x0001OwnerOwner hierarchy. Reserved.

A value not listed above returns INVALID_PARAMS. Owner is reserved and returns UNSUPPORTED_OPERATION today: signing is not yet slot-aware, so every entity would resolve to the same vendor key, and serving it would return evidence claiming an endorsement that was never selected or provisioned. Once signing is slot-aware, whether an entity can be served follows the provisioning state of its endorsement slot.

Format Discovery

A request with evidence_format = 0x0000 is a query, not an evidence request. The device returns a bitmap of the formats it can produce instead of evidence. Bit n of the bitmap is set when the device supports the format whose wire value is n; bit 0 is never set.

The supported set depends on which evidence generators the integrator built into the device. A requester issues this query before requesting evidence rather than inferring the set from DeviceCapabilities.

Request Payload:

Byte(s)NameTypeDescription
0:3evidence_formatu32Requested evidence format, or 0x0000 for the format-discovery query
4:7algorithmu32Asymmetric Algorithm:
- 0x0001 = ECC P-384
- 0x0002 = ML-DSA-87
Ignored for the query request
8:11pki_entity_slotu32PKI entity:
- 0x0000 = Vendor
- 0x0001 = Owner
Ignored for the query request
12:43nonceu8[32]Nonce bound into the signed evidence for freshness. Ignored for the query request.

For the query request, algorithm, pki_entity_slot, and nonce are ignored. For an evidence request, a value outside the tables above returns INVALID_PARAMS.

Response Payload:

Byte(s)NameTypeDescription
0:3evidence_formatu32Echo of the requested evidence_format
4:Ndatau8[]For a format request: the signed evidence blob. For the query (evidence_format = 0x0000): a u32 bitmap of supported formats.

The evidence blob is variable length, delimited by the transport's length field. The transports scope that field differently:

TransportLength fieldCounts
SPDM VDMdata_len, framed after evidence_formatThe evidence bytes only
MCI MailboxMailboxRespHeaderVarSize.data_lenThe evidence_format field plus the evidence bytes

For the MCI mailbox the evidence length is therefore data_len - 4.

Truncated evidence cannot pass signature verification, so a device that cannot fit the evidence in the response buffer fails the command instead.

Transport Sizing

Attestation evidence is variable length, and its size depends on which evidence generators the integrator builds into the device. Each transport sizes its response buffer from those generators:

  • SPDM VDM reserves the size the requested format needs. Evidence that does not fit in a single message is returned over the large-response (chunked) path. The advertised MaxSPDMmsgSize must cover the largest evidence the device can produce. See SPDM VDM commands.
  • MCI Mailbox sizes the GET_ATTESTATION response buffer for the largest supported evidence. Other commands' response buffers are unaffected.

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:3lengthu32Length of the message in DWORDs
4:35unique_device_identifieru8[32]Device identifier of the Caliptra device
36:83challengeu8[48]Random number challenge

Authorize Debug Unlock Token

Authorizes the debug unlock token. The request body is identical for MCI mailbox and SPDM VDM transports. The requester computes the leading checksum field as the Caliptra RT mailbox request checksum so the unified command handler can relay the complete request unchanged.

Request Payload:

Byte(s)NameTypeDescription
0:3checksumu32Requester-computed Caliptra RT mailbox request checksum (MailboxReqHeader.checksum)
4:7lengthu32Length of the message in DWORDs
8:39unique_device_identifieru8[32]Device identifier of the Caliptra device
40unlock_levelu8Debug unlock level (1-8)
41:43reservedu8[3]Reserved field
44:91challengeu8[48]Random number challenge
92:187ecc_public_keyu32[24]ECC public key in hardware format (little endian)
188:2639mldsa_public_keyu32[648]MLDSA public key in hardware format (little endian)
2640:2735ecc_signatureu32[24]ECC P-384 signature of the message hashed using SHA2-384 (R and S coordinates)
2736:6199mldsa_signatureu32[1157]MLDSA signature of the message hashed using SHA2-512 (4627 bytes + 1 reserved byte)

Response Payload: Empty. Command completion status is carried by the transport-specific response framing.

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:
- 0x0001 = ECC P-384
- 0x0002 = ML-DSA-87
8:39nonceu8[32]32-byte nonce for freshness

Response Payload:

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

Authorization-Gated Subcommand Wrapper

Security-sensitive provisioning and fuse subcommands are assigned to the SPDM VDM IANA authorization-gated path and the MCI mailbox path. The SPDM VDM transport uses an Authorized Command wrapper. Its requester first obtains a one-use 48-byte challenge, then appends a hybrid signature over sub_cmd_id(BE) || sub_payload || challenge. See Caliptra SPDM VDM Commands for the byte-exact transport payloads.

Request Payload

Byte(s)NameTypeDescription
0:3sub_cmd_idu32Subcommand identifier defined by the SPDM VDM spec.
4:Nsub_payloadu8[N]Subcommand-specific payload.

Response Payload

Byte(s)NameTypeDescription
0completion_codeu8OCP completion code (0x00 = Success, 0x0C = Access Denied).
1:Nsub_responseu8[N]Subcommand-specific response data, absent if completion_code != 0x00.

The subcommands covered by this wrapper are listed in Authorization-Gated Subcommands.

DotLock, DotDisable, DotRotate, and GetDotBackupBlob are the DOT-family subcommands that use this authorization wrapper. The remaining DOT commands (DotUnlockChallenge, DotUnlock, DotStatus, DotRecovery, DotOverrideChallenge, and DotOverride) are native device-ownership-transfer commands carried under top-level command 0x11 rather than via the AuthorizedCommand wrapper.

Subcommand-specific payloads are defined by the corresponding command specifications and contain no mailbox request header.

Get Auth Challenge

Requests a one-use challenge for authorization-gated commands.

Request Payload: Empty

Response Payload:

Byte(s)NameTypeDescription
0:47challengeu8[48]One-use command authorization challenge.

Provision Vendor PK Hash

Provisions the vendor public key hash.

Request Payload: slot:u32 | hash:u8[48] | HybridSignature

Response Payload: Empty

Fuse Increase Caliptra Min SVN

Increases the Caliptra minimum SVN.

Request Payload: flags:u32 | svn:u32 | HybridSignature

Response Payload: Empty

Program Field Entropy

Programs field entropy.

Request Payload: partition:u32 | HybridSignature

Response Payload: Empty

Fuse Revoke Vendor Public Key

Revokes a vendor public key.

Request Payload: reserved:u32 | slot:u32 | key_type:u32 | key_index:u32 | HybridSignature

Response Payload: Empty

Fuse Revoke Vendor PK Hash

Revokes a vendor public key hash.

Request Payload: reserved:u32 | slot:u32 | HybridSignature

Response Payload: Empty

Fuse Lock Partition

Locks a fuse partition.

Request Payload: TBD

Response Payload: TBD

Device Ownership Transfer (DOT)

The device-ownership-transfer family is carried under the top-level DeviceOwnershipTransfer command (0x11). This family uses the DOT FourCC namespace and is split between authorization-gated and native commands:

  • Authorization-gated: MDLK (DotLock), MDDS (DotDisable), MDRT (DotRotate), MDBB (GetDotBackupBlob)
  • Native: MDUC (DotUnlockChallenge), MDUL (DotUnlock), MDST (DotStatus), MDRC (DotRecovery), DOTW (DotOverrideChallenge), DOTX (DotOverride)

The authorization-gated DOT commands are sent via the AuthorizedCommand wrapper and are rejected if delivered directly under 0x11. The native DOT commands perform challenge-and-signature verification against the current ownership blob or the recovery-key hash, as appropriate for the command.

FourCCCommandPathDescription
MDLKDotLockAuthorizedLock DOT after validating the CAK/LAK ownership state.
MDDSDotDisableAuthorizedDisable DOT while preserving the ownership blob.
MDRTDotRotateAuthorizedRotate ownership state and advance the DOT epoch.
MDBBGetDotBackupBlobAuthorizedExport a valid backup copy of the active DOT blob.
MDUCDotUnlockChallengeNativeRequest the unlock challenge for a valid ODD DOT state.
MDULDotUnlockNativeComplete ownership unlock using the stored LAK and challenge signatures.
MDSTDotStatusNative/read-onlyReturn the current DOT status and fuse state.
MDRCDotRecoveryNativeRestore DOT from a previously backed-up blob.
DOTWDotOverrideChallengeNativeStart DOT recovery using the recovery-key challenge flow.
DOTXDotOverrideNativeComplete DOT recovery by verifying the hybrid recovery signature.

See DOT Commands for the detailed state machine, validation rules, and command sequencing.

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