summaryrefslogtreecommitdiff
path: root/include/fsl_sec.h
diff options
context:
space:
mode:
authorBreno Lima <breno.lima@nxp.com>2021-03-25 12:30:21 +0300
committerStefano Babic <sbabic@denx.de>2021-04-08 10:18:29 +0300
commit81d5605a8654ae735e751b59f3f2d7b09fe29471 (patch)
tree06abbb1a1ccf46bdf7baea91215ff952afab24c2 /include/fsl_sec.h
parent4e682d555d80875ad062e3366b8970e199e04395 (diff)
downloadu-boot-81d5605a8654ae735e751b59f3f2d7b09fe29471.tar.xz
cmd: blob: Instantiate RNG before running CMD_BLOB
U-Boot can instantiate CAAM RNG if needed by crypto operations. Call sec_init() prior running a blob operation to ensure RNG is correctly instantiated. Make sure CAAM clock is enabled and check if a job ring is available for that operation. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include/fsl_sec.h')
-rw-r--r--include/fsl_sec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index 40f1c5b10d..c661bd6ead 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -344,6 +344,9 @@ struct sg_entry {
#define FSL_CAAM_MP_PRVK_BYTES 32
#define FSL_CAAM_MP_MES_DGST_BYTES 32
+#define FSL_CAAM_ORSR_JRa_OFFSET 0x102c
+#define FSL_CAAM_MAX_JR_SIZE 4
+
/* blob_dek:
* Encapsulates the src in a secure blob and stores it dst
* @src: reference to the plaintext