[PATCH] crypto: fsl_hash: fixup alignment if necessary

Peng Fan peng.fan at oss.nxp.com
Wed Dec 25 03:14:52 CET 2024


On Thu, Dec 19, 2024 at 07:32:58PM +0100, Christoph Fritz wrote:
>Trying to boot a fitImage on an i.mx7ulp results in alignement issue:
>
>   ## Checking hash(es) for FIT Image at 90000000 ...
>      Hash(es) for Image 0 (kernel-1): sha256
>   CACHE: Misaligned operation at range [90000108, 906d9b08]
>   CACHE: Misaligned operation at range [9f6349f0, 9f634a30]
>   CACHE: Misaligned operation at range [9f6349f0, 9f634a30]
>   CACHE: Misaligned operation at range [9f6349f0, 9f634a30]
>   CACHE: Misaligned operation at range [9f6349f0, 9f634a30]
>    error!
>   Bad hash value for 'hash-1' hash node in 'kernel-1' image node
>   Bad hash in FIT image!
>
>Commit 41b2182af73e ("crypto: fsl_hash: Remove unnecessary alignment
>check in caam_hash()") removed a specific check which is not necessary
>for a Layerscape LX2160A but would have catched this directly in
>caam_hash().
>
>The actual root cause is currently unknown, so fix up input and output
>buffers if not aligned.
>
>Signed-off-by: Christoph Fritz <chf.fritz at googlemail.com>

LGTM:

Reviewed-by: Peng Fan <peng.fan at nxp.com>


More information about the U-Boot mailing list