u-boot/tools
Bryan O'Donoghue 45b55712d4 image: Add IH_OS_TEE for TEE chain-load boot
This patch adds a new type IH_OS_TEE. This new OS type will be used for
chain-loading to Linux via a TEE.

With this patch in-place you can generate a bootable OPTEE image like this:

mkimage -A arm -T kernel -O tee -C none -d tee.bin uTee.optee

where "tee.bin" is the input binary prefixed with an OPTEE header and
uTee.optee is the output prefixed with a u-boot wrapper header.

This image type "-T kernel -O tee" is differentiated from the existing
IH_TYPE_TEE "-T tee" in that the IH_TYPE is installed by u-boot (flow
control returns to u-boot) whereas for the new IH_OS_TEE control passes to
the OPTEE firmware and the firmware chainloads onto Linux.

Andrew Davis gave the following ASCII diagram:

IH_OS_TEE: (mkimage -T kernel -O tee)
Non-Secure       Secure

                 BootROM
                   |
      -------------
     |
     v
    SPL
     |
     v
   U-Boot ------>
          <-----  OP-TEE
      |
      V
    Linux

IH_TYPE_TEE: (mkimage -T tee)
Non-Secure       Secure

                 BootROM
                   |
      -------------
     |
     v
    SPL ------->
         <-----  OP-TEE
     |
     v
   U-Boot
      |
      V
    Linux

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Suggested-by: Andrew F. Davis <afd@ti.com>
Cc: Harinarayan Bhatta <harinarayan@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Peng Fan <peng.fan@nxp.com>
Link: http://mrvan.github.io/optee-imx6ul
2018-03-19 16:14:25 -04:00
..
binman tools: Update python "help" tests to cope with "more" oddities 2018-01-16 16:15:25 -05:00
buildman buildman: add option -E for treating compiler warnings as errors 2018-02-04 22:55:34 -05:00
dtoc libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
easylogo Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
env tools: env: Implement atomic replace for filesystem 2018-03-19 16:14:19 -04:00
gdb
kermit
libfdt libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c 2018-01-28 12:27:30 -05:00
logos lib: at91: Add logo files used via API of DM_VIDEO 2017-09-14 16:02:43 -04:00
omap
patman host-tools: use python2 explicitly for shebang 2018-01-28 12:27:30 -05:00
scripts tools: fix define2mk.sed to not add quotes around negative integers 2016-06-13 07:46:29 +09:00
.gitignore tools: provide a tool to convert a binary file to an include 2018-01-22 23:09:12 +01:00
aisimage.c
aisimage.h
atmel_pmecc_params.c Change my mailaddress 2016-05-02 18:37:09 -04:00
atmelimage.c Change my mailaddress 2016-05-02 18:37:09 -04:00
bmp_logo.c tools: bmp_logo: correctly interpret BMP files with larger headers 2017-10-16 09:42:51 -04:00
default_image.c image: Add IH_OS_TEE for TEE chain-load boot 2018-03-19 16:14:25 -04:00
dumpimage.c
dumpimage.h
envcrc.c tools/env: Correct include kconfig 2016-11-23 23:41:23 -08:00
fdt_host.h libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
fdtgrep.c tools: include necessary headers explicitly 2018-01-28 12:27:31 -05:00
file2include.c tools: provide a tool to convert a binary file to an include 2018-01-22 23:09:12 +01:00
fit_check_sign.c Fix bad return value checks (detected with Coccinelle) 2015-10-24 13:50:30 -04:00
fit_common.c
fit_common.h
fit_image.c tools/mkimage: Use proper output parameter in dtc-system call 2018-03-09 12:31:07 -05:00
fit_info.c
gen_eth_addr.c tools: gen_eth_addr: add getpid() to time(0) to avoid duplicated seed 2015-09-28 10:48:25 -04:00
gen_ethaddr_crc.c tools: include necessary headers explicitly 2018-01-28 12:27:31 -05:00
genboardscfg.py genconfig.py: Print defconfig next to warnings 2017-09-11 21:43:58 -06:00
getline.c
getline.h
gpheader.h
gpimage-common.c
gpimage.c
ifdtool.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
ifdtool.h
image-host.c fix incorrect usage of DT node unit address in comments 2018-01-15 18:29:21 -07:00
imagetool.c Respect SOURCE_DATE_EPOCH when building FIT images. 2016-06-24 17:23:10 -04:00
imagetool.h tools: include necessary headers explicitly 2018-01-28 12:27:31 -05:00
img2brec.sh
img2srec.c treewide: remove unneeded semicolons 2017-06-16 10:11:38 -04:00
imximage.c imximage: Remove failure when no IVT offset is found 2018-03-09 13:04:02 +01:00
jtagconsole
kwbimage.c tools/kwbimage: fix LibreSSL build 2018-02-23 10:40:51 -05:00
kwbimage.h tools/kwbimage.h: make offset marks style consistent 2017-07-12 06:57:55 +02:00
kwboot.c tools: kwboot: don't adjust destaddr when patching the image 2017-02-17 10:15:56 +01:00
lpc32xximage.c
Makefile tools/mkimage: add support for STM32 image format 2018-03-19 16:14:19 -04:00
microcode-tool
microcode-tool.py host-tools: use python2 explicitly for shebang 2018-01-28 12:27:30 -05:00
mingw_support.c
mingw_support.h
mips-relocs.c tools: include necessary headers explicitly 2018-01-28 12:27:31 -05:00
mkenvimage.c
mkexynosspl.c Fix bad return value checks (detected with Coccinelle) 2015-10-24 13:50:30 -04:00
mkimage.c mkimage: fix display of image types list 2017-07-06 16:17:16 -04:00
mkimage.h dtc: mkimage: Add the possibility to specify DTC 2017-07-22 15:36:19 -04:00
mksunxiboot.c sunxi: Store the device tree name in the SPL header 2017-05-17 23:23:58 +05:30
moveconfig.py moveconfig: fix error message in do_autoconf() 2017-10-15 18:13:13 +09:00
mrvl_uart.sh tools/mrvl_uart.sh: Tidy script output 2018-01-29 13:36:32 +01:00
mxsboot.c mxsboot: remove unused include 2016-02-21 11:09:19 +01:00
mxsimage.c tools: mxsimage: Fix build with OpenSSL 1.1.x 2016-12-19 12:26:39 -05:00
mxsimage.h
ncb.c
netconsole
omapimage.c tools: omapimage: Fix mismatch of image size in header 2018-01-19 15:49:24 -05:00
omapimage.h
os_support.c
os_support.h
pbl_crc32.c
pbl_crc32.h
pblimage.c tools: pblimage: Fix address calculation 2017-09-11 07:55:36 -07:00
pblimage.h
prelink-riscv.c riscv: tools: Prelink u-boot 2018-01-12 08:05:12 -05:00
prelink-riscv.inc riscv: tools: Prelink u-boot 2018-01-12 08:05:12 -05:00
proftool.c tools/proftool: fix use-after-free 2015-11-16 17:22:18 -05:00
relocate-rela.c relocate-rela: add missing va_end() 2017-05-05 16:45:57 -04:00
rkcommon.c rockchip: mkimage: remove unused code-paths (spl_boot0 is now implied) 2017-11-21 23:57:23 +01:00
rkcommon.h rockchip: mkimage: force 2KB alignment for init_size 2017-06-07 07:29:22 -06:00
rkimage.c rockchip: mkimage: remove placeholder functions from rkimage 2017-05-10 13:37:21 -06:00
rkmux.py host-tools: use python2 explicitly for shebang 2018-01-28 12:27:30 -05:00
rksd.c rockchip: mkimage: force 2KB alignment for init_size 2017-06-07 07:29:22 -06:00
rkspi.c rockchip: mkimage: force 2KB alignment for init_size 2017-06-07 07:29:22 -06:00
socfpgaimage.c
stm32image.c tools/mkimage: add support for STM32 image format 2018-03-19 16:14:19 -04:00
sunxi-spl-image-builder.c tools: sunxi: avoid read after end of string 2017-05-05 16:45:57 -04:00
ublimage.c
ublimage.h
ubsha1.c
vybridimage.c tools: mkimage: add support for Vybrid image format 2016-10-06 09:06:16 +02:00
xway-swap-bytes.c
zynqimage.c tools: mkimage: Call fclose in error path 2016-12-27 11:24:16 -05:00
zynqmpimage.c tools: zynqmpimage: Check return values from file functions 2017-12-18 09:32:06 +01:00