6#ifndef TT_BUNDLE_LOADER_H
7#define TT_BUNDLE_LOADER_H
18#define FW_BUNDLE_MANIFEST_UNUSED_WORD (0xA5A5A5A5U)
21#define MANIFEST_ID_BL1 (0x314c4254U)
24#define MANIFEST_ID_MIS (0x324c4254U)
27#define FW_BUNDLE_TOC_ID (0x434f5450U)
30#define TT_BUN1_STAGING_AREA_ADDR 0xc0066400UL
33#define TT_BUN2_STAGING_AREA_ADDR 0xc0066400UL
36#define TT_BUN3_STAGING_AREA_ADDR 0xc0066400UL
39#define FW_BUNDLE_ENCRYPTION_TYPE_AES (0x01)
42#define FW_BUNDLE_SIGNATURE_TYPE_RSA (0x01)
45#define FW_BUNDLE_SIGNATURE_TYPE_ECC_P256 (0x02)
48#define FW_BUNDLE_FUSE_KEY_SEL_ROM (0x0)
51#define FW_BUNDLE_FUSE_KEY_SEL_PUBK_HASH0 (0x1)
54#define FW_BUNDLE_FUSE_KEY_SEL_PUBK_HASH1 (0x2)
57#define FW_BUNDLE_FUSE_KEY_SEL_SOP_PUBK (0x4)
60#define FW_BUNDLE_FUSE_KEY_SEL_SYS_PUBK (0x5)
63#define FW_BUNDLE_IMG_TYPE_SEP_BL1 (0x0000314c42504553ULL)
66#define FW_BUNDLE_IMG_TYPE_SEP_MIS (0x0000324c42504553ULL)
69#define FW_BUNDLE_IMG_TYPE_SMC_BL0P5 (0x3550304c42434d53ULL)
72#define FW_BUNDLE_IMG_TYPE_SMC_BL1 (0x0000314c42434d53ULL)
75#define FW_BUNDLE_IMG_TYPE_SMC_MIS (0x0000324c42434d53ULL)
Definition tt_bundle_loader.h:186
union fw_bundle_sem_ver manifest_content_version
Version for the payload described by this manifest.
Definition tt_bundle_loader.h:333
uint8_t signature[384]
The signature over all preceding fields in the manifest. The type of signature contained in this fiel...
Definition tt_bundle_loader.h:350
uint32_t manifest_length
The Length of the manifest in bytes Manifest version 1.0 is 1184 bytes. The manifest will always be a...
Definition tt_bundle_loader.h:219
int64_t payload_offset
Offset in bytes from the start of the manifest to the start of the payload. This field may be updated...
Definition tt_bundle_loader.h:362
uint16_t security_version
Security version of the manifest Used for anti-rollback protection. Must be a monotonically increasin...
Definition tt_bundle_loader.h:266
uint8_t manifest_description[128]
ASCII NULL terminated string describing the manifest and payload. This is provided to make identifica...
Definition tt_bundle_loader.h:342
uint16_t reserved_0
Reserved - must be 0.
Definition tt_bundle_loader.h:258
union fw_bundle_unauthed_flags flags
Unauthenticated flags field.
Definition tt_bundle_loader.h:365
uint8_t encryption_iv[32]
Encryption initial vector Only valid when encrypted_payload = 1.
Definition tt_bundle_loader.h:250
uint8_t signature_type
Signature algorithm, including padding/hash used for signature of the manifest. Ignored when boot is ...
Definition tt_bundle_loader.h:287
union fw_bundle_public_key_sel public_key_sel
Public key selector requested by software. This field contains the index of the public key to be used...
Definition tt_bundle_loader.h:295
uint32_t reserved
Reserved. Must be 0x0.
Definition tt_bundle_loader.h:222
union fw_bundle_auth_flags authenticated_flags
Authenticated flags.
Definition tt_bundle_loader.h:245
uint8_t manifest_hash[32]
SHA-256 hash over the signed region of the manifest. This hash is required for both secure and non-se...
Definition tt_bundle_loader.h:355
int64_t timestamp
Unix timestamp (64 bit) of the creation time of the manifest. When secure_boot == 1 this is the times...
Definition tt_bundle_loader.h:322
uint64_t payload_hashed_length
Number of bytes of the payload that are covered by payload_hash. For encrypted payloads this length m...
Definition tt_bundle_loader.h:316
uint32_t manifest_identifier
The manifest identifier The manifest_identifier is used to identify which boot stage payload this man...
Definition tt_bundle_loader.h:196
uint64_t selector_bits
selector bits
Definition tt_bundle_loader.h:225
uint16_t manifest_version_major
The major version of the manifest Major version of the manifest format that the manifest conforms to....
Definition tt_bundle_loader.h:206
uint8_t payload_hash[32]
SHA-256 hash digest of the portion of the payload covered by this hash. See payload_hashed_length for...
Definition tt_bundle_loader.h:307
uint8_t package_id[32]
Package identifier Package identifier value which is compared against the PACKAGE_ID value stored in ...
Definition tt_bundle_loader.h:239
uint8_t encryption_type
Encryption algorithm Used when authenticated_flags.encrypted_payload == 1. Allowed values: FW_BUNDLE_...
Definition tt_bundle_loader.h:276
uint8_t encryption_kdf_input[32]
Key Derivation Function's input to derive the key used for encryption Only valid when encrypted_paylo...
Definition tt_bundle_loader.h:255
union fw_bundle_lc_state lifecycle_states
lifecycle state control
Definition tt_bundle_loader.h:242
uint8_t public_key[384]
Public key used for authentication. This field is sized to support the maximum size key which is RSA ...
Definition tt_bundle_loader.h:302
uint64_t payload_length
Length of payload in bytes. The payload consists of all data between payload_offset and payload_offse...
Definition tt_bundle_loader.h:330
uint8_t reserved_1[12]
Reserved, must be 0.
Definition tt_bundle_loader.h:368
uint16_t manifest_version_minor
The minor version of the manifest Minor version of the manifest format. Current minor version is 0.
Definition tt_bundle_loader.h:211
uint8_t chiplet_id[32]
Chiplet identifier Chiplet identifier value which is compared against the CHIPLET_ID value stored in ...
Definition tt_bundle_loader.h:232
Definition tt_bundle_loader.h:371
uint64_t offset
Offset from the start of the payload to the start of this image. Must be a multiple of 8.
Definition tt_bundle_loader.h:378
uint64_t entry_point
Entry point for this image. Interpreted on a per-image type basis, may be in different address space ...
Definition tt_bundle_loader.h:400
uint64_t load_addr
Load address for this image. Load address for this image. Interpreted on a per-image type basis....
Definition tt_bundle_loader.h:394
uint64_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:403
union fw_bundle_sem_ver version
version for the image described by this TOC entry.
Definition tt_bundle_loader.h:388
uint8_t hash[32]
SHA-256 hash over this image.
Definition tt_bundle_loader.h:406
uint8_t description[128]
ASCII NULL terminated string describing the manifest and payload. This is provided to make identifyin...
Definition tt_bundle_loader.h:415
uint64_t length
Length in bytes of this image This image occupies the space in the payload starting at offset bytes f...
Definition tt_bundle_loader.h:385
uint64_t type
Defines type of image, as well as the destination component.
Definition tt_bundle_loader.h:373
The table of contents present in the FW bundle payload.
Definition tt_bundle_loader.h:419
uint16_t toc_version_major
Major version of the TOC format. Current major version is 1. Changes to the major version indicate a ...
Definition tt_bundle_loader.h:430
uint64_t image_count
Number of images in the payload and TOC. The length of the TOC is determined by this.
Definition tt_bundle_loader.h:453
uint64_t payload_length
Length of the cleartext payload in bytes. This size includes the TOC, all images, and any (optional) ...
Definition tt_bundle_loader.h:448
uint32_t toc_identifier
The toc identifier string. Must be FW_BUNDLE_TOC_ID.
Definition tt_bundle_loader.h:421
uint64_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:456
uint16_t toc_version_minor
Minor version of the TOC format. Current minor version is 0.
Definition tt_bundle_loader.h:435
struct fw_bundle_toc_entry entries[]
The TOC entries, image_count of them, immediately following this header.
Definition tt_bundle_loader.h:461
struct fw_bundle_manifest __packed
Authenticated flags field Some sub-fields in flags are subject to bits in the selector_bits field.
Definition tt_bundle_loader.h:107
uint32_t encrypted_payload
Payload is encrypted.
Definition tt_bundle_loader.h:116
uint32_t security_version_update
Update the hardware security version to match security_version.
Definition tt_bundle_loader.h:119
struct fw_bundle_auth_flags::@212342336070306150061046366247137174002130132024 f
uint32_t reserved
Reserved, must be 0.
Definition tt_bundle_loader.h:122
uint32_t bl1_demotion
BL1 demotion request, only valid when selector_bits[17] is 1.
Definition tt_bundle_loader.h:113
uint32_t u32_all
The field as a u32.
Definition tt_bundle_loader.h:109
Lifecycle state selection This field controls whether or not this image is loaded on a device based o...
Definition tt_bundle_loader.h:82
uint32_t prod_end
lifecycle state PROD_END allowed
Definition tt_bundle_loader.h:93
uint32_t prod
lifecycle state PROD allowed
Definition tt_bundle_loader.h:90
struct fw_bundle_lc_state::@007342372273322205337035164032007373244103363012 f
uint32_t rma_sip
lifecycle state RMA_SIP allowed
Definition tt_bundle_loader.h:96
uint32_t rma_chiplet
lifecycle state RMA_CHIPLET allowed
Definition tt_bundle_loader.h:99
uint32_t u32_all
The field as u32.
Definition tt_bundle_loader.h:84
uint32_t test_dev
lifecycle state TEST_DEV allowed
Definition tt_bundle_loader.h:87
Definition tt_bundle_loader.h:126
uint16_t u16_all
The field as a u16.
Definition tt_bundle_loader.h:128
uint16_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:144
uint16_t key_index
Key index in ROM.
Definition tt_bundle_loader.h:132
struct fw_bundle_public_key_sel::@057317024077230036164074122372237233132102047136 f
uint16_t key_sel
ROM / Fuse Key Selection Allowed values: FW_BUNDLE_FUSE_KEY_SEL_PUBK_HASH0 FW_BUNDLE_FUSE_KEY_SEL_PUB...
Definition tt_bundle_loader.h:141
Definition tt_bundle_loader.h:148
uint64_t minor_version
Minor version.
Definition tt_bundle_loader.h:157
uint64_t u64_all
The field as a u64.
Definition tt_bundle_loader.h:150
struct fw_bundle_sem_ver::@334303163104267247342030326105362202261054062006 f
uint64_t patch_version
Patch version.
Definition tt_bundle_loader.h:154
uint64_t major_version
Major version.
Definition tt_bundle_loader.h:160
Definition tt_bundle_loader.h:164
uint32_t reserved
Reserved, must be 0.
Definition tt_bundle_loader.h:179
uint32_t mis_demotion
MIS demotion When secure_boot == 1, indicates that the MIS manifest will demand demotion....
Definition tt_bundle_loader.h:176
struct fw_bundle_unauthed_flags::@140363126262167304161262325352233265306315315045 f
uint32_t impl_reserved
Reserved for implementation defined use.
Definition tt_bundle_loader.h:182
uint32_t u32_all
The field as a u32.
Definition tt_bundle_loader.h:166