crypto: caam - use JobR's space to access page 0 regs
[ Upstream commit73a7496c21] 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:6a83830f64("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e2a5487487
commit
3885a4d4a5
@@ -2,6 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Pengutronix, Steffen Trumtrar <kernel@pengutronix.de>
|
||||
* Copyright (C) 2021 Pengutronix, Ahmad Fatoum <kernel@pengutronix.de>
|
||||
* Copyright 2024 NXP
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "caam blob_gen: " fmt
|
||||
@@ -104,7 +105,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
|
||||
}
|
||||
|
||||
ctrlpriv = dev_get_drvdata(jrdev->parent);
|
||||
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
|
||||
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->jr[0]->perfmon.status));
|
||||
if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
|
||||
dev_warn(jrdev,
|
||||
"using insecure test key, enable HAB to use unique device key!\n");
|
||||
|
||||
Reference in New Issue
Block a user