From patchwork Wed Dec 11 09:42:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jorge Ramirez-Ortiz, Foundries" X-Patchwork-Id: 1207532 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries-io.20150623.gappssmtp.com header.i=@foundries-io.20150623.gappssmtp.com header.b="ocEN88rW"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47XsRb2J6Hz9sP6 for ; Wed, 11 Dec 2019 20:42:51 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CC518067D; Wed, 11 Dec 2019 10:42:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries-io.20150623.gappssmtp.com header.i=@foundries-io.20150623.gappssmtp.com header.b="ocEN88rW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E53481486; Wed, 11 Dec 2019 10:42:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BF427801BA for ; Wed, 11 Dec 2019 10:42:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x343.google.com with SMTP id d5so4681834wmb.4 for ; Wed, 11 Dec 2019 01:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries-io.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=llNUh0EA2NX6NZ06deGJbQpmf02g1aXZ8m4TSW8Ep44=; b=ocEN88rW2kXDhIaMuxuFyKUAT0ec18cPvxrkAV9g19CNv6KPNpNzOzRNAwuWn6a0bq b8I/dDCCkgfu0Dm8Ib+fBsQwsyZeQbjAh6EDFbEvd7vlKf3+8Zzgj5Fy1yh4ooRoMAyc Qr8d3Qt8iih0GkQmwGjsJBJFdlsMWS7YEU9cibngObURwLU0+cVzcem6b2+7zM8dxYDU S8gRb9YrQ+mBuq4BzlNxAlL8gkrN7mL62cFGybIkYTbaAgGdeNLtI47B03zhvZrITK36 tlV9wB8Fswx21MHGek2yJOHkpfOeiqLzu7OtpBX37HwgAUwMX4uwbQ28z6cvzeNfn55H bhew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=llNUh0EA2NX6NZ06deGJbQpmf02g1aXZ8m4TSW8Ep44=; b=Psdd14XhL3b2fKwOV41krkzwOJ0K3XB+TnLN4oX6MxPVqBu9Uuah7ek2zNKW7x8FbV RACw8jIfeDFStv2lK2bjUEuDRwNhiFpHreMZLi9crelOlknh6EdnsyyFdeObaZNNfGlF XaIr69FD4TL3QPcoD+6prI1MiFQyylS0Sa+4dEb0YEX0tpBjws/c05SANnlfQrsFvX9O RQHmcsa1S+bycQposAqhTwWGseLBV86j/U4ChsPCY1/1nLgHqA30xJdpJNohDcX7XZ1V 0cyK1zHm+Jam7q+5K+G9hnmMRwgGQn2EXsQALak53gBJ/0n95gyj+NgcrqONAB09v2Qn xxLg== X-Gm-Message-State: APjAAAXJEJyfL5C2vPAFc3VR0Gnm2BhWfPi4Uf4dmFyPWmGBdTMgAlqW L1EdAllbqJqwmmoN1ZCr+Jov5jVQwRI= X-Google-Smtp-Source: APXvYqxGRY3oMzVo3aTHOO+fWFUwSCXgzysdnRjNj5hSeTeYJMd+ZRNojRmQ4NqiTUlFbCFq61hyGA== X-Received: by 2002:a7b:cb0a:: with SMTP id u10mr2665382wmj.104.1576057362170; Wed, 11 Dec 2019 01:42:42 -0800 (PST) Received: from localhost.localdomain (210.red-83-34-201.dynamicip.rima-tde.net. [83.34.201.210]) by smtp.gmail.com with ESMTPSA id k4sm1673692wmk.26.2019.12.11.01.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 01:42:41 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, sbabic@denx.de, festevam@gmail.com, uboot-imx@nxp.com, u-boot@lists.denx.de, ricardo@foundries.io Subject: [PATCH] tools/imximage: share DCD information via Kconfig Date: Wed, 11 Dec 2019 10:42:36 +0100 Message-Id: <20191211094236.16778-1-jorge@foundries.io> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Fabio Estevam --- 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 #include "imximage.h" +#include #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;