All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 23/25] arm: imx: hab: Define rvt_failsafe()
Date: Tue,  2 Jan 2018 16:44:09 +0000	[thread overview]
Message-ID: <1514911451-4520-24-git-send-email-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <1514911451-4520-1-git-send-email-bryan.odonoghue@linaro.org>

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(+)

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)
-- 
2.7.4

  parent reply	other threads:[~2018-01-02 16:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 16:43 [U-Boot] [PATCH v4 00/25] Fix and extend i.MX HAB layer Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 01/25] arm: imx: hab: Make authenticate_image return int Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 02/25] arm: imx: hab: Fix authenticate_image result code Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 03/25] arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 04/25] arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 05/25] arm: imx: hab: Move IVT_SIZE to hab.h Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 06/25] arm: imx: hab: Move CSF_PAD_SIZE " Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 07/25] arm: imx: hab: Fix authenticate_image input parameters Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 08/25] arm: imx: hab: Fix authenticate image lockup on MX7 Bryan O'Donoghue
2018-01-03  1:25   ` Breno Matheus Lima
2018-01-03 19:37     ` Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 09/25] arm: imx: hab: Add IVT header definitions Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 10/25] arm: imx: hab: Add IVT header verification Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 11/25] arm: imx: hab: Verify IVT self matches calculated address Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 12/25] arm: imx: hab: Only call ROM once headers are verified Bryan O'Donoghue
2018-01-02 16:43 ` [U-Boot] [PATCH v4 13/25] arm: imx: hab: Print CSF based on IVT descriptor Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 14/25] arm: imx: hab: Print additional IVT elements during debug Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 15/25] arm: imx: hab: Define rvt_check_target() Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 16/25] arm: imx: hab: Implement hab_rvt_check_target Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 17/25] arm: imx: hab: Add a hab_rvt_check_target to image auth Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 18/25] arm: imx: hab: Print HAB event log only after calling ROM Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 19/25] arm: imx: hab: Make internal functions and data static Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 20/25] arm: imx: hab: Prefix authenticate_image with imx_hab Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 21/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 22/25] arm: imx: hab: Make imx_hab_is_enabled global Bryan O'Donoghue
2018-01-02 16:44 ` Bryan O'Donoghue [this message]
2018-01-02 16:44 ` [U-Boot] [PATCH v4 24/25] arm: imx: hab: Implement hab_rvt_failsafe Bryan O'Donoghue
2018-01-02 16:44 ` [U-Boot] [PATCH v4 25/25] arm: imx: hab: Add hab_failsafe console command Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514911451-4520-24-git-send-email-bryan.odonoghue@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.