]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools/imximage: share DCD information via Kconfig
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Wed, 11 Dec 2019 09:42:36 +0000 (10:42 +0100)
committerStefano Babic <sbabic@denx.de>
Fri, 27 Dec 2019 11:55:59 +0000 (12:55 +0100)
IMX based platforms can have the DCD table located on different
addresses due to differences in their memory maps (ie iMX7ULP).

This information is required by the user to sign the images for secure
boot so continue making it accessible via mkimage.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
arch/arm/mach-imx/Kconfig
tools/imximage.c

index fee6d56c4d11e5eff4a2f4a64f1a88e2f178f240..4ce2799b72a28601dbdc9fde49a4fca1b45869df 100644 (file)
@@ -113,3 +113,14 @@ config DDRMC_VF610_CALIBRATION
 config SPL_IMX_ROMAPI_LOADADDR
        hex "Default load address to load image through ROM API"
        depends on IMX8MN
+
+config IMX_DCD_ADDR
+       hex "DCD Blocks location on the image"
+       default 0x00910000 if !ARCH_MX7ULP
+       default 0x2f010000 if ARCH_MX7ULP
+       help
+         Indicates where the Device Configuration Data, a binary table used by
+         the ROM code to configure the device at early boot stage, is located.
+         This information is shared with the user via mkimage -l just so the
+         image can be signed.
+
index d7c0b6e883f7c8e3d5449227d77da5f0e325e035..d7edd3c52f48edc5afeab4d4be5d246db5b34676 100644 (file)
 #include "imagetool.h"
 #include <image.h>
 #include "imximage.h"
+#include <generated/autoconf.h>
 
 #define UNDEFINED 0xFFFFFFFF
 
+#if !defined(CONFIG_IMX_DCD_ADDR)
+#define CONFIG_IMX_DCD_ADDR 0x00910000
+#endif
 /*
  * Supported commands for configuration file
  */
@@ -524,8 +528,8 @@ static void print_hdr_v2(struct imx_header *imx_hdr)
                        printf("HAB Blocks:   0x%08x 0x%08x 0x%08x\n",
                               (uint32_t)fhdr_v2->self, 0,
                               (uint32_t)(fhdr_v2->csf - fhdr_v2->self));
-                       printf("DCD Blocks:   0x00910000 0x%08x 0x%08x\n",
-                              offs, be16_to_cpu(dcdlen));
+                       printf("DCD Blocks:   0x%08x 0x%08x 0x%08x\n",
+                              offs, CONFIG_IMX_DCD_ADDR, be16_to_cpu(dcdlen));
                }
        } else {
                imx_header_v2_t *next_hdr_v2;