Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mailbox documentation for commands used by MCU Image Loading (Caliptra 2.0) #1888

Merged
merged 6 commits into from
Jan 22, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,70 @@ Command Code: `0x4154_5348` ("ATSH")
| fips_status | u32 | Indicates if the command is FIPS approved or an error. |
| auth_req_result | u32 |AUTHORIZE_IMAGE (0xDEADC0DE), IMAGE_NOT_AUTHORIZED (0x21523F21) or IMAGE_HASH_MISMATCH (0x8BFB95CB)
mlvisaya marked this conversation as resolved.
Show resolved Hide resolved

### GET_IMAGE_LOAD_ADDRESS

The MCU uses this command to retrieve the AXI load address of a SoC Image identified by the firmware id. The address is retrieved from the SoC Manifest loaded by Caliptra.

Command Code: `0x494D_4C41` ("IMLA")

*Table: `GET_IMAGE_LOAD_ADDRESS` input arguments*

| **Name** | **Type** | **Description**
| -------------- | -------------- | ---------------------------------------------------------------------------
| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
| fw_id | u8[4] | Firmware id of the image, in little-endian format

*Table: `GET_IMAGE_LOAD_ADDRESS` output arguments*

| **Name** | **Type** | **Description**
| ----------------- | -------------- | --------------------------------------------------------------------------
| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
| fips_status | u32 | Indicates if the command is FIPS approved or an error.
| load_address_high | u32 | The higher 4 bytes of the 64-bit AXI load address.
| load_address_low | u32 | The lower 4 bytes of the 64-bit AXI load address.

### GET_IMAGE_LOCATION_OFFSET

The MCU uses this command to retrieve the offset where it can find the location of the image blob for a SoC Image from the flash storage partition or firmware update package.
mlvisaya marked this conversation as resolved.
Show resolved Hide resolved

Command Code: `0x494D_4C4F` ("IMLO")

*Table: `GET_IMAGE_LOCATION_OFFSET` input arguments*

| **Name** | **Type** | **Description**
| -------------- | -------------- | ---------------------------------------------------------------------------
| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
| fw_id | u8[4] | Firmware id of the image, in little-endian format

*Table: `GET_IMAGE_LOCATION_OFFSET` output arguments*

| **Name** | **Type** | **Description**
| ----------------- | -------------- | --------------------------------------------------------------------------
| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
| fips_status | u32 | Indicates if the command is FIPS approved or an error.
| offset | u32 | The offset in flash storage partition or firmware update package offset where the SoC image resides.

### GET_IMAGE_SIZE

The MCU uses this command to retrieve the size (in bytes) of a SoC Image.

Command Code: `0x494D_535A` ("IMSZ")

*Table: `GET_IMAGE_SIZE` input arguments*

| **Name** | **Type** | **Description**
| -------------- | -------------- | ---------------------------------------------------------------------------
| chksum | u32 | Checksum over other input arguments, computed by the caller. Little endian.
| fw_id | u8[4] | Firmware id of the image, in little-endian format

*Table: `GET_IMAGE_SIZE` output arguments*

| **Name** | **Type** | **Description**
| ----------------- | -------------- | --------------------------------------------------------------------------
| chksum | u32 | Checksum over other output arguments, computed by Caliptra. Little endian.
| fips_status | u32 | Indicates if the command is FIPS approved or an error.
| size | u32 | The size in bytes of the SoC Image

## Mailbox commands: Cryptographic Mailbox (2.0)

These commands are used by the [Cryptograhic Mailbox](#cryptographic-mailbox-commands-new-in-20) system.
Expand Down