Skip to contentSkip to conversation

optee: Correct dependencies for BOOTM_OPTEE

PATCH Superseded Tom Rini 2 participants 7 messages Mar 17 – Apr 3

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 optee: Correct dependencies for BOOTM_OPTEE

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn that is only valid for CMD_BOOTM or CMD_BOOTZ. Add this dependency.

---
I am looking for feedback on this, so I've added the board maintainers for the platforms which enable this option. It looks like this is only valid on 32bit ARM platforms, to start with and not 64bit, is that correct? That's why I excluded CMD_BOOTI from the list. I suspect that this should really depend on CMD_BOOT{M,Z} and BOOTM_LINUX, and not select it. If someone can confirm, I can do that instead, or someone can just do the replacement patch for this. Thanks!

Cc "Bryan O'Donoghue" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 lib/optee/Kconfig | 1 +
 1 file changed, 1 insertion(+)
lib/optee/Kconfig +1 -0
index 34b9d8afe675..9251faf73cd7 100644
@@ -40,6 +40,7 @@ config OPTEE_TZDRAM_SIZE
 
 config BOOTM_OPTEE
 	bool "Support OPTEE bootm command"
+	depends on CMD_BOOTM || CMD_BOOTZ
 	select BOOTM_LINUX
 	select OPTEE_IMAGE
 	help
Signature · 1 line
2.43.0
#1 lore raw
Quoted 29 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn that is only valid for CMD_BOOTM or CMD_BOOTZ. Add this dependency.

---
I am looking for feedback on this, so I've added the board maintainers for the platforms which enable this option. It looks like this is only valid on 32bit ARM platforms, to start with and not 64bit, is that correct? That's why I excluded CMD_BOOTI from the list. I suspect that this should really depend on CMD_BOOT{M,Z} and BOOTM_LINUX, and not select it. If someone can confirm, I can do that instead, or someone can just do the replacement patch for this. Thanks!

Cc "Bryan O'Donoghue" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  lib/optee/Kconfig | 1 +
  1 file changed, 1 insertion(+)
lib/optee/Kconfig +0 -0
index 34b9d8afe675..9251faf73cd7 100644

lib/optee/Kconfig config OPTEE_TZDRAM_SIZE · line 43

Quoted 4 lines
lib/optee/Kconfig +1 -0
@@ -40,6 +40,7 @@ config OPTEE_TZDRAM_SIZE
 
  config BOOTM_OPTEE
  	bool "Support OPTEE bootm command"
+	depends on CMD_BOOTM || CMD_BOOTZ

ARM32 SPL arch/arm/lib/spl.c has this piece of code, which does not depend on "bootm" command. This is used by falcon boot to jump into optee-os , with the optee-os return address being Linux kernel entry point. So I don't think depending on CMD_BOOT{M,Z,I} is enough ?

77 #if defined(CONFIG_BOOTM_OPTEE) && defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
78 if (spl_image->optee_addr)
79 boot_jump_linux_via_optee((void *)(spl_image->entry_point),

author
#2 lore raw
Quoted 38 lines · Marek Vasut
Quoted 29 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn that is only valid for CMD_BOOTM or CMD_BOOTZ. Add this dependency.

---
I am looking for feedback on this, so I've added the board maintainers for the platforms which enable this option. It looks like this is only valid on 32bit ARM platforms, to start with and not 64bit, is that correct? That's why I excluded CMD_BOOTI from the list. I suspect that this should really depend on CMD_BOOT{M,Z} and BOOTM_LINUX, and not select it. If someone can confirm, I can do that instead, or someone can just do the replacement patch for this. Thanks!

Cc "Bryan O'Donoghue" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  lib/optee/Kconfig | 1 +
  1 file changed, 1 insertion(+)
lib/optee/Kconfig +0 -0
index 34b9d8afe675..9251faf73cd7 100644

lib/optee/Kconfig config OPTEE_TZDRAM_SIZE · line 42

Quoted 3 lines
lib/optee/Kconfig +1 -0
@@ -40,6 +40,7 @@ config OPTEE_TZDRAM_SIZE
  config BOOTM_OPTEE
  	bool "Support OPTEE bootm command"
+	depends on CMD_BOOTM || CMD_BOOTZ

ARM32 SPL arch/arm/lib/spl.c has this piece of code, which does not depend on "bootm" command. This is used by falcon boot to jump into optee-os , with the optee-os return address being Linux kernel entry point. So I don't think depending on CMD_BOOT{M,Z,I} is enough ?

Quoted 5 lines

77 #if defined(CONFIG_BOOTM_OPTEE) && defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
78 if (spl_image->optee_addr)
79 boot_jump_linux_via_optee((void
*)(spl_image->entry_point),

Ah right, I forgot about xPL_LIB_BOOTM. But, is this 32bit only?

Signature · 1 line
Tom
#3 lore raw
Quoted 39 lines · Tom Rini
Quoted 38 lines · Marek Vasut
Quoted 29 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn that is only valid for CMD_BOOTM or CMD_BOOTZ. Add this dependency.

---
I am looking for feedback on this, so I've added the board maintainers for the platforms which enable this option. It looks like this is only valid on 32bit ARM platforms, to start with and not 64bit, is that correct? That's why I excluded CMD_BOOTI from the list. I suspect that this should really depend on CMD_BOOT{M,Z} and BOOTM_LINUX, and not select it. If someone can confirm, I can do that instead, or someone can just do the replacement patch for this. Thanks!

Cc "Bryan O'Donoghue" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
   lib/optee/Kconfig | 1 +
   1 file changed, 1 insertion(+)
lib/optee/Kconfig +0 -0
index 34b9d8afe675..9251faf73cd7 100644

lib/optee/Kconfig config OPTEE_TZDRAM_SIZE · line 42

Quoted 3 lines
lib/optee/Kconfig +1 -0
@@ -40,6 +40,7 @@ config OPTEE_TZDRAM_SIZE
   config BOOTM_OPTEE
   	bool "Support OPTEE bootm command"
+	depends on CMD_BOOTM || CMD_BOOTZ

ARM32 SPL arch/arm/lib/spl.c has this piece of code, which does not depend on "bootm" command. This is used by falcon boot to jump into optee-os , with the optee-os return address being Linux kernel entry point. So I don't think depending on CMD_BOOT{M,Z,I} is enough ?

Quoted 7 lines
Quoted 5 lines

77 #if defined(CONFIG_BOOTM_OPTEE) && defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
78 if (spl_image->optee_addr)
79 boot_jump_linux_via_optee((void
*)(spl_image->entry_point),

Ah right, I forgot about xPL_LIB_BOOTM. But, is this 32bit only?

For now ... I think boot of optee from U-Boot on arm64 is coming in the near future.

author
#4 lore raw

PATCH v2 1/1 optee: Correct dependencies for BOOTM_OPTEE

In reply to Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn depend on the library symbols that have to be enabled for BOOTM_LINUX to be valid (LIB_BOOTI, LIB_BOOTM and LIB_BOOTZ).

---
Changes in v2:
- Make this depend on LIB_BOOT[IMZ] as that is the library symbol for both xPL and full U-Boot to support boot[imz] and related boot flows.

Cc "Bryan O'Donoghue" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 lib/optee/Kconfig | 1 +
 1 file changed, 1 insertion(+)
lib/optee/Kconfig +1 -0
index 34b9d8afe675..e0de57e29306 100644
@@ -40,6 +40,7 @@ config OPTEE_TZDRAM_SIZE
 
 config BOOTM_OPTEE
 	bool "Support OPTEE bootm command"
+	depends on LIB_BOOTI || LIB_BOOTM || LIB_BOOTZ
 	select BOOTM_LINUX
 	select OPTEE_IMAGE
 	help
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#5 lore raw
Quoted 6 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn depend on the library symbols that have to be enabled for BOOTM_LINUX to be valid (LIB_BOOTI, LIB_BOOTM and LIB_BOOTZ).

author
#6 lore raw
In reply to Tom Rini
Quoted 6 lines · Tom Rini

As exposed by "make randconfig", we have an issue with the dependencies for BOOTM_OPTEE. This symbol needs to select BOOTM_LINUX and in turn depend on the library symbols that have to be enabled for BOOTM_LINUX to be valid (LIB_BOOTI, LIB_BOOTM and LIB_BOOTZ).

Applied to u-boot/next, thanks!

[1/1] optee: Correct dependencies for BOOTM_OPTEE

      commit: 0b1a79350212d0d166135bcfa4dd3a2cfbdc59ce
Signature · 1 line
Tom