Skip to content
Snippets Groups Projects
Commit d7af2baa authored by Breno Lima's avatar Breno Lima Committed by York Sun
Browse files

crypto/fsl: Fix HW accelerated hash commands


The hash command function were not flushing the dcache before passing data
to CAAM/DMA and not invalidating the dcache when getting data back.

Due the data cache incoherency, HW accelerated hash commands used to fail
with CAAM errors like "Invalid KEY Command".

Check if pbuf and pout buffers are properly aligned to the cache line size
and flush/invalidate the memory regions to address this issue.

This solution is based in a previous work from Clemens Gruber in
commit 598e9dcc ("crypto/fsl: fix BLOB encapsulation and
decapsulation")

Reported-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarBreno Lima <breno.lima@nxp.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 6d48d1c4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment