[PATCH] crypto: fsl_hash: Remove unnecessary alignment check in caam_hash()
Fabio Estevam
festevam at gmail.com
Tue Jun 7 04:41:30 CEST 2022
Hi Stefan,
On Fri, Apr 29, 2022 at 10:35 AM Stefan Roese <sr at denx.de> wrote:
>
> While working on an LX2160 based board and updating to latest mainline
> I noticed problems using the HW accelerated hash functions on this
> platform, when trying to boot a FIT Kernel image. Here the resulting
> error message:
>
> Using 'conf-freescale_lx2160a.dtb' configuration
> Trying 'kernel-1' kernel subimage
> Verifying Hash Integrity ... sha256Error: Address arguments are not aligned
> CAAM was not setup properly or it is faulty
> error!
> Bad hash value for 'hash-1' hash node in 'kernel-1' image node
> Bad Data Hash
> ERROR: can't get kernel image!
>
> Testing and checking with Gaurav Jain from NXP has revealed, that this
> alignment check is not necessary here at all. So let's remove this
> check completely.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Gaurav Jain <gaurav.jain at nxp.com>
> Cc: dullfire at yahoo.com
I applied this patch against top of tree U-Boot, but I am still
getting the following
error on a kontron-sl-mx8mm board with the options below selected:
CONFIG_IMX_HAB=y
CONFIG_SPL_DRIVERS_MISC=y
### Loading kernel from FIT Image at 42000000 ...
Using 'conf-freescale_imx8mm-kontron-n801x-s.dtb' configuration
Trying 'kernel-1' kernel subimage
Description: Linux kernel
Created: 2022-06-07 1:58:57 UTC
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x42000100
Data Size: 7609360 Bytes = 7.3 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x40480000
Entry Point: 0x40480000
Hash algo: sha256
Hash value:
d20b5d533e123096edb05a6433d850c0fafb4b39a6e6d47e9bade3f6fa7c26ce
Verifying Hash Integrity ... sha256dev_get_priv: null device
CAAM was not setup properly or it is faulty
error!
Bad hash value for 'hash-1' hash node in 'kernel-1' image node
Bad Data Hash
ERROR: can't get kernel image!
Not sure why dev_get_priv is returning NULL.
I am using the TF-A from NXP:
BL31: v2.4(release):lf-5.15.5-1.0.0-10-gcb51a0faa4
If CONFIG_IMX_HAB=y is not selected, then sha256 is calculated by
software and the fitImage boots.
Does anyone have any suggestions?
Thanks,
Fabio Estevam
More information about the U-Boot
mailing list