All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: zynqmp: Update binman configurations
@ 2025-02-04  8:53 Michal Simek
  2025-02-04  8:53 ` [PATCH v2 1/3] arm64: zynqmp: Fix TEE loading address and add hash Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michal Simek @ 2025-02-04  8:53 UTC (permalink / raw)
  To: u-boot, git; +Cc: Prasad Kummari, Tom Rini

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

Changes in v2:
- Guard CONFIG_XILINX_OF_BOARD_DTB_ADDR usage in binman

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 | 16 ++++++++++---
 arch/arm/dts/zynqmp-binman.dts     | 37 +++++++++++++++++++++---------
 2 files changed, 39 insertions(+), 14 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/3] arm64: zynqmp: Fix TEE loading address and add hash
  2025-02-04  8:53 [PATCH v2 0/3] arm64: zynqmp: Update binman configurations Michal Simek
@ 2025-02-04  8:53 ` Michal Simek
  2025-02-04  8:53 ` [PATCH v2 2/3] arm64: zynqmp: Use DTB address base from .config Michal Simek
  2025-02-04  8:53 ` [PATCH v2 3/3] arm64: zynqmp: Describe images without TF-A Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2025-02-04  8:53 UTC (permalink / raw)
  To: u-boot, git; +Cc: Prasad Kummari, Tom Rini

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.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

(no changes since v1)

 arch/arm/dts/zynqmp-binman-som.dts |  7 +++++--
 arch/arm/dts/zynqmp-binman.dts     | 14 ++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
index 3ffa06f0c04f..a697c2c1945c 100644
--- a/arch/arm/dts/zynqmp-binman-som.dts
+++ b/arch/arm/dts/zynqmp-binman-som.dts
@@ -148,8 +148,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;
 						};
diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
index bf3335a3e539..458387161c35 100644
--- a/arch/arm/dts/zynqmp-binman.dts
+++ b/arch/arm/dts/zynqmp-binman.dts
@@ -61,8 +61,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;
 						};
@@ -135,8 +138,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;
 						};
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/3] arm64: zynqmp: Use DTB address base from .config
  2025-02-04  8:53 [PATCH v2 0/3] arm64: zynqmp: Update binman configurations Michal Simek
  2025-02-04  8:53 ` [PATCH v2 1/3] arm64: zynqmp: Fix TEE loading address and add hash Michal Simek
@ 2025-02-04  8:53 ` Michal Simek
  2025-02-04  8:53 ` [PATCH v2 3/3] arm64: zynqmp: Describe images without TF-A Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2025-02-04  8:53 UTC (permalink / raw)
  To: u-boot, git; +Cc: Prasad Kummari, Tom Rini

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.

All binman DTSes are compiled that's why also guard
CONFIG_XILINX_OF_BOARD_DTB_ADDR which depends on OF_BOARD || OF_SEPARATE
which is a problem for mini configurations which are using OF_EMBED.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

Changes in v2:
- Guard CONFIG_XILINX_OF_BOARD_DTB_ADDR usage in binman

 arch/arm/dts/zynqmp-binman-som.dts |  4 +++-
 arch/arm/dts/zynqmp-binman.dts     | 17 ++++++++++-------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
index a697c2c1945c..a66b948b266c 100644
--- a/arch/arm/dts/zynqmp-binman-som.dts
+++ b/arch/arm/dts/zynqmp-binman-som.dts
@@ -162,7 +162,9 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
 						hash {
 							algo = "md5";
 						};
diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
index 458387161c35..16e1052a64a9 100644
--- a/arch/arm/dts/zynqmp-binman.dts
+++ b/arch/arm/dts/zynqmp-binman.dts
@@ -75,8 +75,10 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
-						hash-1 {
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
+						hash {
 							algo = "md5";
 						};
 					};
@@ -152,15 +154,16 @@
 						type = "flat_dt";
 						arch = "arm64";
 						compression = "none";
-						load = <0x0 0x100000>;
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+						load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
+						hash {
+							algo = "md5";
+						};
 						uboot-fdt-blob {
 							filename = "u-boot.dtb";
 							type = "blob-ext";
 						};
-						hash-1 {
-							algo = "md5";
-						};
-
 					};
 				};
 				configurations {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 3/3] arm64: zynqmp: Describe images without TF-A
  2025-02-04  8:53 [PATCH v2 0/3] arm64: zynqmp: Update binman configurations Michal Simek
  2025-02-04  8:53 ` [PATCH v2 1/3] arm64: zynqmp: Fix TEE loading address and add hash Michal Simek
  2025-02-04  8:53 ` [PATCH v2 2/3] arm64: zynqmp: Use DTB address base from .config Michal Simek
@ 2025-02-04  8:53 ` Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2025-02-04  8:53 UTC (permalink / raw)
  To: u-boot, git; +Cc: Prasad Kummari, Tom Rini

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.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

(no changes since v1)

 arch/arm/dts/zynqmp-binman-som.dts | 5 +++++
 arch/arm/dts/zynqmp-binman.dts     | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
index a66b948b266c..d5b63ef604ba 100644
--- a/arch/arm/dts/zynqmp-binman-som.dts
+++ b/arch/arm/dts/zynqmp-binman-som.dts
@@ -178,8 +178,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
 					};
 				};
 			};
diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
index 16e1052a64a9..252c2ad552b0 100644
--- a/arch/arm/dts/zynqmp-binman.dts
+++ b/arch/arm/dts/zynqmp-binman.dts
@@ -87,9 +87,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
+
 					};
 				};
 			};
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-04  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04  8:53 [PATCH v2 0/3] arm64: zynqmp: Update binman configurations Michal Simek
2025-02-04  8:53 ` [PATCH v2 1/3] arm64: zynqmp: Fix TEE loading address and add hash Michal Simek
2025-02-04  8:53 ` [PATCH v2 2/3] arm64: zynqmp: Use DTB address base from .config Michal Simek
2025-02-04  8:53 ` [PATCH v2 3/3] arm64: zynqmp: Describe images without TF-A Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.