Skip to contentSkip to conversation

imx7: Disable CAAM Job Ring 0

PATCH New Fabio Estevam 2 participants 2 messages Sep 12, 2023 – Sep 23, 2023

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 imx7: Disable CAAM Job Ring 0

From: Fabio Estevam <[email protected]>

Trying to boot a fitImage after a successful hab_auth_img operation causes the following error:

## Loading kernel from FIT Image at 88000000 ...
Using 'conf-imx7d-smegw01.dtb' configuration
Trying 'kernel-1' kernel subimage

     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8800010c
     Data Size:    9901752 Bytes = 9.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80800000
     Entry Point:  0x80800000
     Hash algo:    sha256
     Hash value:   28f8779bbf010780f16dd3d84ecb9b604c44c5c2cf7acd098c264a2d3f68e969

Verifying Hash Integrity ... sha256Error in SEC deq CAAM was not setup properly or it is faulty error!

The reason for this error is that the BootROM uses the CAAM Job Ring 0, so disable its node in U-Boot to avoid the resource conflict.

imx8m dtsi files also have the Job Ring 0 disable since the following kernel commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch?h=v6.5&id=dc9c1ceb555ff661e6fc1081434600771f29657c

For a temporary solution, disable the Job Ring 0 in imx7s-u-boot.dtsi.

---
 arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi | 2 ++
 arch/arm/dts/imx7d-pico-pi-u-boot.dtsi         | 2 ++
 arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi        | 2 ++
 arch/arm/dts/imx7d-sdb-u-boot.dtsi             | 2 ++
 arch/arm/dts/imx7d-smegw01-u-boot.dtsi         | 3 +++
 arch/arm/dts/imx7s-u-boot.dtsi                 | 7 +++++++
 6 files changed, 18 insertions(+)
 create mode 100644 arch/arm/dts/imx7d-smegw01-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx7s-u-boot.dtsi
arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi +2 -0
index 52aa8758701f..57ca28edb70d 100644
@@ -3,6 +3,8 @@
  * Copyright 2020-2022 Toradex
  */
 
+#include "imx7s-u-boot.dtsi"
+
 &{/aliases} {
 	/* SDHCI instance order: eMMC, SD/MMC */
 	mmc0 = &usdhc3;
arch/arm/dts/imx7d-pico-pi-u-boot.dtsi +2 -0
index 67b41ae1129c..843b4583e53a 100644
@@ -1,3 +1,5 @@
+#include "imx7s-u-boot.dtsi"
+
 /{
     aliases {
         mmc0 = &usdhc3;
arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi +2 -0
index 62cdcbaeb67d..896c8bcaa5ad 100644
@@ -3,6 +3,8 @@
  * Copyright 2018 NXP
  */
 
+#include "imx7s-u-boot.dtsi"
+
 &qspi {
 	flash0: mx25l51245g@0 {
 		compatible = "jedec,spi-nor";
arch/arm/dts/imx7d-sdb-u-boot.dtsi +2 -0
index ac1d6e2e6480..e4a27b8dd5aa 100644
@@ -1,3 +1,5 @@
+#include "imx7s-u-boot.dtsi"
+
 &fec2 {
 	status = "disable";
 };
arch/arm/dts/imx7d-smegw01-u-boot.dtsi new file +3 -0
new file mode 100644
index 000000000000..90f7500ee34c
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "imx7s-u-boot.dtsi"
arch/arm/dts/imx7s-u-boot.dtsi new file +7 -0
new file mode 100644
index 000000000000..c4c1da3c64f1
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+
+&crypto {
+	sec_jr0: jr@1000 {
+		status = "disabled";
+	};
+};
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/1 imx7: Disable CAAM Job Ring 0

Quoted 25 lines

From: Fabio Estevam <[email protected]>
Trying to boot a fitImage after a successful hab_auth_img operation causes the following error:
## Loading kernel from FIT Image at 88000000 ...
Using 'conf-imx7d-smegw01.dtb' configuration
Trying 'kernel-1' kernel subimage

     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8800010c
     Data Size:    9901752 Bytes = 9.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80800000
     Entry Point:  0x80800000
     Hash algo:    sha256
     Hash value:   28f8779bbf010780f16dd3d84ecb9b604c44c5c2cf7acd098c264a2d3f68e969

Verifying Hash Integrity ... sha256Error in SEC deq
CAAM was not setup properly or it is faulty error!
The reason for this error is that the BootROM uses the CAAM Job Ring 0, so disable its node in U-Boot to avoid the resource conflict. imx8m dtsi files also have the Job Ring 0 disable since the following kernel commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch?h=v6.5&id=dc9c1ceb555ff661e6fc1081434600771f29657c
For a temporary solution, disable the Job Ring 0 in imx7s-u-boot.dtsi.

Quoted 2 lines

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter  
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================