diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/optee_utils.h | 15 | ||||
-rw-r--r-- | include/plat/arm/common/arm_def.h | 17 |
2 files changed, 32 insertions, 0 deletions
diff --git a/include/lib/optee_utils.h b/include/lib/optee_utils.h new file mode 100644 index 000000000..3d35b190d --- /dev/null +++ b/include/lib/optee_utils.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef __OPTEE_UTILS_H__ +#define __OPTEE_UTILS_H__ + +#include <bl_common.h> + +int parse_optee_header(entry_point_info_t *header_ep, + image_info_t *pager_image_info, + image_info_t *paged_image_info); + +#endif /* __OPTEE_UTILS_H__ */ diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index 5dae30ec7..55747bf4a 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -95,6 +95,23 @@ #define ARM_TZC_NS_DRAM_S_ACCESS TZC_REGION_S_NONE #endif +#ifdef SPD_opteed +/* + * BL2 needs to map 3.5MB from 512KB offset in TZC_DRAM1 in order to + * load/authenticate the trusted os extra image. The first 512KB of TZC_DRAM1 + * are reserved for trusted os (OPTEE). The extra image loading for OPTEE is + * paged image which only include the paging part using virtual memory but + * without "init" data. OPTEE will copy the "init" data (from pager image) to + * the first 512KB of TZC_DRAM, and then copy the extra image behind the "init" + * data. + */ +#define ARM_OPTEE_PAGEABLE_LOAD_BASE (ARM_AP_TZC_DRAM1_BASE + 0x80000) +#define ARM_OPTEE_PAGEABLE_LOAD_SIZE 0x380000 +#define ARM_OPTEE_PAGEABLE_LOAD_MEM MAP_REGION_FLAT( \ + ARM_OPTEE_PAGEABLE_LOAD_BASE, \ + ARM_OPTEE_PAGEABLE_LOAD_SIZE, \ + MT_MEMORY | MT_RW | MT_SECURE) +#endif /* SPD_opteed */ #define ARM_NS_DRAM1_BASE ARM_DRAM1_BASE #define ARM_NS_DRAM1_SIZE (ARM_DRAM1_SIZE - \ |