From patchwork Tue Apr 24 17:46:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903752 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CAi9B6zp"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrjW3GDbz9s0v for ; Wed, 25 Apr 2018 04:01:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 16CB5C21F05; Tue, 24 Apr 2018 17:55:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2A407C21F9D; Tue, 24 Apr 2018 17:48:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 46F4EC21FBF; Tue, 24 Apr 2018 17:46:53 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 69E98C21F21 for ; Tue, 24 Apr 2018 17:46:53 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id t67so2684632wmt.0 for ; Tue, 24 Apr 2018 10:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qfCt0B89/iYgPDCAEauK+XI6HnI+WNCRSLy8+O4u3yg=; b=CAi9B6zp18UaNtIwi5zThDSgYiqQ6LRqKoDZRGBnpl176eeER58Y04Rw4kcG18SzNz oAeLDNCpTegfzYk0/JXEOdibYQ6h8QYIWMuvd79kxCp1mjMDcJ2LCa6YfS647URe579g o3+imbeQHhJNUpNacc0y6VQOVHwXUFyDiCSuU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qfCt0B89/iYgPDCAEauK+XI6HnI+WNCRSLy8+O4u3yg=; b=j6N54gemoK12hS4ZcFaPnh2DTHKgDVPcB+rPPsWUXT4ggwPEM1pjxTt50B3fjP1aja ECkoLCfZKcCQvT/HXBshLaoWHMZ4qK00wtgoWu0lvt/GjsBeuaAuLF045LO6nwgx8eTd zqPv2pe4Byl9omvmd11y28H+nv+TK9H1B6DLKUWMvbLFv3ugvpixG1ra4bi5zDeTnUAl rt8bh0JxfiueA7Wp+kxgfyIkka7skrVJ8JZpG3TbArd5JG+dO7KjJkk7qjwNlIr5KYkE mw2U08wwCP6wwjkerw655rkRn0fj7/tSkhPbd0iDfLrck9Rk6IRky9lrL1bciVREnFlo GPFA== X-Gm-Message-State: ALQs6tCvZTBw0NvpUAPbyL6kO6wJZn7boUe4pAMlbecTizHWkR1gL2Ju g+yQIEoUluI39qoiZ81iImiQtbYChgk= X-Google-Smtp-Source: AIpwx49/IUfYa9VXkhk/Whej9WYJN58SQ9AamaJmpBROlDtuXxbeHuXZ8TEV+/ufBnYDXQdhukIg+Q== X-Received: by 10.80.149.219 with SMTP id x27mr34730589eda.99.1524592012900; Tue, 24 Apr 2018 10:46:52 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:52 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:30 +0100 Message-Id: <20180424174647.11840-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 01/18] tools/imximage: Fix fruity lack of 0x prefix in DCD Blocks X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" commit 8519c9c98ad6 ("tools/imximage: use 0x prefix in HAB Blocks line") adds an 0x prefix to each HAB Block number to make it easier for host tools to process the HAB Block output, however it neglects to apply the same prefix to the DCD Blocks directive. You need the DCD Blocks directive if you are making a u-boot recovery image which the BootROM will accept via the USB upload utility. This disparity results in a fruity output like this with HAB Blocks prefixed but DCD Blocks not prefixed - which is pretty inconsistent. This patch fixes the difference assuming the original commit was a legitimate change. Old: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 00910000 0000002c 000001d4 New: Image Type: Freescale IMX Boot Image Image Ver: 2 (i.MX53/6/7 compatible) Mode: DCD Data Size: 430080 Bytes = 420.00 KiB = 0.41 MiB Load Address: 877ff420 Entry Point: 87800000 HAB Blocks: 0x877ff400 0x00000000 0x00066c00 DCD Blocks: 0x00910000 0x0000002c 0x000001d4 Signed-off-by: Bryan O'Donoghue Cc: Rasmus Villemoes Cc: Fabio Estevam Cc: Breno Lima Cc: Stefano Babic Reviewed-by: Fabio Estevam --- tools/imximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/imximage.c b/tools/imximage.c index 6dabb13520..6f16d45351 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -520,7 +520,7 @@ static void print_hdr_v2(struct imx_header *imx_hdr) (uint32_t)fhdr_v2->self, 0, hdr_v2->boot_data.size - imximage_ivt_offset - imximage_csf_size); - printf("DCD Blocks: 00910000 %08x %08x\n", + printf("DCD Blocks: 0x00910000 0x%08x 0x%08x\n", offs, be16_to_cpu(dcdlen)); } } else { From patchwork Tue Apr 24 17:46:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903740 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hiPBOmwJ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrcG3l9fz9s0v for ; Wed, 25 Apr 2018 03:56:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 39342C21F78; Tue, 24 Apr 2018 17:54:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C6B02C21FC5; Tue, 24 Apr 2018 17:47:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2D001C21F34; Tue, 24 Apr 2018 17:46:54 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 70AE2C21F67 for ; Tue, 24 Apr 2018 17:46:54 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x12so1483186wmc.0 for ; Tue, 24 Apr 2018 10:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yKOyqblyyirFTXF+rpUNwHLLitVBnQ8VEVBPJAYeEJQ=; b=hiPBOmwJjBEqOtvy5FJ3CNyyNbpTgyh7UtTNpeaK8iYP3yBX3iIlD+jO+gar5PXeCB 5dQBzLlgIKamyXakaTsuDmADtKS0lpe0kpT7L5gWGApYt9n9CEiwULKBYQ22vL3ybW+o eyjeb7JqR6BQsjbXExPIpTXqnEEHQCKRKFhI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yKOyqblyyirFTXF+rpUNwHLLitVBnQ8VEVBPJAYeEJQ=; b=fbNmdIl7558T+AApg0uHZmj25oVlvya8EOkJfGuDc6BgKEZnLynRlHnz/3RK4Us+Be fX79bEBVKcJFKCo69YASHWCAHo6UmPv/E1C8KXVsZG/NQypxWTOE5QHjpTTsSoehV7+v wybDUXf+LKXXHFXL7TLQSxcbNlm80Fn5aHXBcFnlhxPjz/y+wr8XLYzeu5Qmv4UaEgOf ShuVmKS7rzTO2QgeV1qOZ2Wl0gdw/jft2f4GYsWe9qnYsMpRyRwnLQD3HNzY1zv2YKG6 AA3O8R4J2ADjwZgpEYCaa01cZ+RNfVAtHdw/RCV3Ox4HNBZCvU4Fb/Uc07234EoZo4Ua NVNQ== X-Gm-Message-State: ALQs6tBix18hyzyVsbO42YJdFMewb7YcKgeAf/Py7fGwLEsbkL1dwjyo uDTLhNKFZ2bhKaGkChKVXNvacZ+W5YI= X-Google-Smtp-Source: AIpwx4/H7A9Q81JRV2c32ah7RdO0h9r1F3Z/xG7vqMLx/ef50f65l0H9XcKa19c7zGIHJ0bZLRIdIg== X-Received: by 10.80.131.67 with SMTP id 61mr31340623edh.48.1524592013927; Tue, 24 Apr 2018 10:46:53 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:53 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:31 +0100 Message-Id: <20180424174647.11840-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Cc: Utkarsh Gupta Subject: [U-Boot] [PATCH v4 02/18] imximage: Specify default IVT offset in IMX image X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds BOOTROM_IVT_HDR_OFFSET at 0xC00. The BootROM expects to find the IVT header at a particular offset in an i.MX image. Defining the expected offset of the IVT header in the first-stage BootROM image format is of use of later stage authentication routines where those routines continue to follow the first-stage authentication layout. This patch defines the first stage offset which later patch make use of. Signed-off-by: Bryan O'Donoghue Cc: Utkarsh Gupta Cc: Breno Lima Cc: Fabio Estevam Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/imximage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/imximage.h b/include/imximage.h index 553b852367..800fd6383b 100644 --- a/include/imximage.h +++ b/include/imximage.h @@ -14,6 +14,9 @@ #define APP_CODE_BARKER 0xB1 #define DCD_BARKER 0xB17219E9 +/* Specify the offset of the IVT in the IMX header as expected by BootROM */ +#define BOOTROM_IVT_HDR_OFFSET 0xC00 + /* * NOTE: This file must be kept in sync with arch/arm/include/asm/\ * mach-imx/imximage.cfg because tools/imximage.c can not From patchwork Tue Apr 24 17:46:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903730 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KXuy/36T"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrRP1fKJz9s19 for ; Wed, 25 Apr 2018 03:48:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 70C75C21F4F; Tue, 24 Apr 2018 17:47:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3B158C21F32; Tue, 24 Apr 2018 17:47:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D7D9AC21F32; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 64108C21F79 for ; Tue, 24 Apr 2018 17:46:55 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id 66so2669895wmd.3 for ; Tue, 24 Apr 2018 10:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EkPCXzOdciZFxNMHTTGHkKRoNdn6mN7y67CWCkIvazE=; b=KXuy/36Tw6AJ2h2/GIXwPUy+ndMKUm6qB55KcF5AHB1RIeVO0qv5rGDRvFBNsYnXBy Zh8vHYzvvFdMWrCpdryJc9cGfJnzDuYAcvEbw/qGLY6gCl4O7EeTmeTAN2Q0XNAiHZby 4KGX/dEt37CfoNMK3qN70WzQlzrcncnYqIzc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EkPCXzOdciZFxNMHTTGHkKRoNdn6mN7y67CWCkIvazE=; b=RYcF2GOjtupbmkwekOqta6Yu5KGmHexQ4tC+cv1dno0nkGV13ArIGTVdFscryy2Jvi yOTrDolF/GClCdCdOXgL+ftZ5b8kUYYcu7Jzww/LomHLFqbZWST+L6Fh4xXjpXNkYxFY VULI4F7p1+UkGpgmNHvsoFmw/XjSFPd9EfBpsAgNz+68OR56EthXGKDEdONScitaRKbd AVzGmMjzAcXirso3xBTkfK4oCm+K+f4dqmK3VqX6UWRnyb86MaQvSou9Yd7dndrPagCp Y8jydEf22/mLbMb6A4pOAQO9QvaWWns9vZbjPBpnTyBm4hPyDl5Byk2hODrEgrSYjWXT mfPg== X-Gm-Message-State: ALQs6tA4cPqiKKIXYYQdHqShqa+EVeaYhfUty39oPP2h44vmE++mi/cd 2BSZIkOGpCLZgZ/AtqSDmccpnkYn2RI= X-Google-Smtp-Source: AIpwx4+xtak9EFStUw2rGtyDGCnDAeYF/suq9XHWf00WS0q5//N6j2odaOoIVpY84kqO54HI4kJLDw== X-Received: by 10.80.183.65 with SMTP id g59mr34668443ede.129.1524592014887; Tue, 24 Apr 2018 10:46:54 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:54 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:32 +0100 Message-Id: <20180424174647.11840-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 03/18] warp7: hab: Add a CSF location definition X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to correctly produce an image with a IVT/DCD header we need to define a CSF in imximage.cfg. We just use the mx7 default here. All we have to do with this option switched on is "make u-boot.imx" and we then will get - u-boot.imx - u-boot.imx.log The log file is really important because it gives the addresses for the HAB that we will require to sign the u-boot image using the CST. Since the addresses can change this logfile is a critical output. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/imximage.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/warp7/imximage.cfg b/board/warp7/imximage.cfg index 5b42793786..51a5bff723 100644 --- a/board/warp7/imximage.cfg +++ b/board/warp7/imximage.cfg @@ -13,6 +13,10 @@ #include IMAGE_VERSION 2 +#ifdef CONFIG_SECURE_BOOT +CSF CONFIG_CSF_SIZE +#endif + BOOT_FROM sd /* From patchwork Tue Apr 24 17:46:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903741 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hkYojgCo"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrcP0N1Kz9s0v for ; Wed, 25 Apr 2018 03:56:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id ACB74C21F3E; Tue, 24 Apr 2018 17:53:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 74AABC21F21; Tue, 24 Apr 2018 17:47:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AA6A9C21FA1; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by lists.denx.de (Postfix) with ESMTPS id 5E535C21ED6 for ; Tue, 24 Apr 2018 17:46:56 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id t67so2684938wmt.0 for ; Tue, 24 Apr 2018 10:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJEKqyilK/IAJXVyPhPTBOvlJZRypoCnJv8RPkg6BxU=; b=hkYojgCoa9Ellbwle+r1RFy1lzsV8B5t5A6FApc8JWYA4EZPbEn6v0ausj/0ZzZqlJ kAcXqQLcD1C1sfZCvlaNxvEVJ6SckxGfltz4fvM1jM18pOxi40FDEq8FgNJYi2ak8svO OKbG34r2A+GBFpuH2ILZaDJ1LNJeq08B6n5RU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vJEKqyilK/IAJXVyPhPTBOvlJZRypoCnJv8RPkg6BxU=; b=gznxQ2LxX+wbTBsELyJ2HleLpKOnIlwTZ4aLaWSbZ/QLwelqZpDyZPwPmFcbSybY0r KMlsxKvtPfwJT8n/NcuFGPM9R4PO86srUC4cToDxp22a7u+sWWOiIcbDw3It6U0TfWA9 YoJuWa0jRRzJ3OwKjFwUiub7uTJA/VQ83lh74Aoe2TXMV1cJ9+1iMjHQAARKM66JmO+A bNB+VwJM6cjoaPnsgUwOFdXScuzXiT2m4RvW0kN3LWuXq1y78ZTzwzQQolpQ3fDqQhPk BqyGaO3HRZsoVmcs9OomTzsHkM2ttdWnpDvT/ra+8+DNPFcgUYC1XxhuWGWqAMwngmX2 gYlQ== X-Gm-Message-State: ALQs6tA4jdYI4s4omE6bH7Pe6hrHSR6vuiYed4MTUtVjO/J3oTxkcFgB W44Z2L9RxpsV3pMEYxniN6/g2s6986E= X-Google-Smtp-Source: AIpwx4/hEP9zZQyKO94N5K1WDubq0EqBFo+N8mLlYFCZ+YOhtyw5X1CgP4eWWYL4ogCNwO/TSHkgnw== X-Received: by 10.167.211.78 with SMTP id m14mr24316606edr.108.1524592015833; Tue, 24 Apr 2018 10:46:55 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:55 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:33 +0100 Message-Id: <20180424174647.11840-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 04/18] warp7: hab: Set environment variable indicating HAB enable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds an environment variable called "hab_enabled" which gets set to a boolean status indicating whether HAB is enabled or not. Subsequent patches can use this environment variable to determine if its necessary to run a given binary through the hab_auth_img console command. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/warp7.c | 8 ++++++++ include/configs/warp7.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 327f656c44..0d3d324571 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -203,6 +204,13 @@ int board_late_init(void) */ clrsetbits_le16(&wdog->wcr, 0, 0x10); +#ifdef CONFIG_SECURE_BOOT + /* Determine HAB state */ + env_set_ulong(HAB_ENABLED_ENVNAME, imx_hab_is_enabled()); +#else + env_set_ulong(HAB_ENABLED_ENVNAME, 0); +#endif + #ifdef CONFIG_SERIAL_TAG /* Set serial# standard environment variable based on OTP settings */ get_board_serial(&serialnr); diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 0c3b605de3..c6ab29a831 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -139,4 +139,7 @@ #define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01" +/* Environment variable name to represent HAB enable state */ +#define HAB_ENABLED_ENVNAME "hab_enabled" + #endif From patchwork Tue Apr 24 17:46:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903731 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gAztCWU8"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrSP3C2cz9s0v for ; Wed, 25 Apr 2018 03:49:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 27DBFC21FE0; Tue, 24 Apr 2018 17:48:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9BC35C21EE8; Tue, 24 Apr 2018 17:47:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 11949C21F05; Tue, 24 Apr 2018 17:46:57 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 71218C21F62 for ; Tue, 24 Apr 2018 17:46:57 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id i3so2256018wmf.3 for ; Tue, 24 Apr 2018 10:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kKU/Jcyh8I5+eaRgzyIZOZpabuM3W7VV3gWccHxzgH0=; b=gAztCWU88nIyv22Cea/R3CvSvVfAdDC1zNsnWYwzkgli0DSQ02u1pP2/Df2w7uux4K oXQbd01EkcY+0/8z4+Az1/eWYEH5Rvb+Q7evUhi1+VSSJnPk+T5zGuWDihOmGFwyvr2G JGw7qXz955ugob9mFWuvTqEKtuS/FmZsG3Oj0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kKU/Jcyh8I5+eaRgzyIZOZpabuM3W7VV3gWccHxzgH0=; b=hfusGWOzBPIZ4PL9ZWycaRQ/1hyWRxXgW4DFKwnPevYljwE3O/miwCku3ily4Kalsz G/Hm/dUObaoguH4GI9OglKZ7UZXCcePcSgmAtgcTsQz61j2/t/XOwfT2yEf8hKTvjxVr d4EE41LLgZThAWAgVmpN22sxbDlkc6BXkK76uRIi0nEHObzvoT2Uog6ikB8uaP6ez4Md 8/6s/EODm4h6BfAfkPpvA7Fjkqw+KZ99JQL5McN4obk8GAj5SEynl0W+rvn8KwGdMiY9 sRk846kfyK4vHk+cnO/oN+orTMqFLds9orL/k1OoXzl/3u02wB7GP6rL7lIPUb/bXljL Yocg== X-Gm-Message-State: ALQs6tCQ3GO+90JQYALijqvZidBF0/mSsqdwuysEQPPwOftlnnOaVI1o RHZ50AZFcxUWr9lvO5JfPrbXBvmwC+s= X-Google-Smtp-Source: AIpwx48uWUGTopevwB42YQyC+4GZOrSLZFKjH7HzDEn6pnfMvBVC2hh5TdPe5OgLAznfoYkdIr3emA== X-Received: by 10.80.160.133 with SMTP id 5mr28822095edo.261.1524592016898; Tue, 24 Apr 2018 10:46:56 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:56 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:34 +0100 Message-Id: <20180424174647.11840-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 05/18] warp7: defconfig: Enable OPTEE for WaRP7 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Requires setting CONFIG_OPTEE=y and setting an OPTEE TrustZone DRAM base in include/configs/warp7.h. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 73f3f09dc1..75a141b8b9 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -45,3 +45,4 @@ CONFIG_USB_ETHER=y CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y +CONFIG_OPTEE=y From patchwork Tue Apr 24 17:46:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903729 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="IrbJIFJN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrPv4kT9z9s0v for ; Wed, 25 Apr 2018 03:47:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 35319C21F45; Tue, 24 Apr 2018 17:47:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7158C21F59; Tue, 24 Apr 2018 17:47:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5F569C21F6A; Tue, 24 Apr 2018 17:46:58 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 6BA5BC21F50 for ; Tue, 24 Apr 2018 17:46:58 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id j5so2261528wme.5 for ; Tue, 24 Apr 2018 10:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fzreL59h9zv3aEoBkEkGnxh4k3f6J+n3UNaebiP7K+U=; b=IrbJIFJNUalPRzy/h2h1O1fiIVxEaJoL9E13MnbP4sYIUGIPrKRujj5yPC+jz6Pbuy K8rEjCm4cHC/xq6gWz3q6gYH9PpQBVQ4gJJl7S4iFqS+OYUiUZg0dwEaT1tcZSmr6pSq HV74FKXwdyTNs7pqcVjPjEAPOcXIFzxwEJm+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fzreL59h9zv3aEoBkEkGnxh4k3f6J+n3UNaebiP7K+U=; b=Ij+sg+QmQpGkqU4RhFiHelZsM9SxxpV1n0vh4lXmL/AKo9Ob8Y74KPI8GqPxiUfL+7 oSNQ8vX4nV0FTv4HaLc2yrvpbvcZNfHSv4XPw7GD9OLE7TUyHLow3aUgxhbmScrQxSbc EAvgrTy5MDdv46/k/K2mAEqgoNzj3Xo66/UXwLbHiE/6Ni+fmaNKYT7pvxnocVdWPwI3 JtI/CCKSKx2ZQl7n7uq2stwxBZTgwMqs4LLxzUIJmOIEwTYK6DOzB3FX5DHbvb0qUTwG dF6fImHI3oaxNFcVkNUcEjN3lcFPnHr0wJw4IiAcMMiBeVh8dsi/b1zV9ej5QT4uZNN3 JA9g== X-Gm-Message-State: ALQs6tA8rXOELHWLFc+VBU66l2NG/LfVn1bV3MKdAEBGAK0U1/Qd9JNh PbwHzBV2795+X9/Asqygnx63D1R9abc= X-Google-Smtp-Source: AIpwx48SBJ+Irhb4nlDpdQBb7Ejy8AdORQsH/aTbUR8ffOJLyLetxSRzjBSMR1g0Szr7GOITQ4tnUg== X-Received: by 10.80.195.129 with SMTP id h1mr35187030edf.190.1524592017889; Tue, 24 Apr 2018 10:46:57 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:57 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:35 +0100 Message-Id: <20180424174647.11840-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 06/18] warp7: Allocate specific region of memory to OPTEE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size. On WaRP7 we simply define the OPTEE region as from the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE bytes. Note the OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/warp7.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 0d3d324571..56f0cdd175 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -58,6 +58,11 @@ int dram_init(void) { gd->ram_size = PHYS_SDRAM_SIZE; + /* Subtract the defined OPTEE runtime firmware length */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; } From patchwork Tue Apr 24 17:46:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903735 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KAT+xQzY"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrYC0vRVz9s0v for ; Wed, 25 Apr 2018 03:53:51 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BE11EC21F48; Tue, 24 Apr 2018 17:52:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D7841C21F92; Tue, 24 Apr 2018 17:47:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B6F3CC21F5B; Tue, 24 Apr 2018 17:46:59 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 6D3FEC21ECF for ; Tue, 24 Apr 2018 17:46:59 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t67so2685184wmt.0 for ; Tue, 24 Apr 2018 10:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8BzIYzpRfFo5NwGhVUm3+UEP9zi6NED7bdgH7ykgg+g=; b=KAT+xQzYnjY5J8PNnHQ04tah66IGiIVSwIZRf0ImZblm04fOFUg8QXwQJj8VdIrlk5 bINVG7tE5T2iHv6pUr3QqbMJJgPBW0r9ymUfDykfKGc072Jpm3imNvB/ZuhpVSAW+/5Y +HOW/hpENdHFWlje4obqCfadRS3XgtaqUfs/4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8BzIYzpRfFo5NwGhVUm3+UEP9zi6NED7bdgH7ykgg+g=; b=TA/u29eb8VSl/XKfe46L3qDb/GpvTJ25/iVNLv9KJ0L0qR8BkwBdc7h+eEGMgHWmNR Sk+GUR6Rid/PGb53hwTJ+VyoHTHkgyM07aek84u+75Hrppy9I+i1f7z/yrgAtgQqsco7 AWdxOyGFiO7AwP0lbCNP76JR8po9eA/721U7yQGfu1QmY23ghkvkEG8aIR/wBugBTs1w x3PNY7oTpyKkImQJ6MfSVusGyfS5o47J7VlIjQiDSR5NBIiXWV0E9bTGxoMVOQpO8Kkb QycvKrcw8iBQHYJv9HOJI4cljeXC6sT7FwRlG2kDzsEdKJwGgr9A2fMkDD2QPeCVr06Z +qLA== X-Gm-Message-State: ALQs6tAEGBfKscPJHJLJjpQuZlK5quhsJ6t3e89YwKBWAVQaFAmeF93N NHQIHHWxGO4/JHeEziWL7Arnb0tSKxo= X-Google-Smtp-Source: AB8JxZrUQmVHDoMWKprKmF1Pg5StR2IOJRm5kW5POgY9nM/eyMRQTZK9pooZYML/mXGIvI9NnsEukQ== X-Received: by 10.80.181.131 with SMTP id a3mr1146456ede.207.1524592018898; Tue, 24 Apr 2018 10:46:58 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:58 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:36 +0100 Message-Id: <20180424174647.11840-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 07/18] warp7: Print out the OPTEE DRAM region X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Right now a region of 0x300000 bytes is allocated at the end of DRAM for the purposes of loading an OPTEE firmware inside of it. This patch adds the printout of the relevant address ranges. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/warp7.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 56f0cdd175..da52b183bd 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -181,7 +181,17 @@ int checkboard(void) else mode = "non-secure"; +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + unsigned long optee_start, optee_end; + + optee_end = PHYS_SDRAM + PHYS_SDRAM_SIZE; + optee_start = optee_end - CONFIG_OPTEE_TZDRAM_SIZE; + + printf("Board: WARP7 in %s mode OPTEE DRAM 0x%08lx-0x%08lx\n", + mode, optee_start, optee_end); +#else printf("Board: WARP7 in %s mode\n", mode); +#endif return 0; } From patchwork Tue Apr 24 17:46:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903743 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="E59iYMq3"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrdG1VzSz9s0v for ; Wed, 25 Apr 2018 03:57:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E1F99C21F5B; Tue, 24 Apr 2018 17:53:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3726BC21F88; Tue, 24 Apr 2018 17:47:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C5753C21FA3; Tue, 24 Apr 2018 17:47:00 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 675C0C21EA8 for ; Tue, 24 Apr 2018 17:47:00 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id j4so2684281wme.1 for ; Tue, 24 Apr 2018 10:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3TaN9kDdJjGTSyseOZIaFYvZ0g5xX+a/HfPH5EbG78U=; b=E59iYMq3CCna2w0mC5UaCp9MXQ+EnAwmrYpkUrfGUAtF1tNHAdZsfUuuTFu91d4cNj lxn2CiVhGmaSkuqBro/Sf20vqvgfw+nY2L7l6u47ZC86jKs27a7GZfXiBWeFUlo4ACbv ywuwI1zMjtI5qwnbIC49S+gDVmnLm9FUGzsxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3TaN9kDdJjGTSyseOZIaFYvZ0g5xX+a/HfPH5EbG78U=; b=mKzAeu0kzdwtJczhHHt9+6v1SWD5gmCT+G7zbGFliaM5fxHWo73H2PWLbR6dnIlDv9 65gE50u5RZNk1Z5nEG/5+KAXhQTc67I7DiI49A1MhI1HzhNLFXVLA0zlqboNQTd9wZb+ h5waWBIrkEhce3egbPdJS2/Zd+F/PP07IFkfY5RScQiWsR1nAo2DcTpGLlwyGvjLStEr XScGobacSYWz/jh+rm+NxrPOaEf3Ndf3lXlHeupSeisrI8rIO4YRLzIEqw/yR61y9Wpy +jEfAwjr1haT85n8Fq9Jf8MSWWZoeLv1VQUGVV5I9dxDQS2rReTA+Wu0qI/nJeg9B5ja K6zA== X-Gm-Message-State: ALQs6tD1KabFuNNQA38rCMyqoQAbHFj4Qa487Gg0eK1C0B2aShPm567w NJT+k4HT3F3kMer0VaP1sX+laO/x0Ec= X-Google-Smtp-Source: AIpwx49/SQ0DD2iWsel7fA3GK60LaQ6qKpNrAnjTrVAD0Zr2Fo1+c8AG0I6tXTa9ypnwUNQfCkBlcw== X-Received: by 10.80.230.12 with SMTP id y12mr34430215edm.278.1524592019850; Tue, 24 Apr 2018 10:46:59 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:46:59 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:37 +0100 Message-Id: <20180424174647.11840-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 08/18] warp7: Specify CONFIG_OPTEE_LOAD_ADDR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. This patch makes the OPTEE_LOAD_ADDR available via u-boot.cfg for further parsing by external tools. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + include/configs/warp7.h | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 75a141b8b9..f79c019d0c 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -46,3 +46,4 @@ CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y +CONFIG_OPTEE_LOAD_ADDR=0x84000000 diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c6ab29a831..9ae2ca4a53 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -40,6 +40,7 @@ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ "fdt_addr=0x83000000\0" \ + "optee_addr=" __stringify(CONFIG_OPTEE_LOAD_ADDR)"\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ From patchwork Tue Apr 24 17:46:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903738 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CZcTEeM+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Vrbq00VXz9s19 for ; Wed, 25 Apr 2018 03:56:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 89719C21F48; Tue, 24 Apr 2018 17:53:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 119E9C21F32; Tue, 24 Apr 2018 17:47:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 29837C21E42; Tue, 24 Apr 2018 17:47:01 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 5987DC21F34 for ; Tue, 24 Apr 2018 17:47:01 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x12so1483523wmc.0 for ; Tue, 24 Apr 2018 10:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UlVUY0RvQsR8i53fGYm3+tmvRrYPGPQz+D9t5fPhWJ8=; b=CZcTEeM+a34iQrKWJAnqSm/m9k4PwXYpo7u2ljn+FzsqGg7YSYikNQvnhkNic9PDbV J4y3ZgLy20fqYjQCeJUXDFSH/7KsMSjUSD6601BeRjnLj5bYA0B/WjIf0Rm4V+4rPTtC 0uD78sEkLZ+pCkH9CZpgyDldJQMbUOaeIm7FU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UlVUY0RvQsR8i53fGYm3+tmvRrYPGPQz+D9t5fPhWJ8=; b=Jtbl6PfvDKVjEnKZN8WA318Kcj32TmVL2kcgq3LB7TpZjSG0c187uUa5rmjrFu2wCJ QwHmX/wFidU+kU5FQAPGds7qvPVzfWZYRezsrPr1/QA3kO1pBwdQMACRLVRTZFjgOYJ2 yQE8ePoo7juNkFnUTGwGDm9/mHrWzbqNpXZr/JKfve8nrJaC0ItEJW7CL7Yaueb1TbLm CUfemoU0fk+beT1i4dQF270HnK6cQLfGNqrxSWnInnPwHMcfZCxmHQpfzCdqYxxHD+jb jBzn6KwFo1KTvDQaDGd38e6XcrGW8g+xTbjz2UJ9Gh+lvKW9uu8OXCt9/EJqs4UEPzY+ 8zMA== X-Gm-Message-State: ALQs6tBwPOHd1ZW3HfU2kCD3LbVW36M9Q9s6bshOLoABQREKC/WzOBkk 1qUzXTu4gMku8nCfJJI35ww2qe3A64o= X-Google-Smtp-Source: AIpwx4///Kziy0d0y0UX6+Gngh9OL9yVQioIQuBDUjlCT+mqocXmflOcXN9x3yt5E0sgzRtN03UDuQ== X-Received: by 10.167.216.74 with SMTP id f10mr23415736eds.204.1524592020854; Tue, 24 Apr 2018 10:47:00 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.46.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:00 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:38 +0100 Message-Id: <20180424174647.11840-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 09/18] warp7: defconfig: Enable CONFIG_SECURE_BOOT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Various function associated with booting the WaRP7 in High Assurance Boot (HAB) mode are enabled by switching on CONFIG_SECURE_BOOT. This patch enables CONFIG_SECURE_BOOT for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index f79c019d0c..e251acce04 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_MX7=y +CONFIG_SECURE_BOOT=y CONFIG_SYS_TEXT_BASE=0x87800000 CONFIG_TARGET_WARP7=y CONFIG_ARMV7_BOOT_SEC_DEFAULT=y From patchwork Tue Apr 24 17:46:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903734 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LTFXR9CV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrWV2BYSz9s0v for ; Wed, 25 Apr 2018 03:52:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0B257C21F3C; Tue, 24 Apr 2018 17:52:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 79231C21F50; Tue, 24 Apr 2018 17:47:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8B25BC21F45; Tue, 24 Apr 2018 17:47:02 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 6E31AC21EE8 for ; Tue, 24 Apr 2018 17:47:02 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id t67so2685443wmt.0 for ; Tue, 24 Apr 2018 10:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JSTwu/6TFy0B6LrfiVa/1mJN46x0gsguqSgOb42GlYo=; b=LTFXR9CVxq39mNNzzNjJ0cJHoU+44axHYAH1RmggmRosFgZX3M8wmWB3aQngbCZTZp xY816NcGt7xEq4bYty9zA0Z/14qacEmce1HULyq0Rbi+BLgbjRp7e7OobDkyv8sKvup4 2m1HZ2KdsUm3kaX8i9lIjcfFBKlfwaZ9a3vwc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JSTwu/6TFy0B6LrfiVa/1mJN46x0gsguqSgOb42GlYo=; b=em2P37Z8v03PxUhlfilynK3keoIHazh07Wi48/YiTl9W5n8mLC7jhgM4IED6aTT/fF 40LkPqNAPvvMygrGFIn8nbbpx5GfM271DOmasNs3Ptu0s6WVDA4oZQfwN1yFuSDFUApU et/lV+/SsyrSGmFLJBCqHOS28T3iLA/085ZeKT16IqqD9AxNZwoNJE8l2hv2bzDaJpW1 MnjPzJ8sgoqvcS5hvOeWJo4bfAOu6O3kaPFwaoZHhn/NZTCXsUv+EXwO6nvtinz7igxu 2vdJRGfMBuYI5QXwby+1v2APzdIX99Xt7ZtsD8XlJLI5tVxAMQK51j042g5oDOjTstDn YA4Q== X-Gm-Message-State: ALQs6tAV7FaK9Y8dbl/9UaysLbfXQk/0LnxtL6C+ZTC25W2/w6dmz+OE kNBFGI0ZUMlQDX4Hb6O+NolOgGLuOfM= X-Google-Smtp-Source: AIpwx4/HXqY0+QRCihrprpJIh5qxf+ku1RMkTbXbpZ8OdDrc/r4Wl+nunkaY7Z0qJjiIhWnN6purlQ== X-Received: by 10.80.180.225 with SMTP id x30mr29366860edd.155.1524592021919; Tue, 24 Apr 2018 10:47:01 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:01 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:39 +0100 Message-Id: <20180424174647.11840-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 10/18] warp7: defconfig: Enable CONFIG_BOOTM_TEE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch enables CONFIG_BOOTM_TEE. Once enabled its possible to chain-load Linux through OPTEE. Loading kernel to 0x80800000 => run loadimage Load FDT to 0x83000000 => run loadfdt Load OPTEE to 0x84000000 => fatload mmc 0:5 0x84000000 /lib/firmware/uTee.optee Then chain-load to the kernel via OPTEE => bootm 0x84000000 - 0x83000000 Image Name: Image Type: ARM Trusted Execution Environment Kernel Image (uncompressed) Data Size: 249844 Bytes = 244 KiB Load Address: 9dffffe4 Entry Point: 9e000000 Verifying Checksum ... OK Loading Kernel Image ... OK Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index e251acce04..b72c2262dd 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -48,3 +48,4 @@ CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y CONFIG_OPTEE_LOAD_ADDR=0x84000000 +CONFIG_BOOTM_OPTEE=y From patchwork Tue Apr 24 17:46:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903753 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UHqpV2KF"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Vrk96Mhyz9s0v for ; Wed, 25 Apr 2018 04:01:37 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8CE8AC21FA6; Tue, 24 Apr 2018 17:54:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E5431C21FB0; Tue, 24 Apr 2018 17:47:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 209C3C21FB2; Tue, 24 Apr 2018 17:47:03 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 64D59C21F6A for ; Tue, 24 Apr 2018 17:47:03 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id n10so2250951wmc.1 for ; Tue, 24 Apr 2018 10:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VWnbVLkiutYbj3isBgosE392n6vExkaSsbwdiZDYVF8=; b=UHqpV2KFnIagjyIJnZzOKNAhBOYIqvS+oo99CInci17a0qRhengo2j+eXkmE2rKEHX fkgS4EKAuCxE/VsappftF+dG8dtsuFx3F+DtfONs8qib/YDuZ5jamPTaP92qG4QqlouH 1ae8a0F9sRd7MZxr//XGD3ExEPgMvPV+WGO9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VWnbVLkiutYbj3isBgosE392n6vExkaSsbwdiZDYVF8=; b=tjfmbwh5+Rkgd7VxOK41gZ+rD9x5nWzeHcc8IMoV6KoPSOXkttDTZ4thQX3RfWDoCF tmDudVzBjN0VhPtfSiBH1R7anpHNoE94BxOBCW+V98Q6YIjPjR8OnMmzT4NxsQKqAGLU pGmo5jSdI8v+wswcC/HccAx7stDPa0usXHAOVHIqowtc2FRU+Ji/yjRlRu9/my7uGFXo V0muwIG5kpTtVdWsswsYLHDv/OwTNjLEsgQgRtzbmTnxADyQkJRCZI5ahPakkqppL4L7 X0i4W87PoviU1I11kSBSERhWKG1fi3pHOtIKm31F+SXGxqsXS6yzQqHy3d17RMPb8a+C 2U1Q== X-Gm-Message-State: ALQs6tBhIOcgFDypBf8gszpatQiyylYbQtojDncFPRTCWNoUFv768LCe zEk0tOadNY16c80fhMJp8bnR4Ze7aKA= X-Google-Smtp-Source: AIpwx49O12nru5auxIIOD0oF9WYyYaCFxIq1ZtfF5KVq70gGEIwHm8l6Ku4x2lnEe8AQcuzRrIwtdQ== X-Received: by 10.80.154.34 with SMTP id o31mr34035116edb.161.1524592022886; Tue, 24 Apr 2018 10:47:02 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:02 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:40 +0100 Message-Id: <20180424174647.11840-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 11/18] warp7: Make CONFIG_SYS_FDT_ADDR a define X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In order to sign images with the IMX code-signing-tool (CST) we need to know the load address of a given image. The best way to derive this load address is to make it into a define - so that u-boot.cfg contains the address - which we can then parse when generating the IMX CST headers. Signed-off-by: Bryan O'Donoghue Reviewed-by: Ryan Harkin Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/Kconfig | 6 ++++++ include/configs/warp7.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig index 61c33fb53e..00df19d47f 100644 --- a/board/warp7/Kconfig +++ b/board/warp7/Kconfig @@ -6,4 +6,10 @@ config SYS_BOARD config SYS_CONFIG_NAME default "warp7" +config SYS_FDT_ADDR + hex "FDT load address" + default 0x83000000 + help + The address the FDT file should be loaded to. + endif diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 9ae2ca4a53..a92e6758bf 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -39,7 +39,7 @@ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdt_file=imx7s-warp.dtb\0" \ - "fdt_addr=0x83000000\0" \ + "fdt_addr=" __stringify(CONFIG_SYS_FDT_ADDR)"\0" \ "optee_addr=" __stringify(CONFIG_OPTEE_LOAD_ADDR)"\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ From patchwork Tue Apr 24 17:46:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903732 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="RSAyFVsj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrSy6Ypxz9s0v for ; Wed, 25 Apr 2018 03:50:10 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A04C7C21FEE; Tue, 24 Apr 2018 17:48:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AB319C21F35; Tue, 24 Apr 2018 17:47:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 72510C21E6A; Tue, 24 Apr 2018 17:47:04 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 79213C21F68 for ; Tue, 24 Apr 2018 17:47:04 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id o78so2263338wmg.0 for ; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8OY3zX2k0+thB8b93UCr1TcpJMGILtGhyuQuzgFDZQ0=; b=RSAyFVsjFQXAhatba0mdkExYMWiD5FdNKjwCKVlnf2OlFv+XqLPHzxhQsC3kAfKJaA JZ5+Mv5c4zH1VNItO0t433aLK4NsnUUYD3qtAuDzFThDulHs9r84ChIcnpidziiI+SJa 8r6/rrYBWHA7TYdbcHceVe3oBgAL3m0l8+/mw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8OY3zX2k0+thB8b93UCr1TcpJMGILtGhyuQuzgFDZQ0=; b=qTN/LXf8PaaOljRzJkTGRq3BOFW9xZV58m+ft3MAFUCxPUiUNRf0jnfCtYIASwdqCS I4itXxob8zsNtMFSDF3lSVo3wjp5uxrgGs09BWw1gXX3a4HrV9oYfn78b2sYdR3T4quG lPyOPsc/RKTcdpdqPMgNsT30TRVM4ZIx7iYu80FV7FFr1axxvdsvnAuQjpYPxMg6fRmq D3aTyZvPOU6ujzAsk3CySpvPxP7HpgSLzGBW/Yv/9VkPUGBYBDpcp7R2fHy3kEHzBQSC WHXOMDMrPdGfVZl7RUC0DNPWkyY+s6UvMLWd5YgROGkPn8uSKRUiDR7WvotEX0U+FXLy B4pQ== X-Gm-Message-State: ALQs6tAvzqEOq4Y89RrJX7EjBwK4J85naKz1xoeG1eAaVl7enMMgta1i 1nKHhBCTXlCuK1vAP5p0uoxv2XFKMWU= X-Google-Smtp-Source: AIpwx49qwxk5716GMTxDGPepy4lyRyUV67rC0qry0PjFYLtGGp/EwysJkw9uKFOrsJspbPkpYq9vvQ== X-Received: by 10.167.214.140 with SMTP id d12mr17376389edr.6.1524592024000; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:03 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:41 +0100 Message-Id: <20180424174647.11840-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 12/18] warp7: Add Kconfig WARP7_ROOT_PART X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Adding CONFIG_WARP7_ROOT_PART allows a defconfig to specify which partition is use as the root partition on WaRP7, this is a desirable change in order to support a different partitioning schemes. The default is the current partition #2. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- board/warp7/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig index 00df19d47f..c089bca2ba 100644 --- a/board/warp7/Kconfig +++ b/board/warp7/Kconfig @@ -6,6 +6,14 @@ config SYS_BOARD config SYS_CONFIG_NAME default "warp7" +config WARP7_ROOT_PART + int "Partition number to use for root filesystem" + default 2 + help + The partition number to use for root filesystem this is the + partition that is typically specified with root=/dev/sdaX or + which gets converted into a root=PARTUUID=some_uuid. + config SYS_FDT_ADDR hex "FDT load address" default 0x83000000 From patchwork Tue Apr 24 17:46:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903736 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Mvx/qhgg"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Vrb50Fhdz9s0v for ; Wed, 25 Apr 2018 03:55:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 94AA2C21F85; Tue, 24 Apr 2018 17:54:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 02963C21FA0; Tue, 24 Apr 2018 17:48:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4D829C21FBF; Tue, 24 Apr 2018 17:47:05 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 7FA5AC21F68 for ; Tue, 24 Apr 2018 17:47:05 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id o78so2263410wmg.0 for ; Tue, 24 Apr 2018 10:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y7xOa4cPzJ0yLRv3aj6Wl8C57s/Dp3eESkaRbvT9shc=; b=Mvx/qhggRa0YSzKUp0HM0DXSepX5OXPFguTXKiEjhWFMGkhk2QuYtND8MDEZx3PwF7 y0jh9ExHjHSV5OW8oKqOoVtne4dte4vdgNM7NT/7MSehgHjjROk1+fCuK3gGOqj0MZfg aebqaq3BnrC1R5ullytKx3UGVI6DPL58Nt3Cg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y7xOa4cPzJ0yLRv3aj6Wl8C57s/Dp3eESkaRbvT9shc=; b=oStUBVhtg8wbnfzBKIPKXT1Q6VKem/yCz+p3/bTwTxEYAZ7ZvYpAFBL6m7ltC4pq7g nkSEeDnkjmr5H2+oI5JUwL3ewOpUBMHlizgJeKUMBVjH9MiQBSwNG/e4z/LTk+LqUNkQ 4zSGKxEfMwpYJIqxYBX9scbrHnlN4EQZiZcLSNGAD/vBbBIreb3lUd5f2+3yP/FQWvEc +nlxX6/7N8xFcfTZHXHGgCrtwd1KUuqTg2dFT3nWMhJ011Q2qjoXdRDcoIYlioU+IURL gixIF3MjfyDsjJBqdb0uvFrYxZuJwGaiazgemqaWmm6odi6TXmSA0saOjP8PGqrQlx33 E5FQ== X-Gm-Message-State: ALQs6tAUsh1n/2bdkFF6juD2Bgg9N7iOPkbMcU2qS3PyUdD8VAh9yXwT Sol8YrWekl41hdX/h0SwBIY2WdIpySQ= X-Google-Smtp-Source: AIpwx4/0gRIT3D3tuzKvdc8Bdk2tEeF8rBU52miJtWkpjfnah6It/qWDGE1pwriGHviIFEurz3nTRA== X-Received: by 10.80.149.219 with SMTP id x27mr34731342eda.99.1524592024930; Tue, 24 Apr 2018 10:47:04 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:04 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:42 +0100 Message-Id: <20180424174647.11840-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 13/18] warp7: select uuid partition based on rootpart X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Assigning the UUID discovery path to a tweakable environment variable means that later steps in the boot process - particularly a boot script can change the target root partition of a particular Linux boot. Retargeting the rootfs is an important feature when doing ping/pong upgrades allowing a boot script to select ping or pong as necessary without reprogramming the bootloader. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index a92e6758bf..f2ee09b831 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -45,7 +45,8 @@ "ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ - "finduuid=part uuid mmc 0:2 uuid\0" \ + "rootpart=" __stringify(CONFIG_WARP7_ROOT_PART) "\0" \ + "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ "loadbootscript=" \ From patchwork Tue Apr 24 17:46:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903746 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CjQYX4oX"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrgM3wZVz9s0v for ; Wed, 25 Apr 2018 03:59:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3B2C4C21F62; Tue, 24 Apr 2018 17:54:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1CB07C21FBB; Tue, 24 Apr 2018 17:47:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 714D3C21FB8; Tue, 24 Apr 2018 17:47:06 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id 74612C21F74 for ; Tue, 24 Apr 2018 17:47:06 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a8so2684318wmg.5 for ; Tue, 24 Apr 2018 10:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K/+e66Nc2iBCAf3pVZzkFQ3xwrc/4tEDYekjiCTug2o=; b=CjQYX4oXEkDdbtidIAqaHFY9CfMvIkUJIG/3IVMthFIdwbYbX37dpzJtwG4rfd9p1p 89IWyh0A0FwlbpWOBbQYjfvGdG5jKjwgthUwiM3kZaSNwEkbjsAiCRGfVPQtjAfkGbSh Xxork9LDX9RYYMI4HweFzBZhL/PDrbs+Lp4Qo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K/+e66Nc2iBCAf3pVZzkFQ3xwrc/4tEDYekjiCTug2o=; b=E58Lcn9NEzGLB/9CeVw9DEuRjuspVn5zg2wK6S8QKNrJfU6hcXIWOgQmoDOKPTdlYf 0at3RtI0ES348Ou3HAVdcr7oXXyBKHPx1sr3eqJ8thkHGiOQir5ElzUzOwe7Uocn6816 m+N9MMyV1yAJCfyX6qpz16BCUlgrbNTGkYAced3O628OELQcbRddQsk3mDG5J8Yhpz0X aSTZYcJuV2i45BqTwdI5paPwIiH2O3vEfjEKuM8ZJznvUNzPxp66ZgzTCcmTZc17LhlD HdC8nbBSuZkQYk4a1sNbflakprTH+uCviqEq/0wiIhRIpsYoY7bIp2R0UdBA/yPro8OI 53qg== X-Gm-Message-State: ALQs6tByQtVK+Da+l+e172K4OBsZVg3zNVMN2QFTq7CdvgUI34w3/B+Q ISm07qI/BZE2D2b7Amb3C3Yl3TKGKFQ= X-Google-Smtp-Source: AIpwx49CoRQVjU4/kVzmXanQj/7aFhQSTDtpUZgW4EB5oCX8tr/oCRJCxbZEI21jBv2QrZ11h2mDLQ== X-Received: by 10.80.131.67 with SMTP id 61mr31341391edh.48.1524592025961; Tue, 24 Apr 2018 10:47:05 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:05 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:43 +0100 Message-Id: <20180424174647.11840-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 14/18] warp7: Define the name of a signed boot-script file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We need to know the name of a signed boot-script, its better to have a separate variable for this then to simply append some fixed string to an existing image name. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index f2ee09b831..53fbcb2f4a 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -33,6 +33,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_DFU_ENV_SETTINGS \ "script=boot.scr\0" \ + "script_signed=boot.scr.imx-signed\0" \ "image=zImage\0" \ "console=ttymxc0\0" \ "ethact=usb_ether\0" \ From patchwork Tue Apr 24 17:46:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903742 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="EAIg6U/d"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Vrcs4JLhz9s19 for ; Wed, 25 Apr 2018 03:57:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 47DA4C21F8F; Tue, 24 Apr 2018 17:53:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 30F93C21FA6; Tue, 24 Apr 2018 17:47:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AAB9DC21F87; Tue, 24 Apr 2018 17:47:07 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 962A7C21F62 for ; Tue, 24 Apr 2018 17:47:07 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id l16so2270624wmh.2 for ; Tue, 24 Apr 2018 10:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7IlQCD3u07uvokxkfd57KyfsyeEq+VXTtO1fZ+Ao0M8=; b=EAIg6U/dOK2ULY0Y2h9gC+/5X3CVt+6vdCkR5t9CyrEms4D9kEFrbbG0kD9GBShhYQ YtcvX9MQkH7cqYCzGC7jDDF7md+jz6WYJgKaXzbhsANZe+nrWlMOxh/dGTh9eao9A04K HBlugI5n6+dJxKQIY76JYMk4F5kxREpYiz+3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7IlQCD3u07uvokxkfd57KyfsyeEq+VXTtO1fZ+Ao0M8=; b=L9VfHLOCJBCh3w7h2cqlUOEvC6LYITaB9w+mubXyWPwjYJsbOQlbyocKhTAM8mdwFi 32+Ve5z4U0TrwIL+JYndWtC4v7XAcj6ZN8NXl8QmuQX0HhJsKUm9608oX5dLIB9mnueB 0P3A9AFS1Kb89nLqTlvgSM2WIerYlriPIRzFizDU/OVOUt0oHxwUXrIJCx7XY6TyNQG9 Wjgi9ilBzz2lVA+EJaxyD9I0r+y35ifX+FzORaMwSH/wpvsNwAQA2wJ9pEyy+OMhfSix 7iRSbY8rUBQ0LfkXbjfaRf/+a0xv7SoXH7sW0Qrka0UKBYQN4TDaouds3wJeKmbPvuBA b5eQ== X-Gm-Message-State: ALQs6tDq60Thy6pwkLMWn5H1+U0RCyJlPUUBLANNJ6MAI/MSNhPXc36x OdKfeIRYg5Tc+Qn4cfaHgif1NL0+suU= X-Google-Smtp-Source: AIpwx4/KTBaODjjo+dQwX5u4YMnz7nUrecbHRYkbWvuiOxmEG4RHJCMztBvHpP3zXMe+TE/o43gIEw== X-Received: by 10.80.182.44 with SMTP id b41mr29290387ede.255.1524592027054; Tue, 24 Apr 2018 10:47:07 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:06 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:44 +0100 Message-Id: <20180424174647.11840-16-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 15/18] warp7: add warp7_auth_or_fail X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Doing secure boot on the WaRP7 using a common image format and the same variable to represent the base address for each call means we can reduce down the command to a single environment command. This patch adds warp7_auth_or_fail as a wrapper around "hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0". Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 53fbcb2f4a..c957b2d579 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -50,6 +50,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ From patchwork Tue Apr 24 17:46:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903737 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Q7/NebHM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Vrb90D8Kz9s0v for ; Wed, 25 Apr 2018 03:55:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B1465C21F3E; Tue, 24 Apr 2018 17:52:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3132EC21F8F; Tue, 24 Apr 2018 17:47:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D6A9EC21F95; Tue, 24 Apr 2018 17:47:09 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id B4C3DC21EA8 for ; Tue, 24 Apr 2018 17:47:08 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id 66so2671124wmd.3 for ; Tue, 24 Apr 2018 10:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=Q7/NebHMWQ86FHT40wbnMwhOoRbe+y0b8yA3t+Hb8zyekM9pEKUg2ZhZRwK4uFCj6d iVxO36Tbyr15rSmk0/xnZKRWNyERcMTOzyClmW6LbGpLYcz5/YQCC/lgf5GW2ycmORpK +hvXXQlv8qL7s5HTh+0UZSRn+VIKg/gju0bNQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ky2Brv8hbcba5qiWCt8sh3smlDw1vzlLhmoKUt78b34=; b=g6M9TGtAvrJXlfkX+24R1lhW/XOb3dAqoL3ljB0dyzrJHvJKFp3rvv01K9fx6KF6dJ HUjCTeRYvIJedRfalivLKGQ4qXFJqkrA/fobKzAhyqzBd8Ojvp37kw8/Vfqe1sFhKv5S eLNmtBcCKg1cGePPjVpFh1sW2LnqVEYdZ7/pf6TQMRh+EAr3Kcn3KK5bWuKz1i271KPK fcr5WktRN8WAMmS0Gsi/cIf/WJnij936foZIAu+xrZCy3UlQ7aB0LlDePeh1surOvyvk 0mngvRLM0WJaB4HWMzEFWdlTWL8Z1toSfADHQ/q2fyBMM/bVQj8iK4HuMS5cFvCl3LHh hBDg== X-Gm-Message-State: ALQs6tC9qNbZbhHoXHwCsOi5Ik/ypjPwSps9Up7sPNo4elea4+ztoBk1 m4Zo/vUKd7ytFFEKiaq+pDZsYyy9/V8= X-Google-Smtp-Source: AB8JxZqKlBF9Oc8ftxwOQ1fvxNXNvEmrFLkktbiOtMfWGmqlv0X09ufYDQ0PqlKeYlmV9yAx2Bubyw== X-Received: by 10.80.181.227 with SMTP id a90mr3165741ede.69.1524592028216; Tue, 24 Apr 2018 10:47:08 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:07 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:45 +0100 Message-Id: <20180424174647.11840-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 16/18] warp7: hab: Set environment variable indicating IVT offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch introduces the environment variable ivt_offset. When we define a load address for Linux or DTB or any file the IVT associated with that file is prepended. We extract the actual load addresses from u-boot.cfg and feed these values into the code-signing process - hence we want u-boot to have the real load addresses exported in uboot.cfg. ivt_offset represents the addition or subtraction from the load address that must happen to find an IVT header. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index c957b2d579..3b1e7c7e88 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -10,6 +10,7 @@ #define __WARP7_CONFIG_H #include "mx7_common.h" +#include #define PHYS_SDRAM_SIZE SZ_512M @@ -50,6 +51,7 @@ "finduuid=part uuid mmc 0:${rootpart} uuid\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=PARTUUID=${uuid} rootwait rw\0" \ + "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ From patchwork Tue Apr 24 17:46:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903744 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="EL6tagl+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrdR0Qhyz9s19 for ; Wed, 25 Apr 2018 03:57:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id AC9F0C21F62; Tue, 24 Apr 2018 17:55:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0466AC21FC0; Tue, 24 Apr 2018 17:48:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1DE48C21F34; Tue, 24 Apr 2018 17:47:10 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id B5991C21ED6 for ; Tue, 24 Apr 2018 17:47:09 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id j4so2685082wme.1 for ; Tue, 24 Apr 2018 10:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jE8qpnQLnU0+3qy5fm/oT41PasTm8/KNJdz+VQiXGMg=; b=EL6tagl+VJw7Tx+CGCZpgyNajxOoMI4Yh7S280CAcSCjs8lyIb5r+ZvcisOl6jRgWG xBKVLpVcCBIsIin7N7DC4ophFt2i+5Z/d2bTC4olkqDDGhg3iEamLIyG0vyLhApfXx38 VT7pmDNrvp1o/PO8VBQ7VBODy5NnGaIB06g60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jE8qpnQLnU0+3qy5fm/oT41PasTm8/KNJdz+VQiXGMg=; b=dJQfGLyPx1jaW38gEXOBkmC9sPBbarDQeZm4Qivy8m0WXd0TzttbzcwgWrOKyAYt51 N4u3fi1Y9yrHph9prNSssL1hFYPHEfChxMjo1uXHXZqoq5HcfIiM3MjOrtTLW6fx4LDd PqUMMwHASDtbVHQIHRvLiRfH5DbHNhh5t0tQYuEAm9WQHLUsDb/QutlFy8ZuuDbpN0QM gEhZrvXJLjbj4w0t7IfSQb+y1xcYw+3sgOfLi8jTz2C3i9aXbY+xyXeiaq/NkrLBOlbz oIqVms4FNEVgrBpENRQxtM8wJUAm6VeeGBbMyTjLno3rAegvXWmFYoCjs2JGF+maMrgl 4Lng== X-Gm-Message-State: ALQs6tALJBNTYG43fkv/Tcu4YLu4jWZ+TG2wR0yy2kLODR/dOjRflykP CaTVN9/ALP/amDpJdJhqQw95UzOZbJM= X-Google-Smtp-Source: AIpwx4+qhT2BXmmDPmsH9vZFbW3mdtsqUfN23e3OBxfbBrQTJxMmU/Kxm6l5kY/VfzJEZI0c8LD2yw== X-Received: by 10.80.183.65 with SMTP id g59mr34669370ede.129.1524592029189; Tue, 24 Apr 2018 10:47:09 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:08 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:46 +0100 Message-Id: <20180424174647.11840-18-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 17/18] warp7: defconfig: Enable CMD_SETEXPR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" setexpr allows us to do arithmetic for env variables - something that is both useful and required when doing HAB authentication without hard-coding HAB load addresses. This patch enables CMD_SETEXPR for the WaRP7 defconfig. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- configs/warp7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index b72c2262dd..b936f4aab1 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -21,7 +21,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_SETEXPR=y CONFIG_CMD_DHCP=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y From patchwork Tue Apr 24 17:46:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 903745 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="OxHGJlHf"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40VrfT1v7pz9s0v for ; Wed, 25 Apr 2018 03:58:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E23A1C21F9B; Tue, 24 Apr 2018 17:56:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 09486C21F17; Tue, 24 Apr 2018 17:48:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5B49BC21F84; Tue, 24 Apr 2018 17:47:11 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by lists.denx.de (Postfix) with ESMTPS id B3891C21F62 for ; Tue, 24 Apr 2018 17:47:10 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id w2so1490734wmw.1 for ; Tue, 24 Apr 2018 10:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DMf/oA73RNxqj0+uoeZ2gY6oTI3nNq2R5BQmzqtkL5Q=; b=OxHGJlHfRz6e3d/lusSaigiFQxNX8Yn/zqvmHPhhiFGVjLyLxcpzLv1f+atD3yz1Co ySAVhFUrAnS1Xhg+nvhGrtqmCGvIuyB00hxLTO2Oo4zM75xX8xlrmOuGPPjOfwlDxOGY O52wsczbUJNLURoxID5m99QPzFwBpCvxVLZJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DMf/oA73RNxqj0+uoeZ2gY6oTI3nNq2R5BQmzqtkL5Q=; b=W0r6SrqpaV/3+gDuh4F5257dLxGSJr0hGjcG4ChIlm6/7ia5hFEWI6bDyX9VXczASC yF94yY2vV7r84WXyXve76kpACMQvlXCLKD7C5CmfQ/4UsfZ2SbGG/f03HjAgGDZkxB9F mpEHDzbZUqNunRjHmqV5NC3jA7oTowumJxKnEX2niFIJqGg/3LBaGf++89YgKcb0oBGq pk1CxU4jhn1BgybFOLir6y8wfUylrdnPkZpPt0LxWg0ztmLmrh9HvM2FezoVZrFc0Hcb agK5lk+98J8E4nG2zM4wkC2LUabPIrQhHQQsPYq4bvs4MASBDukqOpMUIkJsQBGGjtDt 53Yg== X-Gm-Message-State: ALQs6tDJbNony/a8Ufjag0PbIyboTzF4JhP42QQEccck13+54fgvJWv1 pYKhMVmL9AVtJ7Qzcd4pHXMZGI3krzg= X-Google-Smtp-Source: AIpwx4+1QsCtXzaciz4mvVp3HPan+J10xbrfdzzjHq/J86vn/ZsRL3Zj79HH5LmxCXemKfLP9VTPwQ== X-Received: by 10.80.135.14 with SMTP id i14mr31410626edb.86.1524592030171; Tue, 24 Apr 2018 10:47:10 -0700 (PDT) Received: from event-horizon.net ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e6sm6443087eds.20.2018.04.24.10.47.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 10:47:09 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, sbabic@denx.de, fabio.estevam@nxp.com, breno.lima@nxp.com Date: Tue, 24 Apr 2018 18:46:47 +0100 Message-Id: <20180424174647.11840-19-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180424174647.11840-1-bryan.odonoghue@linaro.org> References: <20180424174647.11840-1-bryan.odonoghue@linaro.org> Subject: [U-Boot] [PATCH v4 18/18] warp7: Add support for automated secure boot.scr verification X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch adds support for verifying a signed boot.scr. With this in place it's possible for run-time Linux to update boot.scr to set different variables such as switching between different boot partitions, pointing to different kernels etc and for u-boot to verify these changes via the HAB prior to executing the commands contained in boot.scr. Signed-off-by: Bryan O'Donoghue Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- include/configs/warp7.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 3b1e7c7e88..c9be70ca2a 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -53,6 +53,14 @@ "root=PARTUUID=${uuid} rootwait rw\0" \ "ivt_offset=" __stringify(BOOTROM_IVT_HDR_OFFSET)"\0"\ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ + "do_bootscript_hab=" \ + "if test ${hab_enabled} -eq 1; then " \ + "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \ + "setenv script ${script_signed}; " \ + "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \ + "run warp7_auth_or_fail; " \ + "run bootscript; "\ + "fi;\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ @@ -79,6 +87,7 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev};" \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "run do_bootscript_hab;" \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \