summaryrefslogtreecommitdiff
path: root/include/plat
diff options
context:
space:
mode:
authorSummer Qin <summer.qin@arm.com>2017-04-24 16:49:28 +0100
committerEdison Ai <edison.ai@arm.com>2017-08-09 18:06:05 +0800
commit54661cd2483a62b8df7b11b6fedbdb5e29bbedbf (patch)
treea2828bd40414aa63a3c87530121b20875678e374 /include/plat
parent71fb396440f51b21401f24c925b9a97a224a4d24 (diff)
Add Trusted OS extra image parsing support for ARM standard platforms
Trusted OS may have extra images to be loaded. Load them one by one and do the parsing. In this patch, ARM TF need to load up to 3 images for optee os: header, pager and paged images. Header image is the info about optee os and images. Pager image include pager code and data. Paged image include the paging parts using virtual memory. Change-Id: Ia3bcfa6d8a3ed7850deb5729654daca7b00be394 Signed-off-by: Summer Qin <summer.qin@arm.com>
Diffstat (limited to 'include/plat')
-rw-r--r--include/plat/arm/common/arm_def.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h
index 5dae30ec..55747bf4 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 - \