summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/imx8image.h6
-rw-r--r--include/imx_container.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/include/imx8image.h b/include/imx8image.h
index e0d25c5b6c9..d0e05811ff9 100644
--- a/include/imx8image.h
+++ b/include/imx8image.h
@@ -45,6 +45,7 @@
#define DCD_ENTRY_ADDR_IN_SCFW 0x240
#define CONTAINER_ALIGNMENT 0x400
+#define CONTAINER_PQC_ALIGNMENT 0x4000
#define CONTAINER_FLAGS_DEFAULT 0x10
#define CONTAINER_FUSE_DEFAULT 0x0
@@ -160,6 +161,8 @@ enum imx8image_cmd {
CMD_DATA,
CMD_DUMMY_V2X,
CMD_HOLD,
+ CMD_CNTR_VERSION,
+ CMD_DUMMY_DDR,
};
enum imx8image_core_type {
@@ -216,6 +219,8 @@ typedef enum option_type {
OEI,
DUMMY_V2X,
HOLD,
+ CNTR_VERSION,
+ DUMMY_DDR,
} option_type_t;
typedef struct {
@@ -262,6 +267,7 @@ typedef struct {
#define IMG_TYPE_SENTINEL 0x06 /* SENTINEL image type */
#define IMG_TYPE_PROV 0x07 /* Provisioning image type */
#define IMG_TYPE_DEK 0x08 /* DEK validation type */
+#define IMG_TYPE_DDR_DUMMY 0x0D /* DDR training data dummy entry */
#define IMG_TYPE_V2X_DUMMY 0x0E /* V2X Dummy image */
#define IMG_TYPE_SHIFT 0
diff --git a/include/imx_container.h b/include/imx_container.h
index 691c764b3e5..684fc3bc988 100644
--- a/include/imx_container.h
+++ b/include/imx_container.h
@@ -12,7 +12,11 @@
#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
@@ -72,7 +76,14 @@ int get_container_size(ulong addr, u16 *header_length);
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