Skip to contentSkip to conversation

arm64: zynqmp: Update binman configurations

PATCH Superseded Michal Simek 1 participant 4 messages Jan 30, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

cover arm64: zynqmp: Update binman configurations

Hi,

I wanted to test u-boot running out of EL3 which worked before and there are some small chagnes needed. At the same time I found that TEE configuration is not using proper load address because it wasn't tested. And also DTB location can be taken directly from .config value as is done for other values.

Thanks,
Michal

Michal Simek (3):
arm64: zynqmp: Fix TEE loading address and add hash
arm64: zynqmp: Use DTB address base from .config
arm64: zynqmp: Describe images without TF-A

 arch/arm/dts/zynqmp-binman-som.dts | 14 ++++++++++---
 arch/arm/dts/zynqmp-binman.dts     | 33 ++++++++++++++++++++----------
 2 files changed, 33 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH 1/3 arm64: zynqmp: Fix TEE loading address and add hash

There is incorrect loading address listed for TEE. CONFIG_BL32_LOAD_ADDR should be used.
Also there is missing hash for this entry which is present for other nodes.

---

 arch/arm/dts/zynqmp-binman-som.dts |  7 +++++--
 arch/arm/dts/zynqmp-binman.dts     | 14 ++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)
arch/arm/dts/zynqmp-binman-som.dts +5 -2
index 3d9d8476c98e..e8b7084521c5 100644
@@ -146,8 +146,11 @@
 						arch = "arm64";
 						compression = "none";
 						os = "tee";
-						load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
-						entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+						load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						hash {
+							algo = "md5";
+						};
 						tee-os {
 							optional;
 						};
arch/arm/dts/zynqmp-binman.dts +10 -4
index 675f6bf51ebd..6d28a5bdae25 100644
@@ -60,8 +60,11 @@
 						arch = "arm64";
 						compression = "none";
 						os = "tee";
-						load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
-						entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+						load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						hash {
+							algo = "md5";
+						};
 						tee-os {
 							optional;
 						};
@@ -134,8 +137,11 @@
 						arch = "arm64";
 						compression = "none";
 						os = "tee";
-						load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
-						entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+						load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+						hash {
+							algo = "md5";
+						};
 						tee-os {
 							optional;
 						};
Signature · 1 line
2.43.0
author maintainer
#2 lore raw

PATCH 2/3 arm64: zynqmp: Use DTB address base from .config

In reply to Michal Simek

CONFIG_XILINX_OF_BOARD_DTB_ADDR holds DTB address which U-Boot is checking. Currently address in binman match default value but macro can be used directly.
Also sync node name (s/hash-1/hash/) and sync location to have the same order load/hash/image.

---

 arch/arm/dts/zynqmp-binman-som.dts |  2 +-
 arch/arm/dts/zynqmp-binman.dts     | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)
arch/arm/dts/zynqmp-binman-som.dts +1 -1
index e8b7084521c5..b0100b23f7f5 100644
@@ -160,7 +160,7 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
 						hash {
 							algo = "md5";
 						};
arch/arm/dts/zynqmp-binman.dts +6 -7
index 6d28a5bdae25..b3cda8b59eec 100644
@@ -74,8 +74,8 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
-						hash-1 {
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+						hash {
 							algo = "md5";
 						};
 					};
@@ -151,15 +151,14 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+						hash {
+							algo = "md5";
+						};
 						uboot-fdt-blob {
 							filename = "u-boot.dtb";
 							type = "blob-ext";
 						};
-						hash-1 {
-							algo = "md5";
-						};
-
 					};
 				};
 				configurations {
Signature · 1 line
2.43.0
author maintainer
#3 lore raw

PATCH 3/3 arm64: zynqmp: Describe images without TF-A

In reply to Michal Simek

U-Boot can run out of EL3, NS-EL2 and NS-EL1. Currently default configuration is NS-EL2 with TF-A but when TF-A is not passed and configured images can still boot just fine. That's why support this configuration and describe it via binman.

---

 arch/arm/dts/zynqmp-binman-som.dts | 5 +++++
 arch/arm/dts/zynqmp-binman.dts     | 6 ++++++
 2 files changed, 11 insertions(+)
arch/arm/dts/zynqmp-binman-som.dts +5 -0
index b0100b23f7f5..634118d170e0 100644
@@ -174,8 +174,13 @@
 					default = "conf-1";
 					conf-1 {
 						description = "Multi DTB with TF-A/TEE";
+#if CONFIG_BL31_LOAD_ADDR
 						firmware = "atf";
 						loadables = "tee", "uboot", "fdt";
+#else
+						firmware = "uboot";
+						loadables = "fdt";
+#endif
 					};
 				};
 			};
arch/arm/dts/zynqmp-binman.dts +6 -0
index b3cda8b59eec..3348ad63ed63 100644
@@ -84,9 +84,15 @@
 					default = "@conf-DEFAULT-SEQ";
 					@conf-SEQ {
 						description = "NAME";
+#if CONFIG_BL31_LOAD_ADDR
 						firmware = "atf";
 						loadables = "tee", "uboot";
 						fdt = "fdt-SEQ";
+#else
+						firmware = "uboot";
+						loadables = "fdt";
+#endif
+
 					};
 				};
 			};
Signature · 1 line
2.43.0