blob: 0f0410995835e9e13a271556528c1bd1dd8b9706 [file] [log] [blame]
Nariman Poushinc703f902018-03-07 10:29:57 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arm_def.h>
8#include <bl_common.h>
9#include <debug.h>
10#include <plat_arm.h>
11#include <platform_def.h>
12#include <sgm_variant.h>
13
14/*
15 * Table of regions for different BL stages to map using the MMU.
16 * This doesn't include Trusted RAM as the 'mem_layout' argument passed to
17 * arm_configure_mmu_elx() will give the available subset of that.
18 */
19#if IMAGE_BL1
20const mmap_region_t plat_arm_mmap[] = {
21 ARM_MAP_SHARED_RAM,
22 V2M_MAP_FLASH0_RO,
23 V2M_MAP_IOFPGA,
24 CSS_MAP_DEVICE,
25 CSS_MAP_GIC_DEVICE,
26 SOC_CSS_MAP_DEVICE,
27#if TRUSTED_BOARD_BOOT
28 ARM_MAP_NS_DRAM1,
29#endif
30 {0}
31};
32#endif
33#if IMAGE_BL2
34const mmap_region_t plat_arm_mmap[] = {
35 ARM_MAP_SHARED_RAM,
36 V2M_MAP_FLASH0_RO,
37 V2M_MAP_IOFPGA,
38 CSS_MAP_DEVICE,
39 CSS_MAP_GIC_DEVICE,
40 SOC_CSS_MAP_DEVICE,
41 ARM_MAP_NS_DRAM1,
42 ARM_MAP_TSP_SEC_MEM,
43#ifdef SPD_opteed
44 ARM_OPTEE_PAGEABLE_LOAD_MEM,
45#endif
Antonio Nino Diaz9b759862018-09-25 11:38:18 +010046#if TRUSTED_BOARD_BOOT && !BL2_AT_EL3
John Tsichritzisc19949a2018-08-22 12:55:41 +010047 ARM_MAP_BL1_RW,
48#endif
Nariman Poushinc703f902018-03-07 10:29:57 +000049 {0}
50};
51#endif
52#if IMAGE_BL2U
53const mmap_region_t plat_arm_mmap[] = {
54 ARM_MAP_SHARED_RAM,
55 CSS_MAP_DEVICE,
56 CSS_MAP_GIC_DEVICE,
57 SOC_CSS_MAP_DEVICE,
58 {0}
59};
60#endif
61#if IMAGE_BL31
62const mmap_region_t plat_arm_mmap[] = {
63 ARM_MAP_SHARED_RAM,
64 V2M_MAP_IOFPGA,
65 CSS_MAP_DEVICE,
66 CSS_MAP_GIC_DEVICE,
67 SOC_CSS_MAP_DEVICE,
68 {0}
69};
70#endif
71#if IMAGE_BL32
72const mmap_region_t plat_arm_mmap[] = {
73 V2M_MAP_IOFPGA,
74 CSS_MAP_DEVICE,
75 CSS_MAP_GIC_DEVICE,
76 SOC_CSS_MAP_DEVICE,
77 {0}
78};
79#endif
80
81ARM_CASSERT_MMAP
82
83const mmap_region_t *plat_arm_get_mmap(void)
84{
85 return plat_arm_mmap;
86}