mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 06:30:39 +00:00
57de1ea5be
secure_tee_install is used to install and initialize a secure TEE OS such as Linaro OP-TEE into the secure world. This function takes in the address where the signed TEE image is loaded as an argument. The signed TEE image consists of a header (struct tee_header), TEE code+data followed by the signature generated using image signing tool from TI security development package (SECDEV). Refer to README.ti-secure for more information. This function uses 2 new secure APIs. 1. PPA_SERV_HAL_TEE_LOAD_MASTER - Must be called on CPU Core 0. Protected memory for TEE must be reserved before calling this function. This API needs arguments filled into struct ppa_tee_load_info. The TEE image is authenticated and if there are no errors, the control passes to the TEE entry point. 2. PPA_SERV_HAL_TEE_LOAD_SLAVE - Called on other CPU cores only after a TEE_LOAD_MASTER call. Takes no arguments. Checks if TEE was successfully loaded (on core 0) and transfers control to the same TEE entry point. The code at TEE entry point is expected perform OS initialization steps and return back to non-secure world (U-Boot). Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
30 lines
590 B
C
30 lines
590 B
C
/*
|
|
* OP-TEE related definitions
|
|
*
|
|
* (C) Copyright 2016 Linaro Limited
|
|
* Andrew F. Davis <andrew.davis@linaro.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#ifndef _OPTEE_H
|
|
#define _OPTEE_H
|
|
|
|
#define OPTEE_MAGIC 0x4554504f
|
|
#define OPTEE_VERSION 1
|
|
#define OPTEE_ARCH_ARM32 0
|
|
#define OPTEE_ARCH_ARM64 1
|
|
|
|
struct optee_header {
|
|
uint32_t magic;
|
|
uint8_t version;
|
|
uint8_t arch;
|
|
uint16_t flags;
|
|
uint32_t init_size;
|
|
uint32_t init_load_addr_hi;
|
|
uint32_t init_load_addr_lo;
|
|
uint32_t init_mem_usage;
|
|
uint32_t paged_size;
|
|
};
|
|
|
|
#endif /* _OPTEE_H */
|