board_css_common.c 1.61 KB
Newer Older
1
/*
2
 * Copyright (c) 2015-2017, 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
11
12
 * Table of memory regions for different BL stages to map using the MMU.
 * This doesn't include Trusted SRAM as arm_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_RO,
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_RO,
32
33
34
35
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
	ARM_MAP_NS_DRAM1,
36
#ifdef SPD_tspd
37
	ARM_MAP_TSP_SEC_MEM,
38
#endif
39
40
41
#ifdef SPD_opteed
	ARM_OPTEE_PAGEABLE_LOAD_MEM,
#endif
42
43
44
	{0}
};
#endif
45
#ifdef IMAGE_BL2U
46
47
48
49
50
51
52
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif
53
#ifdef IMAGE_BL31
54
55
56
57
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
58
59
60
61
62
63
64
65
66
#if CSS_USE_SCMI_DRIVER
	/*
	 * The SCMI payload area is currently in the Non Secure SRAM. This is
	 * a potential security risk but this will be resolved once SCP
	 * completely replaces SCPI with SCMI as the only communication
	 * protocol.
	 */
	CSS_MAP_NSRAM,
#endif
67
68
69
70
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif
71
#ifdef IMAGE_BL32
72
const mmap_region_t plat_arm_mmap[] = {
73
74
75
#ifdef AARCH32
	ARM_MAP_SHARED_RAM,
#endif
76
77
78
79
80
81
82
83
	V2M_MAP_IOFPGA,
	CSS_MAP_DEVICE,
	SOC_CSS_MAP_DEVICE,
	{0}
};
#endif

ARM_CASSERT_MMAP