Message ID | 1514486982-19059-22-git-send-email-bryan.odonoghue@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3809216qgn; Thu, 28 Dec 2017 11:03:44 -0800 (PST) X-Google-Smtp-Source: ACJfBotk4/9lEHVPGiYR4wU4Fdbl0rfMAaXqUJQhp+3Jm4TxbzD/1TmPWAMGm1KhFfbt+NcwaOrx X-Received: by 10.80.165.109 with SMTP id z42mr39727741edb.18.1514487824158; Thu, 28 Dec 2017 11:03:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514487824; cv=none; d=google.com; s=arc-20160816; b=gPbFze5mNRxbB09JiRU5hfp9DBbgIoNPlcAIp4AkZBHcFMkX9qh3/89AQ+yxeACFYM qv4VI849Qx8eyHUk5Aqz/FGyXh5b+XlhFc2+jeUx5dmtHIZxCfeOh4r01ZzIb7Qj//TP JRsyl8i+cL9X21Vjr9AXjARHtoyJEe9gkrROrYb1S4JPl3tdoOHSQlCta3qZ7gTA8tHR 1RyzqkSocj37Zqh+u9ljGRGifOlpT7sFIuBu/uCIqWAj5cLsZrWvHmE+ff9MahNNaPnq 4nbh7XKdnql5HGoWCgolOo1zvvU6DjgSIRRSNkDh3cJqZT/iwOadIua4jXuI7LyA2GuD Jt8g== 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:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=nEiq0xect4AoWDmrA6PY0pIBd0aNAXXS+iZ9gzfxaCI=; b=BBZtJ4D/EL3LSJ1WyuztB2lqBNOvahQ9c76ZVvy30h9l/bahejYdK/H8wLev6bqLH1 Kt3Lz8ED69j97y+bV7UZTKV/9akpFd4I+7JXC1i4lcEf+CwvdxDw1rHUHH/6cMnQjsui +s7qhtVPZdzuyXPqolsD0fR4AgZAuATThYlfo++XtoVSoMVXUQ3LnJnaFj3DIvANrUrB fAdgT7uKZhSnBslSpTdeRN598IruaOkz/Z4NeBpahszQmcBiQIxKKoOYrOSM7nNOH8Un 1veNg02vSsrLDZgkhxtKqybQ4dGnZbrGaeb1BOOBdIWtKjiGyuiYQb3X/LtBtqyJoDeJ TCjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=f0CwntY3; 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: <u-boot-bounces@lists.denx.de> Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q28si1879089edb.504.2017.12.28.11.03.43; Thu, 28 Dec 2017 11:03:44 -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=f0CwntY3; 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 C30FFC21DE8; Thu, 28 Dec 2017 18:53:51 +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_DNSWL_BLOCKED, 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 798CDC21E33; Thu, 28 Dec 2017 18:50:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 97D64C21DE4; Thu, 28 Dec 2017 18:50:15 +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 24B24C21C8F for <u-boot@lists.denx.de>; Thu, 28 Dec 2017 18:50:10 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id i11so44991079wmf.4 for <u-boot@lists.denx.de>; Thu, 28 Dec 2017 10:50:10 -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:in-reply-to:references; bh=cYwMYV7HIFFPZjWLmuiyD2xuH7kQg/RPLyU9z34NM2o=; b=f0CwntY3RchKAqe2U3KUrMeFHjOE/t6AuFxidVDBrp/qKxu0Isg3s5lTElC5ajP85B xQuILTNm7o9l9zXJMqOmOnlveH8TWjzaGLdfsOYCBP86RVwMpNzGmgvXylNpfysu0pin K0AxJJJjM6X4Ie4WQMAIb2WiuABjtciDokiY0= 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=cYwMYV7HIFFPZjWLmuiyD2xuH7kQg/RPLyU9z34NM2o=; b=d4fmVJ3pKRbaySLT1XHZdDFN29BO8j9qqoQkA5apMVOSF9sFq3/VKdhNYILKmdBliQ 4UIpjrBzu82tmieL6L5G6LiVj0EtmBhI0LZKGnXmiXi5Jwa4JITjjb/DMBJKWXDU6F1l jz+aGVwe9yxJU334r53nA1qiAXgQeEvO5CachCd73SE/MAlPtGvVxQoz7Y1xhbMlMSaY 5ivoLJBPLtmtpPEHjubIZATemDJNW/wwy0oOgUUKffXw1ysLoXYietUhg6WBNmaz90/b laCPduEIN/FJgEqpvpWgeB/ggq0htU42Hrl2+Hn4cCvUpgdv8HGk2x4Opth8nbiy5Le9 0WSQ== X-Gm-Message-State: AKGB3mId2SIRSWDef+p97NtaJkzsEb6Ju0IF81hAc8bzrHtBqQO1jmsZ AiFj2ocdD3PUBg005HcsYY87I/txQys= X-Received: by 10.80.243.136 with SMTP id g8mr41812543edm.42.1514487009525; Thu, 28 Dec 2017 10:50:09 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x28sm35246579edd.0.2017.12.28.10.50.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Dec 2017 10:50:08 -0800 (PST) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Thu, 28 Dec 2017 18:49:40 +0000 Message-Id: <1514486982-19059-22-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Subject: [U-Boot] [PATCH v2 21/23] arm: imx: hab: Define rvt_failsafe() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
Fix and extend i.MX HAB layer
|
expand
|
diff --git a/arch/arm/include/asm/mach-imx/hab.h b/arch/arm/include/asm/mach-imx/hab.h index 5c13aff..a0cb19d 100644 --- a/arch/arm/include/asm/mach-imx/hab.h +++ b/arch/arm/include/asm/mach-imx/hab.h @@ -140,6 +140,7 @@ typedef void *hab_rvt_authenticate_image_t(uint8_t, ptrdiff_t, void **, size_t *, hab_loader_callback_f_t); typedef enum hab_status hab_rvt_check_target_t(enum hab_target, const void *, size_t); +typedef void hab_rvt_failsafe_t(void); typedef void hapi_clock_init_t(void); #define HAB_ENG_ANY 0x00 /* Select first compatible engine */ @@ -170,6 +171,7 @@ typedef void hapi_clock_init_t(void); #define HAB_RVT_AUTHENTICATE_IMAGE (*(uint32_t *)(HAB_RVT_BASE + 0x10)) #define HAB_RVT_REPORT_EVENT (*(uint32_t *)(HAB_RVT_BASE + 0x20)) #define HAB_RVT_REPORT_STATUS (*(uint32_t *)(HAB_RVT_BASE + 0x24)) +#define HAB_RVT_FAILSAFE (*(uint32_t *)(HAB_RVT_BASE + 0x28)) #define HAB_RVT_REPORT_EVENT_NEW (*(uint32_t *)0x000000B8) #define HAB_RVT_REPORT_STATUS_NEW (*(uint32_t *)0x000000BC)
The hab_rvt_failsafe() callback according to the HABv4 documentation: "This function provides a safe path when image authentication has failed and all possible boot paths have been exhausted. It is intended for use by post-ROM boot stage components, via the ROM Vector Table." Once invoked the part will drop down to its BootROM USB recovery mode. Should it be the case that the part is in secure boot mode - only an appropriately signed binary will be accepted by the ROM and subsequently executed. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Sven Ebenfeld <sven.ebenfeld@gmail.com> Cc: George McCollister <george.mccollister@gmail.com> Cc: Breno Matheus Lima <brenomatheus@gmail.com> --- arch/arm/include/asm/mach-imx/hab.h | 2 ++ 1 file changed, 2 insertions(+)