From patchwork Wed Dec 27 12:25:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 122777 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2121316qgn; Wed, 27 Dec 2017 04:33:05 -0800 (PST) X-Google-Smtp-Source: ACJfBotiKfinXPmxxtQTZb8ZOprQYTniYdl++vUm/nnhqX1t+CvHMUSBwrKlFlWb4xi+rcIMtwRQ X-Received: by 10.80.177.1 with SMTP id k1mr35370270edd.41.1514377985244; Wed, 27 Dec 2017 04:33:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514377985; cv=none; d=google.com; s=arc-20160816; b=CBir3xMKuxCDLFebjp/tZIolB2uwn+yN69M0FJlSunxe01jWS51rbBiPo0o1LYFpOK N31gXDcaJ7T1g0EOKeVmZbz2KHdsFjVbWiKOHv0dr3qgRzMvvPdZHppjzX979AAs99VI Jhocz4gf5+59c7hTnTl7/iehCAUcfUIMtOaVdx+9K11l6+aAdzw+5dVJc3sUNhsTveE3 BrmsHZjIdaoQdwXmc828/LBBCRKVMmnP6R5FwMm7KE4ad7O1zF9r5GHgkLgDCJBee7Gj OOTk1J8TxV6oDbxQBvCMt/s0kEOwDrh87jCRQNCzN4pDncjVrU/U/xTlkiZH3niwDatl dHIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=tHZTM+YUheUxYpej7ovG8rxd5LE3/L2uY3LdTdM+Uro=; b=Hdt3WRq1PkxagZEypdIvQ1BmF/tbGvMUfOahdTMGNMZVXXAZnr8Q8DHHRQ1xb+SjpJ 3lTiNLDtISE0UeBlv4CX9dEcMBF/H+56Fhcph9B9Al9rdYn8erWK5GSX5BaRMTXpI+41 hvJXu0jOWvJlX+4vLxWD3PMx0Lkj8hIAR9cIQ4NqZuq5+X1/U3rXVsbEGR/LxbIWHeJz v4VGGu6v4fv350gA6IO88xKbhljJbf4yAyMbWn49WQrA6l87X9nkFUrBuckOpGrBNgS9 usIT6rJM8qYdzF7XeTNMNJWKcp1H8nxYCJd7cdT07vxg9QreIjXVbVlM+URwERJtc5m5 O+pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EzA7JWdD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id y6si2210894eda.452.2017.12.27.04.33.04; Wed, 27 Dec 2017 04:33:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EzA7JWdD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 85872C21E55; Wed, 27 Dec 2017 12:33:02 +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 A6780C21C59; Wed, 27 Dec 2017 12:33:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 49E32C21C4A; Wed, 27 Dec 2017 12:26:19 +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 D18F7C21C34 for ; Wed, 27 Dec 2017 12:26:18 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id f206so38983455wmf.5 for ; Wed, 27 Dec 2017 04:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=x7R8dqaXbF2hykry9KuXGHCkRiDQ7Qc9Ze3rTdGn7BY=; b=EzA7JWdDKpDJcXtjVbvShGYfn/czatlP9+KDMgquw7W0nJg4hqyGEpRpTTk13CiUo+ xKWBxbuurIbXLwixiUbCGr01BabwsB5X0QrB763Q0G7usIOFd1vh0Iuckesx3onLMRfo 1LkJO7TMDaXyeDwJsPLlaDkCkZ1o28uSh1Tts= 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; bh=x7R8dqaXbF2hykry9KuXGHCkRiDQ7Qc9Ze3rTdGn7BY=; b=oEm9sqCEZvN4rgGzGA5TFFSegCsjNHcAjILyibiJyv0Zv/hds8drFLdfSr0eUIAcuJ 9yykAZXU6Tqgh5E/qn6keMEg037rnSUmT3hZHo0vOQJDs8Ta2TWJz+Ff56QyCg2S9e1m TydvrBD4BLRpi/wUDLokW3UDG6xrjGVfWFbc766nuJP8tpHPvj5AOEpuYWbTnUil/ofV KZXL/5IdRi9jaI9L5VRV+8wTgAlfZz9w6rLFWRrMabySlENxmkNcnFaS8vgWe42Ug2yZ x4mcmZtmNey90GokH7IDTwCmd+MxpmuC1X0FOwXKUka6h/0qVSnnfs479OiTcD6gdqOl nKcA== X-Gm-Message-State: AKGB3mJB3GCF4jYTul8IlNKwJeCFTHfRc9vUmhakpyZposIdNYt0nSPD P6HgS/BXRL8nL3cmIVYsP/fWWR+4Iio= X-Received: by 10.80.244.194 with SMTP id v2mr35417812edm.68.1514377578246; Wed, 27 Dec 2017 04:26:18 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a5sm28388838edm.47.2017.12.27.04.26.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Dec 2017 04:26:17 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Wed, 27 Dec 2017 12:25:43 +0000 Message-Id: <1514377566-28512-1-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Wed, 27 Dec 2017 12:32:57 +0000 Subject: [U-Boot] [PATCH 00/23] Fix and extend i.MX HAB layer 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 patchset updates the i.MX HAB layer in u-boot to fix a list of identified issues and then to add and extend existing functionality. The first block of patches 0001-0006 deal with fixing existing code, - Fixes indentation - Fixes the treatment of input parameters to hab_auth_image. The second block of patches 0007-0013 are about tidying up the HAB code - Remove reliance on hard-coding to specific offsets - IVT header drives locating CSF - Continue to support existing boards Patches 0014 onwards extend out the HAB functionality. - hab_rvt_check_target is a recommended check in the NXP documents to perform prior to hab_rvt_authenticate_image - hab_rvt_failsafe is a useful function to set the board into BootROM USB recovery mode. Bryan O'Donoghue (23): arm: imx: hab: Make authenticate_image return int arm: imx: hab: Fix authenticate_image result code arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail arm: imx: hab: Fix authenticate_image input parameters arm: imx: hab: Fix authenticate image lockup on MX7 arm: imx: hab: Move IVT_SIZE to hab.h arm: imx: hab: Move CSF_PAD_SIZE to hab.h arm: imx: hab: Add IVT header definitions arm: imx: hab: Add IVT header verification arm: imx: hab: Verify IVT self matches calculated address arm: imx: hab: Print CSF based on IVT descriptor arm: imx: hab: Print additional IVT elements during debug arm: imx: hab: Define rvt_check_target() arm: imx: hab: Implement hab_rvt_check_target arm: imx: hab: Add a hab_rvt_check_target to image auth arm: imx: hab: Make internal functions and data static arm: imx: hab: Prefix authenticate_image with imx_hab arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled arm: imx: hab: Make imx_hab_is_enabled global arm: imx: hab: Define rvt_failsafe() arm: imx: hab: Implement hab_rvt_failsafe arm: imx: hab: Add hab_failsafe console command arch/arm/include/asm/mach-imx/hab.h | 46 +++- arch/arm/mach-imx/hab.c | 480 ++++++++++++++++++++++-------------- arch/arm/mach-imx/spl.c | 38 ++- 3 files changed, 370 insertions(+), 194 deletions(-)