juno_common.c 1.64 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

#include <platform_def.h>
8
#include <plat/arm/common/plat_arm.h>
9
10

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

ARM_CASSERT_MMAP