[U-Boot] [PATCH v2] crypto/fsl: fix BLOB encapsulation and decapsulation

York Sun york.sun at nxp.com
Fri Jan 5 01:20:28 UTC 2018


On 01/04/2018 01:57 PM, Fabio Estevam wrote:
> From: Clemens Gruber <clemens.gruber at pqgruber.com>
> 
> The blob_encap and blob_decap functions were not flushing the dcache
> before passing data to CAAM/DMA and not invalidating the dcache when
> getting data back.
> Therefore, blob encapsulation and decapsulation failed with errors like
> the following due to data cache incoherency:
> "40000006: DECO: desc idx 0: Invalid KEY command"
> 
> To ensure coherency, we allocate aligned memory to store the data passed
> to/from CAAM and flush/invalidate the memory regions.
> Blobs can now be encapsulated and decapsulated with the blob cmd as well
> as from board code by calling blob_encap and blob_decap directly.
> 
> Tested on an i.MX6Q board.
> 
> Signed-off-by: Clemens Gruber <clemens.gruber at pqgruber.com>
> [fabio: Make BLOB_SIZE() macro available for other archs]
> Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
> Tested-by: Breno Lima <breno.lima at nxp.com>
> ---
> Changes since v1:
> - Make BLOB_SIZE() macro available for other archs
> 

Applied to fsl-qoriq master, awaiting upstream. Thanks.

York



More information about the U-Boot mailing list