From: Jorge Ramirez-Ortiz <jorge@foundries.io>
To: u-boot@lists.denx.de
Subject: [PATCH] tools/imximage: share DCD information via Kconfig
Date: Wed, 11 Dec 2019 10:42:36 +0100 [thread overview]
Message-ID: <20191211094236.16778-1-jorge@foundries.io> (raw)
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>
---
arch/arm/mach-imx/Kconfig | 11 +++++++++++
tools/imximage.c | 5 +++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index fee6d56c4d..4ce2799b72 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -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.
+
diff --git a/tools/imximage.c b/tools/imximage.c
index d7c0b6e883..392c239812 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -11,6 +11,7 @@
#include "imagetool.h"
#include <image.h>
#include "imximage.h"
+#include <generated/autoconf.h>
#define UNDEFINED 0xFFFFFFFF
@@ -524,8 +525,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;
--
2.17.1
next reply other threads:[~2019-12-11 9:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 9:42 Jorge Ramirez-Ortiz [this message]
2019-12-11 11:34 ` [PATCH] tools/imximage: share DCD information via Kconfig Fabio Estevam
2019-12-27 11:40 ` Stefano Babic
2019-12-28 10:49 ` sbabic at denx.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191211094236.16778-1-jorge@foundries.io \
--to=jorge@foundries.io \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox