struct boot_img_t *img_entry;
phdr = (struct container_hdr *)addr;
- if (phdr->tag != 0x87 || phdr->version != 0x0) {
+ if ((phdr->tag != 0x87 && phdr->tag != 0x82) || phdr->version != 0x0) {
debug("Wrong container header\n");
return false;
}
help
Enable SPL load reader to load data to a trampoline buffer.
+config IMX_PQC_SUPPORT
+ bool "Enable to support i.MX ROM PQC Container"
+ depends on SPL && SPL_LOAD_IMX_CONTAINER
+ help
+ Support i.MX ROM new PQC container format. If your chip does not use
+ PQC container, say 'n'.
+
config IMX_CONTAINER_CFG
string "i.MX8 Container config file"
depends on SPL && SPL_LOAD_IMX_CONTAINER
#define IV_MAX_LEN 32
#define HASH_MAX_LEN 64
+#if IS_ENABLED(CONFIG_IMX_PQC_SUPPORT)
+#define CONTAINER_HDR_ALIGNMENT 0x4000
+#else
#define CONTAINER_HDR_ALIGNMENT 0x400
+#endif
#define CONTAINER_HDR_EMMC_OFFSET 0
#define CONTAINER_HDR_MMCSD_OFFSET SZ_32K
#define CONTAINER_HDR_QSPI_OFFSET SZ_4K
static inline bool valid_container_hdr(struct container_hdr *container)
{
+#if IS_ENABLED(CONFIG_IMX_PQC_SUPPORT)
+ return (container->tag == CONTAINER_HDR_TAG ||
+ container->tag == 0x82) &&
+ (container->version == CONTAINER_HDR_VERSION ||
+ container->version == 0x2);
+#else
return container->tag == CONTAINER_HDR_TAG &&
container->version == CONTAINER_HDR_VERSION;
+#endif
}
#endif