mx7ulp: hab: Add hab_status command for HABv4 M4 boot
authorBreno Lima <breno.lima@nxp.com>
Thu, 25 Mar 2021 09:30:13 +0000 (17:30 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 8 Apr 2021 07:18:29 +0000 (09:18 +0200)
commit58f75efeaf30c786c26fade79d127c988b813751
tree879fcf202ba79b90202aacd7a497fade2bcead05
parentf217470b392806be340e9c03d46e98bb29d7caec
mx7ulp: hab: Add hab_status command for HABv4 M4 boot

When booting in low power or dual boot modes the M4 binary is
authenticated by the M4 ROM code.

Add an option in hab_status command so users can retrieve M4 HAB
failure and warning events.

=> hab_status m4

   Secure boot disabled

   HAB Configuration: 0xf0, HAB State: 0x66
   No HAB Events Found!

Add command documentation in mx6_mx7_secure_boot.txt guide.

As HAB M4 API cannot be called from A7 core the code is parsing
the M4 HAB persistent memory region. The HAB persistent memory
stores HAB events, public keys and others HAB related information.

The HAB persistent memory region addresses and sizes can be found
in AN12263 "HABv4 RVT Guidelines and Recommendations".

Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/include/asm/mach-imx/hab.h
arch/arm/mach-imx/hab.c
doc/imx/habv4/guides/mx6_mx7_secure_boot.txt