Alice Guo | 3fbd634 | 2025-04-28 18:37:42 +0800 | [diff] [blame] | 1 | i.MX95 Image Container Format |
| 2 | ----------------------------- |
| 3 | |
| 4 | The image container set consists of some image containers, and image container |
| 5 | contains boot images. Each image container has its own container header which is |
| 6 | defined in Figure 1. All container headers are placed together in a continuous |
| 7 | 8KB space at the beginning of the image container set - image container set header. |
| 8 | |
| 9 | ROM code addresses image containers in image container set one by one based on |
| 10 | their headers’ order in image container set header. |
| 11 | |
| 12 | If ELE container exists, its container header must be the 1st one in the image |
| 13 | container set header. |
| 14 | |
| 15 | If V2X container exists, its container header must be the 2nd one in the image |
| 16 | container set header. V2X must be combined with ELE container. |
| 17 | |
| 18 | The information of boot images are recorded in image container header. System |
| 19 | ROM code needs to retrieve the information from the image container header, like |
| 20 | the offset on boot source, the target address in RAM, the length of boot image. |
| 21 | The order of ROM code handling these boot images is based on the order of each |
| 22 | boot image information present in image container header. |
| 23 | |
| 24 | Figure 1: |
| 25 | ------------------- +--------------+--------------+--------------+--------------+ |
| 26 | ^ |Tag |Length |Length |Version | |
| 27 | | +--------------+--------------+--------------+--------------+ |
| 28 | | | Flags | |
| 29 | | +--------------+--------------+--------------+--------------+ |
| 30 | | |# of Images |Fuse version |SW version | |
| 31 | Image | +--------------+--------------+--------------+--------------+ |
| 32 | Container | |Reserved |Signature Block Offset | |
| 33 | Header | ------- +--------------+--------------+--------------+--------------+ |
| 34 | | ^ |Image0: Offset, Size, LoadAddr, EntryPoint, Flags, Hash, IV| |
| 35 | | | +--------------+--------------+--------------+--------------+ |
| 36 | | Image | |Image1: Offset, Size, LoadAddr, EntryPoint, Flags, Hash, IV| |
| 37 | | Array | +--------------+--------------+--------------+--------------+ |
| 38 | | | | ... | |
| 39 | | | +--------------+--------------+--------------+--------------+ |
| 40 | v v |ImageN: Offset, Size, LoadAddr, EntryPoint, Flags, Hash, IV| |
| 41 | ------------------- +--------------+--------------+--------------+--------------+ |
| 42 | | ... | |
| 43 | ----------- +--------------+--------------+--------------+--------------+ <-- SignOffset |
| 44 | ^ |Tag |Length |Length |Version | |
| 45 | | +--------------+--------------+--------------+--------------+ |
| 46 | | |SRK table offset |Certificate Offset | |
| 47 | | +--------------+--------------+--------------+--------------+ |
| 48 | | |Blob Offset |Signature Offset | |
| 49 | | +--------------+--------------+--------------+--------------+ |
| 50 | Signature | | SRK Table | |
| 51 | Block | +--------------+--------------+--------------+--------------+ |
| 52 | | | Signature | |
| 53 | | +--------------+--------------+--------------+--------------+ |
| 54 | | | Certificate (optional) | |
| 55 | | +--------------+--------------+--------------+--------------+ |
| 56 | v | Blob (optional) | |
| 57 | ----------- +--------------+--------------+--------------+--------------+ |
| 58 | | ... | |
| 59 | +--------------+--------------+--------------+--------------+ <-- Image0Offset |
| 60 | | Image0 | |
| 61 | +--------------+--------------+--------------+--------------+ |
| 62 | | ... | |
| 63 | +--------------+--------------+--------------+--------------+ <-- ImageNOffset |
| 64 | | ImageN | |
| 65 | +--------------+--------------+--------------+--------------+ |
| 66 | | ... | |
| 67 | +--------------+--------------+--------------+--------------+ |
| 68 | |
| 69 | i.MX95 Low Power Boot Image Sets Layout |
| 70 | --------------------------------------- |
| 71 | |
| 72 | Image container sets are handled by M33 ROM. |
| 73 | |
| 74 | --------------- +--------------+--------------+--------------+--------------+ |
| 75 | ^ | 1st Container Header | |
| 76 | | +--------------+--------------+--------------+--------------+ |
| 77 | ELE + | | Padding for 1KB alignment | |
| 78 | OEM | +--------------+--------------+--------------+--------------+ |
| 79 | Container | | 2nd Container Header | |
| 80 | Set | +--------------+--------------+--------------+--------------+ |
| 81 | Header | | Padding for 1KB alignment | |
| 82 | | +--------------+--------------+--------------+--------------+ |
| 83 | | | 3rd Container Header | |
| 84 | | +--------------+--------------+--------------+--------------+ |
| 85 | v | Padding for 1KB alignment | |
| 86 | --------------- +--------------+--------------+--------------+--------------+ |
| 87 | | ... | |
| 88 | +--------------+--------------+--------------+--------------+ |
| 89 | | mx95a0-ahab-container.img | |
| 90 | +--------------+--------------+--------------+--------------+ |
| 91 | | ... | |
| 92 | ------------------- +--------------+--------------+--------------+--------------+ |
| 93 | ^ | oei-m33-ddr.bin | |
| 94 | | +--------------+--------------+--------------+--------------+ |
| 95 | | | ddrfw-header.bin | |
| 96 | | +--------------+--------------+--------------+--------------+ |
| 97 | | | lpddr5_imem_v202311.bin | |
| 98 | | +--------------+--------------+--------------+--------------+ |
| 99 | m33-oei-ddrfw.bin | | lpddr5_dmem_v202311.bin | |
| 100 | | +--------------+--------------+--------------+--------------+ |
| 101 | | | ddrfw-qb-header.bin | |
| 102 | | +--------------+--------------+--------------+--------------+ |
| 103 | | | lpddr5_imem_qb_v202311.bin | |
| 104 | | +--------------+--------------+--------------+--------------+ |
| 105 | v | lpddr5_dmem_qb_v202311.bin | |
| 106 | ------------------- +--------------+--------------+--------------+--------------+ |
| 107 | | ... | |
| 108 | +--------------+--------------+--------------+--------------+ |
| 109 | | oei-m33-tcm.bin | |
| 110 | +--------------+--------------+--------------+--------------+ |
| 111 | | ... | |
| 112 | +--------------+--------------+--------------+--------------+ |
| 113 | | m33_image.bin | |
| 114 | +--------------+--------------+--------------+--------------+ |
| 115 | | ... | |
| 116 | +--------------+--------------+--------------+--------------+ |
| 117 | | u-boot-spl.bin | |
| 118 | +--------------+--------------+--------------+--------------+ |
| 119 | | ... | |
| 120 | +--------------+--------------+--------------+--------------+ |
| 121 | |
| 122 | --------------- +--------------+--------------+--------------+--------------+ |
| 123 | u-boot-atf ^ | 1st Container Header | |
| 124 | Container | +--------------+--------------+--------------+--------------+ |
| 125 | Header v | Padding for 1KB alignment | |
| 126 | --------------- +--------------+--------------+--------------+--------------+ |
| 127 | | ... | |
| 128 | +--------------+--------------+--------------+--------------+ |
| 129 | | bl31.bin | |
| 130 | +--------------+--------------+--------------+--------------+ |
| 131 | | ... | |
| 132 | +--------------+--------------+--------------+--------------+ |
| 133 | | u-boot.bin | |
| 134 | +--------------+--------------+--------------+--------------+ |
| 135 | | ... | |
| 136 | +--------------+--------------+--------------+--------------+ |