From bc420748bfc44a9e09000a3966fc59e9e0219df4 Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Tue, 5 May 2015 14:59:15 +0200 Subject: TA as ELF + signature Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: (part of ELF spec, pointing out segments to load) A struct ta_head is placed in the first section of the first segment to carry flags and other properties of the TA. elf32.h, elf64.h and elf_common.h are imported from FreeBSD. In addition to the R_ARM_RELATIVE relocation type, adds support for R_ARM_ABS32 relocations. Since a symbol table is needed to process this relocation type a separate program header is added in the TA ELF containing the sections .dynamic, .dynsym, .dynstr and .hash. These sections are only needed during relocation and could be released once the TA is relocated. A default signing key has been generated with openssl genrsa -out key.pem and added as keys/default_ta.pem Signed-off-by: Jens Wiklander Tested-by: Jens Wiklander (QEMU, FVP) Reviewed-by: Pascal Brand Tested-by: Pascal Brand (STM platform) Tested-by: Pascal Brand (QEMU platform) Reviewed-by: Jerome Forissier Tested-by: Jerome Forissier (HiKey) --- mk/config.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mk/config.mk') diff --git a/mk/config.mk b/mk/config.mk index 64662670..55e64150 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -84,3 +84,6 @@ CFG_TEE_FW_MANUFACTURER ?= FW_MAN_UNDEF # Encrypted File System Support CFG_ENC_FS ?= y + +# Embed public part of this key in OP-TEE OS +TA_SIGN_KEY ?= keys/default_ta.pem -- cgit v1.2.3