Skip to content

Commit 73a7496

Browse files
jaingaurav2712herbertx
authored andcommitted
crypto: caam - use JobR's space to access page 0 regs
On iMX8DXL/QM/QXP(SECO) & iMX8ULP(ELE) SoCs, access to controller region(CAAM page 0) is not permitted from non secure world. use JobR's register space to access page 0 registers. Fixes: 6a83830 ("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Gaurav Jain <[email protected]> Reviewed-by: Ahmad Fatoum <[email protected]> Reviewed-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 4e6ccd9 commit 73a7496

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/crypto/caam/blob_gen.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/*
33
* Copyright (C) 2015 Pengutronix, Steffen Trumtrar <[email protected]>
44
* Copyright (C) 2021 Pengutronix, Ahmad Fatoum <[email protected]>
5+
* Copyright 2024 NXP
56
*/
67

78
#define pr_fmt(fmt) "caam blob_gen: " fmt
@@ -104,7 +105,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
104105
}
105106

106107
ctrlpriv = dev_get_drvdata(jrdev->parent);
107-
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
108+
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->jr[0]->perfmon.status));
108109
if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
109110
dev_warn(jrdev,
110111
"using insecure test key, enable HAB to use unique device key!\n");

0 commit comments

Comments
 (0)