public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] imx: hab: Add helper functions for scripted HAB auth
@ 2018-03-09 17:35 Bryan O'Donoghue
  2018-03-09 17:35 ` [U-Boot] [PATCH 1/4] imx: hab: Add routine to set HAB IVT address Bryan O'Donoghue
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Bryan O'Donoghue @ 2018-03-09 17:35 UTC (permalink / raw)
  To: u-boot

Greetings.

This set adds some helper functions as a pre-cursor to an upcoming set of
changes to a BSP adding scripted HAB authentication.

Calculating a HAB IVT address based on a base address and a +/- offset is a
trivial but, useful function for HAB. It means you can have a load address
for a HAB image inside of your environment and specify the IVT offset
relative to that address. All you need to do then is to call the function
to obtain the correct IVT address to pass into hab_auth_img.

Two relatively minor changes then - one encasing the hab.h in ifndef
__ASSEMBLY__ which is required if you want to include hab.h in a board.h.

Specifying the IVT padding size is again properly done as a define as
opposed to a magic number in code.

The final patch then is wrappering up two common use-cases in the upcoming
BSP
- hab_auth_image ? continue-to-boot : drop-to-bootrom USB mode.

In other words if you fail to authenticate an image on the secure-boot path
the appropriate next step is typically to drop into USB recovery mode.

In USB recovery mode you need to provide a signed image on a secure-boot
(closed in the parlance) board. So hab_auth_img_or_fail() encapsulates that
behaviour in one place - again allowing for scripting to reuse instead of
replicate functionality over and over again.

These helper functions could all be buried in the board-port but, they are
made available here in the hopes they will be of use to others.

Bryan O'Donoghue (4):
  imx: hab: Add routine to set HAB IVT address
  imx: hab: Encase majority of header in __ASSEMBLY__ declaration
  imx: hab: Specify IVT padding size
  imx: hab: Provide hab_auth_img_or_fail command

 arch/arm/include/asm/mach-imx/hab.h |  9 ++++--
 arch/arm/mach-imx/hab.c             | 59 +++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 3 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-03-21  4:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-09 17:35 [U-Boot] [PATCH 0/4] imx: hab: Add helper functions for scripted HAB auth Bryan O'Donoghue
2018-03-09 17:35 ` [U-Boot] [PATCH 1/4] imx: hab: Add routine to set HAB IVT address Bryan O'Donoghue
2018-03-15 16:37   ` Breno Matheus Lima
2018-03-16  8:17   ` Lothar Waßmann
2018-03-17 10:55     ` Bryan O'Donoghue
2018-03-09 17:35 ` [U-Boot] [PATCH 2/4] imx: hab: Encase majority of header in __ASSEMBLY__ declaration Bryan O'Donoghue
2018-03-15 16:38   ` Breno Matheus Lima
2018-03-09 17:35 ` [U-Boot] [PATCH 3/4] imx: hab: Specify IVT padding size Bryan O'Donoghue
2018-03-15 16:54   ` Breno Matheus Lima
2018-03-17 11:06     ` Bryan O'Donoghue
2018-03-19 17:53       ` Breno Matheus Lima
2018-03-21  4:47         ` Bryan O'Donoghue
2018-03-09 17:35 ` [U-Boot] [PATCH 4/4] imx: hab: Provide hab_auth_img_or_fail command Bryan O'Donoghue
2018-03-15 17:15   ` Breno Matheus Lima
2018-03-17 11:06     ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox