blob: 69b744d97386707508573ffb1d71deaab9c3d345 [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
Sandrine Bailleux4a1267a2016-05-18 16:11:47 +01002 * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
Dan Handley9df48042015-03-19 18:58:55 +00003 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30#include <arm_def.h>
31#include <plat_arm.h>
32
33/*
Sandrine Bailleux4a1267a2016-05-18 16:11:47 +010034 * Table of memory regions for different BL stages to map using the MMU.
35 * This doesn't include Trusted SRAM as arm_setup_page_tables() already
36 * takes care of mapping it.
Dan Handley9df48042015-03-19 18:58:55 +000037 */
38#if IMAGE_BL1
39const mmap_region_t plat_arm_mmap[] = {
40 ARM_MAP_SHARED_RAM,
Juan Castillob6132f12015-10-06 14:01:35 +010041 V2M_MAP_FLASH0_RO,
Dan Handley9df48042015-03-19 18:58:55 +000042 V2M_MAP_IOFPGA,
43 CSS_MAP_DEVICE,
44 SOC_CSS_MAP_DEVICE,
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010045#if TRUSTED_BOARD_BOOT
46 ARM_MAP_NS_DRAM1,
47#endif
Dan Handley9df48042015-03-19 18:58:55 +000048 {0}
49};
50#endif
51#if IMAGE_BL2
52const mmap_region_t plat_arm_mmap[] = {
53 ARM_MAP_SHARED_RAM,
Juan Castillob6132f12015-10-06 14:01:35 +010054 V2M_MAP_FLASH0_RO,
Dan Handley9df48042015-03-19 18:58:55 +000055 V2M_MAP_IOFPGA,
56 CSS_MAP_DEVICE,
57 SOC_CSS_MAP_DEVICE,
58 ARM_MAP_NS_DRAM1,
59 ARM_MAP_TSP_SEC_MEM,
60 {0}
61};
62#endif
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010063#if IMAGE_BL2U
64const mmap_region_t plat_arm_mmap[] = {
65 ARM_MAP_SHARED_RAM,
66 CSS_MAP_DEVICE,
67 SOC_CSS_MAP_DEVICE,
68 {0}
69};
70#endif
Dan Handley9df48042015-03-19 18:58:55 +000071#if IMAGE_BL31
72const mmap_region_t plat_arm_mmap[] = {
73 ARM_MAP_SHARED_RAM,
74 V2M_MAP_IOFPGA,
75 CSS_MAP_DEVICE,
76 SOC_CSS_MAP_DEVICE,
77 {0}
78};
79#endif
80#if IMAGE_BL32
81const mmap_region_t plat_arm_mmap[] = {
82 V2M_MAP_IOFPGA,
83 CSS_MAP_DEVICE,
84 SOC_CSS_MAP_DEVICE,
85 {0}
86};
87#endif
88
89ARM_CASSERT_MMAP
90