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_BUN2_STAGING_AREA_ADDR 0xc0066400UL
33#define TT_BUN3_STAGING_AREA_ADDR 0xc0066400UL
36#define FW_BUNDLE_ENCRYPTION_TYPE_AES (0x01)
39#define FW_BUNDLE_SIGNATURE_TYPE_RSA (0x01)
42#define FW_BUNDLE_SIGNATURE_TYPE_ECC_P256 (0x02)
45#define FW_BUNDLE_FUSE_KEY_SEL_ROM (0x0)
48#define FW_BUNDLE_FUSE_KEY_SEL_PUBK_HASH0 (0x1)
51#define FW_BUNDLE_FUSE_KEY_SEL_PUBK_HASH1 (0x2)
54#define FW_BUNDLE_FUSE_KEY_SEL_SOP_PUBK (0x4)
57#define FW_BUNDLE_FUSE_KEY_SEL_SYS_PUBK (0x5)
60#define FW_BUNDLE_IMG_TYPE_SEP_BL1 (0x0000314c42504553ULL)
63#define FW_BUNDLE_IMG_TYPE_SEP_MIS (0x0000324c42504553ULL)
66#define FW_BUNDLE_IMG_TYPE_SMC_BL0P5 (0x3550304c42434d53ULL)
69#define FW_BUNDLE_IMG_TYPE_SMC_BL1 (0x0000314c42434d53ULL)
72#define FW_BUNDLE_IMG_TYPE_SMC_MIS (0x0000324c42434d53ULL)
Definition tt_bundle_loader.h:183
union fw_bundle_sem_ver manifest_content_version
Version for the payload described by this manifest.
Definition tt_bundle_loader.h:330
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:347
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:216
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:359
uint16_t security_version
Security version of the manifest Used for anti-rollback protection. Must be a monotonically increasin...
Definition tt_bundle_loader.h:263
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:339
uint16_t reserved_0
Reserved - must be 0.
Definition tt_bundle_loader.h:255
union fw_bundle_unauthed_flags flags
Unauthenticated flags field.
Definition tt_bundle_loader.h:362
uint8_t encryption_iv[32]
Encryption initial vector Only valid when encrypted_payload = 1.
Definition tt_bundle_loader.h:247
uint8_t signature_type
Signature algorithm, including padding/hash used for signature of the manifest. Ignored when boot is ...
Definition tt_bundle_loader.h:284
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:292
uint32_t reserved
Reserved. Must be 0x0.
Definition tt_bundle_loader.h:219
union fw_bundle_auth_flags authenticated_flags
Authenticated flags.
Definition tt_bundle_loader.h:242
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:352
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:319
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:313
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:193
uint64_t selector_bits
selector bits
Definition tt_bundle_loader.h:222
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:203
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:304
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:236
uint8_t encryption_type
Encryption algorithm Used when authenticated_flags.encrypted_payload == 1. Allowed values: FW_BUNDLE_...
Definition tt_bundle_loader.h:273
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:252
union fw_bundle_lc_state lifecycle_states
lifecycle state control
Definition tt_bundle_loader.h:239
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:299
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:327
uint8_t reserved_1[12]
Reserved, must be 0.
Definition tt_bundle_loader.h:365
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:208
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:229
Definition tt_bundle_loader.h:368
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:375
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:397
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:391
uint64_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:400
union fw_bundle_sem_ver version
version for the image described by this TOC entry.
Definition tt_bundle_loader.h:385
uint8_t hash[32]
SHA-256 hash over this image.
Definition tt_bundle_loader.h:403
uint8_t description[128]
ASCII NULL terminated string describing the manifest and payload. This is provided to make identifyin...
Definition tt_bundle_loader.h:412
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:382
uint64_t type
Defines type of image, as well as the destination component.
Definition tt_bundle_loader.h:370
The table of contents present in the FW bundle payload.
Definition tt_bundle_loader.h:416
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:427
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:450
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:445
uint32_t toc_identifier
The toc identifier string. Must be FW_BUNDLE_TOC_ID.
Definition tt_bundle_loader.h:418
uint64_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:453
uint16_t toc_version_minor
Minor version of the TOC format. Current minor version is 0.
Definition tt_bundle_loader.h:432
struct fw_bundle_toc_entry entries[]
The TOC entries, image_count of them, immediately following this header.
Definition tt_bundle_loader.h:458
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:104
uint32_t encrypted_payload
Payload is encrypted.
Definition tt_bundle_loader.h:113
uint32_t security_version_update
Update the hardware security version to match security_version.
Definition tt_bundle_loader.h:116
struct fw_bundle_auth_flags::@212342336070306150061046366247137174002130132024 f
uint32_t reserved
Reserved, must be 0.
Definition tt_bundle_loader.h:119
uint32_t bl1_demotion
BL1 demotion request, only valid when selector_bits[17] is 1.
Definition tt_bundle_loader.h:110
uint32_t u32_all
The field as a u32.
Definition tt_bundle_loader.h:106
Lifecycle state selection This field controls whether or not this image is loaded on a device based o...
Definition tt_bundle_loader.h:79
uint32_t prod_end
lifecycle state PROD_END allowed
Definition tt_bundle_loader.h:90
uint32_t prod
lifecycle state PROD allowed
Definition tt_bundle_loader.h:87
struct fw_bundle_lc_state::@007342372273322205337035164032007373244103363012 f
uint32_t rma_sip
lifecycle state RMA_SIP allowed
Definition tt_bundle_loader.h:93
uint32_t rma_chiplet
lifecycle state RMA_CHIPLET allowed
Definition tt_bundle_loader.h:96
uint32_t u32_all
The field as u32.
Definition tt_bundle_loader.h:81
uint32_t test_dev
lifecycle state TEST_DEV allowed
Definition tt_bundle_loader.h:84
Definition tt_bundle_loader.h:123
uint16_t u16_all
The field as a u16.
Definition tt_bundle_loader.h:125
uint16_t reserved
Reserved - must be 0.
Definition tt_bundle_loader.h:141
uint16_t key_index
Key index in ROM.
Definition tt_bundle_loader.h:129
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:138
Definition tt_bundle_loader.h:145
uint64_t minor_version
Minor version.
Definition tt_bundle_loader.h:154
uint64_t u64_all
The field as a u64.
Definition tt_bundle_loader.h:147
struct fw_bundle_sem_ver::@334303163104267247342030326105362202261054062006 f
uint64_t patch_version
Patch version.
Definition tt_bundle_loader.h:151
uint64_t major_version
Major version.
Definition tt_bundle_loader.h:157
Definition tt_bundle_loader.h:161
uint32_t reserved
Reserved, must be 0.
Definition tt_bundle_loader.h:176
uint32_t mis_demotion
MIS demotion When secure_boot == 1, indicates that the MIS manifest will demand demotion....
Definition tt_bundle_loader.h:173
struct fw_bundle_unauthed_flags::@140363126262167304161262325352233265306315315045 f
uint32_t impl_reserved
Reserved for implementation defined use.
Definition tt_bundle_loader.h:179
uint32_t u32_all
The field as a u32.
Definition tt_bundle_loader.h:163