MLK-16703: HAB : Check if CSF is valid before authenticating image
authorUtkarsh Gupta <utkarsh.gupta@nxp.com>
Sat, 18 Nov 2017 01:20:33 +0000 (19:20 -0600)
committerUtkarsh Gupta <utkarsh.gupta@nxp.com>
Sat, 18 Nov 2017 01:20:33 +0000 (19:20 -0600)
commit1167e4dae890dd74f2f181c5b01bf8f5c5ba4977
tree6ddac3c4c388ab5f8967787029db9c221a19c9c2
parent345bcc28e52eff7a8cee7fee787db9453bcd457f
MLK-16703: HAB : Check if CSF is valid before authenticating image

For proper authentication users must check if the CSF is valid. This patch
calls the csf_is_valid function prior to authenticating the image to parse
the CSF and returns a failure if an invalid command is found as shown below.

Authenticate image from DDR location 0x12000000...
Check CSF for Write Data command before authenticating image

Error - WRITE Data command found

Authenticate zImage Fail, Please check

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
arch/arm/imx-common/hab.c
arch/arm/include/asm/imx-common/hab.h