ARM: Initial OP-TEE support
This adds initial support for OP-TEE, see https://www.op-tee.org/

barebox starts in secure mode as usual. When booting a kernel
the bootm code also loads the optee_os binary. Instead of jumping
into the kernel barebox jumps into the optee_os binary and puts
the kernel execution address into the lr register. OP-TEE then
jumps into the kernel in nonsecure mode.

The optee_os binary is passed with the -t option to bootm or
with global.bootm.tee.

Optionally OP-TEE can be compiled into barebox using the builtin firmware
feature. Enable the Kconfig option and place or link your tee binary as
optee.bin into the firmware directory.

The amount of SDRAM which is kept free for OP-TEE is configurable.

This patch was tested on a i.MX6 Nitrogen6x board.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent ab06d72 commit e30340886fcbac1d2c03fbea4ee41ffa9464fb11
@Sascha Hauer Sascha Hauer authored on 22 May 2019
Showing 15 changed files
View
arch/arm/cpu/Makefile
View
arch/arm/cpu/start-kernel-optee.S 0 → 100644
View
arch/arm/cpu/start.c
View
arch/arm/include/asm/armlinux.h
View
arch/arm/include/asm/barebox-arm.h
View
arch/arm/lib32/armlinux.c
View
arch/arm/lib32/bootm.c
View
arch/arm/lib32/bootu.c
View
arch/arm/lib32/bootz.c
View
commands/bootm.c
View
common/Kconfig
View
common/bootm.c
View
include/asm-generic/memory_layout.h
View
include/bootm.h
View
include/tee/optee.h 0 → 100644