juno_common.c 1.62 KB
Newer Older
1
/*
2
 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
7
8
9
 */
#include <arm_def.h>
#include <plat_arm.h>

/*
10
 * Table of memory regions for different BL stages to map using the MMU.
11
12
 * This doesn't include Trusted SRAM as setup_page_tables() already takes care
 * of mapping it.
13
 */
14
#ifdef IMAGE_BL1
15
16
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
17
	V2M_MAP_FLASH0_RW,
18
19
20
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
21
#if TRUSTED_BOARD_BOOT
22
	/* Map DRAM to authenticate NS_BL2U image. */
23
24
	ARM_MAP_NS_DRAM1,
#endif
25
26
27
	{0}
};
#endif
28
#ifdef IMAGE_BL2
29
30
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
31
	V2M_MAP_FLASH0_RW,
32
33
34
#ifdef PLAT_ARM_MEM_PROT_ADDR
	ARM_V2M_MAP_MEM_PROTECT,
#endif
35
36
37
38
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
	ARM_MAP_NS_DRAM1,
39
40
41
#ifdef AARCH64
	ARM_MAP_DRAM2,
#endif
42
#ifdef SPD_tspd
43
	ARM_MAP_TSP_SEC_MEM,
44
#endif
45
#ifdef SPD_opteed
46
	ARM_MAP_OPTEE_CORE_MEM,
47
48
	ARM_OPTEE_PAGEABLE_LOAD_MEM,
#endif
49
50
51
	{0}
};
#endif
52
#ifdef IMAGE_BL2U
53
54
55
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	CSS_MAP_DEVICE,
56
57
	CSS_MAP_SCP_BL2U,
	V2M_MAP_IOFPGA,
58
59
60
61
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif
62
#ifdef IMAGE_BL31
63
64
65
66
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
67
68
69
#ifdef PLAT_ARM_MEM_PROT_ADDR
	ARM_V2M_MAP_MEM_PROTECT,
#endif
70
71
72
73
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif
74
#ifdef IMAGE_BL32
75
const mmap_region_t plat_arm_mmap[] = {
76
77
#ifdef AARCH32
	ARM_MAP_SHARED_RAM,
78
79
80
#ifdef PLAT_ARM_MEM_PROT_ADDR
	ARM_V2M_MAP_MEM_PROTECT,
#endif
81
#endif
82
83
84
85
86
87
88
89
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif

ARM_CASSERT_MMAP