blob: 032ebdf7ec04381b8baa9c4bcf9b1d5a86f76c39 [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
Summer Qin9db8f2e2017-04-24 16:49:28 +01002 * Copyright (c) 2015-2017, 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 */
6#include <arm_def.h>
7#include <plat_arm.h>
8
9/*
Sandrine Bailleux4a1267a2016-05-18 16:11:47 +010010 * Table of memory regions for different BL stages to map using the MMU.
11 * This doesn't include Trusted SRAM as arm_setup_page_tables() already
12 * takes care of mapping it.
Dan Handley9df48042015-03-19 18:58:55 +000013 */
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090014#ifdef IMAGE_BL1
Dan Handley9df48042015-03-19 18:58:55 +000015const mmap_region_t plat_arm_mmap[] = {
16 ARM_MAP_SHARED_RAM,
Juan Castillob6132f12015-10-06 14:01:35 +010017 V2M_MAP_FLASH0_RO,
Dan Handley9df48042015-03-19 18:58:55 +000018 V2M_MAP_IOFPGA,
19 CSS_MAP_DEVICE,
20 SOC_CSS_MAP_DEVICE,
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010021#if TRUSTED_BOARD_BOOT
Sandrine Bailleuxd9160a52017-05-26 15:48:10 +010022 /* Map DRAM to authenticate NS_BL2U image. */
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010023 ARM_MAP_NS_DRAM1,
24#endif
Dan Handley9df48042015-03-19 18:58:55 +000025 {0}
26};
27#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090028#ifdef IMAGE_BL2
Dan Handley9df48042015-03-19 18:58:55 +000029const mmap_region_t plat_arm_mmap[] = {
30 ARM_MAP_SHARED_RAM,
Juan Castillob6132f12015-10-06 14:01:35 +010031 V2M_MAP_FLASH0_RO,
Roberto Vargasa1c16b62017-08-03 09:16:43 +010032#ifdef PLAT_ARM_MEM_PROT_ADDR
33 ARM_V2M_MAP_MEM_PROTECT,
34#endif
Dan Handley9df48042015-03-19 18:58:55 +000035 V2M_MAP_IOFPGA,
36 CSS_MAP_DEVICE,
37 SOC_CSS_MAP_DEVICE,
38 ARM_MAP_NS_DRAM1,
Roberto Vargasf8fda102017-08-08 11:27:20 +010039#ifdef AARCH64
40 ARM_MAP_DRAM2,
41#endif
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010042#ifdef SPD_tspd
Dan Handley9df48042015-03-19 18:58:55 +000043 ARM_MAP_TSP_SEC_MEM,
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010044#endif
Summer Qin9db8f2e2017-04-24 16:49:28 +010045#ifdef SPD_opteed
Soby Mathew874fc9e2017-09-01 13:43:50 +010046 ARM_MAP_OPTEE_CORE_MEM,
Summer Qin9db8f2e2017-04-24 16:49:28 +010047 ARM_OPTEE_PAGEABLE_LOAD_MEM,
48#endif
Dan Handley9df48042015-03-19 18:58:55 +000049 {0}
50};
51#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090052#ifdef IMAGE_BL2U
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010053const mmap_region_t plat_arm_mmap[] = {
54 ARM_MAP_SHARED_RAM,
55 CSS_MAP_DEVICE,
56 SOC_CSS_MAP_DEVICE,
57 {0}
58};
59#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090060#ifdef IMAGE_BL31
Dan Handley9df48042015-03-19 18:58:55 +000061const mmap_region_t plat_arm_mmap[] = {
62 ARM_MAP_SHARED_RAM,
63 V2M_MAP_IOFPGA,
64 CSS_MAP_DEVICE,
Roberto Vargasa1c16b62017-08-03 09:16:43 +010065#ifdef PLAT_ARM_MEM_PROT_ADDR
66 ARM_V2M_MAP_MEM_PROTECT,
67#endif
Dan Handley9df48042015-03-19 18:58:55 +000068 SOC_CSS_MAP_DEVICE,
69 {0}
70};
71#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090072#ifdef IMAGE_BL32
Dan Handley9df48042015-03-19 18:58:55 +000073const mmap_region_t plat_arm_mmap[] = {
Yatharth Kochar2694cba2016-11-14 12:00:41 +000074#ifdef AARCH32
75 ARM_MAP_SHARED_RAM,
76#endif
Dan Handley9df48042015-03-19 18:58:55 +000077 V2M_MAP_IOFPGA,
78 CSS_MAP_DEVICE,
79 SOC_CSS_MAP_DEVICE,
80 {0}
81};
82#endif
83
84ARM_CASSERT_MMAP