blob: 118c19ab709b22bc76a86317c556bfc042f0921d [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
Roberto Vargas550eb082018-01-05 16:00:05 +00002 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Dan Handley9df48042015-03-19 18:58:55 +00005 */
Antonio Nino Diaza320ecd2019-01-15 14:19:50 +00006
7#include <platform_def.h>
Antonio Nino Diazbd7b7402019-01-25 14:30:04 +00008#include <plat/arm/common/plat_arm.h>
Dan Handley9df48042015-03-19 18:58:55 +00009
10/*
Sandrine Bailleux4a1267a2016-05-18 16:11:47 +010011 * Table of memory regions for different BL stages to map using the MMU.
Roberto Vargas344ff022018-10-19 16:44:18 +010012 * This doesn't include Trusted SRAM as setup_page_tables() already takes care
13 * of mapping it.
Dan Handley9df48042015-03-19 18:58:55 +000014 */
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090015#ifdef IMAGE_BL1
Dan Handley9df48042015-03-19 18:58:55 +000016const mmap_region_t plat_arm_mmap[] = {
17 ARM_MAP_SHARED_RAM,
Soby Mathew94273572018-03-07 11:32:04 +000018 V2M_MAP_FLASH0_RW,
Dan Handley9df48042015-03-19 18:58:55 +000019 V2M_MAP_IOFPGA,
20 CSS_MAP_DEVICE,
21 SOC_CSS_MAP_DEVICE,
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010022#if TRUSTED_BOARD_BOOT
Sandrine Bailleuxd9160a52017-05-26 15:48:10 +010023 /* Map DRAM to authenticate NS_BL2U image. */
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010024 ARM_MAP_NS_DRAM1,
25#endif
Dan Handley9df48042015-03-19 18:58:55 +000026 {0}
27};
28#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090029#ifdef IMAGE_BL2
Dan Handley9df48042015-03-19 18:58:55 +000030const mmap_region_t plat_arm_mmap[] = {
31 ARM_MAP_SHARED_RAM,
Soby Mathew94273572018-03-07 11:32:04 +000032 V2M_MAP_FLASH0_RW,
Roberto Vargasa1c16b62017-08-03 09:16:43 +010033#ifdef PLAT_ARM_MEM_PROT_ADDR
34 ARM_V2M_MAP_MEM_PROTECT,
35#endif
Dan Handley9df48042015-03-19 18:58:55 +000036 V2M_MAP_IOFPGA,
37 CSS_MAP_DEVICE,
38 SOC_CSS_MAP_DEVICE,
39 ARM_MAP_NS_DRAM1,
Roberto Vargasf8fda102017-08-08 11:27:20 +010040#ifdef AARCH64
41 ARM_MAP_DRAM2,
42#endif
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010043#ifdef SPD_tspd
Dan Handley9df48042015-03-19 18:58:55 +000044 ARM_MAP_TSP_SEC_MEM,
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010045#endif
Summer Qin9db8f2e2017-04-24 16:49:28 +010046#ifdef SPD_opteed
Soby Mathew874fc9e2017-09-01 13:43:50 +010047 ARM_MAP_OPTEE_CORE_MEM,
Summer Qin9db8f2e2017-04-24 16:49:28 +010048 ARM_OPTEE_PAGEABLE_LOAD_MEM,
49#endif
Dan Handley9df48042015-03-19 18:58:55 +000050 {0}
51};
52#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090053#ifdef IMAGE_BL2U
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010054const mmap_region_t plat_arm_mmap[] = {
55 ARM_MAP_SHARED_RAM,
56 CSS_MAP_DEVICE,
Daniel Boulby45a2c9e2018-07-06 16:54:44 +010057 CSS_MAP_SCP_BL2U,
58 V2M_MAP_IOFPGA,
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010059 SOC_CSS_MAP_DEVICE,
60 {0}
61};
62#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090063#ifdef IMAGE_BL31
Dan Handley9df48042015-03-19 18:58:55 +000064const mmap_region_t plat_arm_mmap[] = {
65 ARM_MAP_SHARED_RAM,
66 V2M_MAP_IOFPGA,
67 CSS_MAP_DEVICE,
Roberto Vargasa1c16b62017-08-03 09:16:43 +010068#ifdef PLAT_ARM_MEM_PROT_ADDR
69 ARM_V2M_MAP_MEM_PROTECT,
70#endif
Dan Handley9df48042015-03-19 18:58:55 +000071 SOC_CSS_MAP_DEVICE,
72 {0}
73};
74#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090075#ifdef IMAGE_BL32
Dan Handley9df48042015-03-19 18:58:55 +000076const mmap_region_t plat_arm_mmap[] = {
Yatharth Kochar2694cba2016-11-14 12:00:41 +000077#ifdef AARCH32
78 ARM_MAP_SHARED_RAM,
Roberto Vargas550eb082018-01-05 16:00:05 +000079#ifdef PLAT_ARM_MEM_PROT_ADDR
80 ARM_V2M_MAP_MEM_PROTECT,
81#endif
Yatharth Kochar2694cba2016-11-14 12:00:41 +000082#endif
Dan Handley9df48042015-03-19 18:58:55 +000083 V2M_MAP_IOFPGA,
84 CSS_MAP_DEVICE,
85 SOC_CSS_MAP_DEVICE,
86 {0}
87};
88#endif
89
90ARM_CASSERT_MMAP