Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SPI Flash Layout

Overall, the SPI Flash consists of a Header, Checksum and an Image Payload (which includes the image information and the image binary).

The specific images of the flash consists of the Caliptra FW, MCU RT, SoC Manifest, and other SoC images, if any.

Layout

Note: All fields are little-endian byte-ordered unless specified otherwise.

A typical overall flash layout is:

Flash Layout
Header
Payload

The Payload contains the following fields:

Payload
Image Info (Caliptra FMC + RT)
Image Info (SoC Manifest)
Image Info (MCU RT)
Image Info (SoC Image 1)
...
Image Info (SoC Image N)
Caliptra FMC + RT Package
SoC Manifest
MCU RT
SoC Image 1
...
SoC Image N

The Header section contains the metadata for the images.

FieldSize (bytes)Description
Magic Number4A unique identifier to mark the start of the header.
The value must be 0x464C5348 ("FLSH" in ASCII) for flash or 0x54465450 ("TFTP" in ASCII) for Network Boot
Header Version2The header version format, allowing for backward compatibility if the package format changes over time.
(Current version is 0x0002)
Image Count2The number of images contained in the Payload.
Each image will have its own image information section.
Payload Offset4Offset in bytes of the header to where the first byte of the Payload is located.
Header Checksum4Checksum calculated for the header excluding this field

Image Information

The Image Information section is repeated for each image and provides detailed manifest data specific to that image.

FieldSize (bytes)Descr
Identifier4Vendor selected unique value to distinguish between images.
0x00000000: Caliptra FMC+RT
0x00000001: SoC Manifest
0x00000002: MCU RT
0x00001000-0xFFFFFFFF - Reserved for other Vendor-defined SoC images
ImageLocationOffset4Offset in bytes from byte 0 of the header to where the image content begins. Used in flash-based boot.
Size4Size in bytes of the image. This is the actual size of the image without padding.
The image itself as written to the flash should be 4-byte aligned and additional
padding will be required to guarantee alignment.
Filename64Used in network boot to specify the TFTP path relative to the TFTP server root. Field is not used in flash-based boot
Image Checksum4Checksum calculated for the binary image.
Image Info Checksum4Checksum calculated for the header excluding this field

Image

The images (raw binary data) are appended after the Image Information section, and should be in the same order as their corresponding Image Information.

FieldSize (bytes)Description
DataNImage content.
Note: The image should be 4-byte aligned.
If the size of a firmware image is not a multiple of 4 bytes,
0x00 padding bytes will be added to meet the alignment requirement.
Only used in flash-based boot