Skip to content
  • Breno Lima's avatar
    crypto/fsl: Fix HW accelerated hash commands · d7af2baa
    Breno Lima authored
    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>
    d7af2baa