summaryrefslogtreecommitdiff
path: root/drivers/crypto/fsl/fsl_blob.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-04-22 08:12:20 -0400
committerTom Rini <trini@konsulko.com>2022-04-22 08:12:20 -0400
commit6e2af641e4bfed24d3edd8519dd40ec397361b4e (patch)
treed387bc01229acd9db9d344f9c8240ce3b852f6fc /drivers/crypto/fsl/fsl_blob.c
parentea5583b90f9c162af6f2025718dc50ffbb6e4552 (diff)
parentd173b107be94eb474e1ae75a8addbf5f2fecfd56 (diff)
Merge tag 'u-boot-imx-20220422' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
u-boot-imx-20220422 ------------------- - Switch to DM_SERIAL - Drop MMCROOT - several cleanup CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11815
Diffstat (limited to 'drivers/crypto/fsl/fsl_blob.c')
-rw-r--r--drivers/crypto/fsl/fsl_blob.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index e8202cc5697..9b6e4bca062 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -71,6 +71,10 @@ int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
ret = run_descriptor_jr(desc);
if (ret) {
+ /* clear the blob data output buffer */
+ memset(dst, 0x00, len);
+ size = ALIGN(len, ARCH_DMA_MINALIGN);
+ flush_dcache_range((unsigned long)dst, (unsigned long)dst + size);
printf("Error in blob decapsulation: %d\n", ret);
} else {
size = ALIGN(len, ARCH_DMA_MINALIGN);