mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
Cc: Ahmad Fatoum <>
Subject: [PATCH 6/7] common: add new CONFIG_HAVE_OPTEE symbol
Date: Wed, 11 Jan 2023 08:59:39 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

We have two methods of loading a trusted OS: The legacy, but generic,
way of doing it in barebox proper during bootm and the new way of doing
it in prebootloader to reduce attack surface as much as possible by
running barebox proper completely in normal world.

Add a new CONFIG_HAVE_OPTEE symbol that is selected in both cases, so
code can use just that instead of checking for both.

Signed-off-by: Ahmad Fatoum <>
 common/Kconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/Kconfig b/common/Kconfig
index 46675dfe2ea7..9e175d36c43e 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1119,11 +1119,14 @@ config EXTERNAL_DTS_FRAGMENTS
 menu "OP-TEE loading"
+config HAVE_OPTEE
+	bool
 config OPTEE_SIZE
 	default 0x02000000
 	prompt "OP-TEE Memory Size"
-	depends on BOOTM_OPTEE || PBL_OPTEE
+	depends on HAVE_OPTEE
 	  Size to reserve in main memory for OP-TEE.
 	  Can be smaller than the actual size used by OP-TEE, this is used to prevent
@@ -1133,6 +1136,7 @@ config BOOTM_OPTEE
 	prompt "support booting OP-TEE"
 	depends on BOOTM && ARM
+	select HAVE_OPTEE
 	  OP-TEE is a trusted execution environment (TEE). With this option
 	  enabled barebox supports starting optee_os as part of the bootm command.
@@ -1144,6 +1148,7 @@ config PBL_OPTEE
 	bool "Enable OP-TEE early start"
 	depends on ARM
 	depends on !THUMB2_BAREBOX
+	select HAVE_OPTEE
 	  Allows starting OP-TEE during lowlevel initialization of the PBL.
 	  Requires explicit support in the board's lowlevel file.

  parent reply	other threads:[~2023-01-11  8:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  7:59 [PATCH 0/7] ARM: i.MX8M: add optional CAAM init in PBL Ahmad Fatoum
2023-01-11  7:59 ` [PATCH 1/7] ARM: i.MX8M: bootrom: access OCRAM directly if running in EL3 Ahmad Fatoum
2023-01-11  7:59 ` [PATCH 2/7] crypto: caam - sync 64-bit accessors with Linux Ahmad Fatoum
2023-01-11  7:59 ` [PATCH 3/7] crypto: caam - add job ring accessors from Linux Ahmad Fatoum
2023-01-11  7:59 ` [PATCH 4/7] crypto: caam - make command constants unsigned Ahmad Fatoum
2023-01-11  7:59 ` [PATCH 5/7] crypto: caam - implement early PBL init Ahmad Fatoum
2023-01-11  7:59 ` Ahmad Fatoum [this message]
2023-01-11  7:59 ` [PATCH 7/7] ARM: i.MX8M: init CAAM when CONFIG_FSL_CAAM_RNG_PBL_INIT Ahmad Fatoum
2023-01-11  9:10 ` [PATCH 0/7] ARM: i.MX8M: add optional CAAM init in PBL Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox