[PATCH 6/7] common: add new CONFIG_HAVE_OPTEE symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <a.fatoum@xxxxxxxxxxxxxx>
---
 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
 	hex
 	default 0x02000000
 	prompt "OP-TEE Memory Size"
-	depends on BOOTM_OPTEE || PBL_OPTEE
+	depends on HAVE_OPTEE
 	help
 	  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
 	bool
 	prompt "support booting OP-TEE"
 	depends on BOOTM && ARM
+	select HAVE_OPTEE
 	help
 	  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
 	help
 	  Allows starting OP-TEE during lowlevel initialization of the PBL.
 	  Requires explicit support in the board's lowlevel file.
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux