blob: 68f70a7812baa41b6829f289b5c79ff5f1bbe675 [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,
Dan Handley9df48042015-03-19 18:58:55 +000032 V2M_MAP_IOFPGA,
33 CSS_MAP_DEVICE,
34 SOC_CSS_MAP_DEVICE,
35 ARM_MAP_NS_DRAM1,
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010036#ifdef SPD_tspd
Dan Handley9df48042015-03-19 18:58:55 +000037 ARM_MAP_TSP_SEC_MEM,
Sandrine Bailleuxb260c3a2017-08-30 10:59:22 +010038#endif
Summer Qin9db8f2e2017-04-24 16:49:28 +010039#ifdef SPD_opteed
Soby Mathew874fc9e2017-09-01 13:43:50 +010040 ARM_MAP_OPTEE_CORE_MEM,
Summer Qin9db8f2e2017-04-24 16:49:28 +010041 ARM_OPTEE_PAGEABLE_LOAD_MEM,
42#endif
Dan Handley9df48042015-03-19 18:58:55 +000043 {0}
44};
45#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090046#ifdef IMAGE_BL2U
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010047const mmap_region_t plat_arm_mmap[] = {
48 ARM_MAP_SHARED_RAM,
49 CSS_MAP_DEVICE,
50 SOC_CSS_MAP_DEVICE,
51 {0}
52};
53#endif
Masahiro Yamada441bfdd2016-12-25 23:36:24 +090054#ifdef IMAGE_BL31
Dan Handley9df48042015-03-19 18:58:55 +000055const mmap_region_t plat_arm_mmap[] = {
56 ARM_MAP_SHARED_RAM,
57 V2M_MAP_IOFPGA,
58 CSS_MAP_DEVICE,
Soby Mathewcbafd7a2016-11-14 12:44:32 +000059#if CSS_USE_SCMI_DRIVER
60 /*
61 * The SCMI payload area is currently in the Non Secure SRAM. This is
62 * a potential security risk but this will be resolved once SCP
63 * completely replaces SCPI with SCMI as the only communication
64 * protocol.
65 */
66 CSS_MAP_NSRAM,
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