blob: 4332a76ea213625acad0ca8b7abb1a9c35a2cc94 [file] [log] [blame]
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +03001/*
2 * Copyright (C) 2018 Marvell International Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
6 */
7
8#include <plat_marvell.h>
9
10
11/* MMU entry for internal (register) space access */
12#define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \
13 DEVICE0_SIZE, \
14 MT_DEVICE | MT_RW | MT_SECURE)
15
16/*
17 * Table of regions for various BL stages to map using the MMU.
18 */
19#if IMAGE_BL1
20const mmap_region_t plat_marvell_mmap[] = {
Konstantin Porotchkin5f8630b2020-06-19 17:48:48 +020021 MARVELL_MAP_SECURE_RAM,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030022 MAP_DEVICE0,
23 {0}
24};
25#endif
26#if IMAGE_BL2
27const mmap_region_t plat_marvell_mmap[] = {
Konstantin Porotchkin5f8630b2020-06-19 17:48:48 +020028 MARVELL_MAP_SECURE_RAM,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030029 MAP_DEVICE0,
30 MARVELL_MAP_DRAM,
Konstantin Porotchkin841ffeb2019-04-15 16:29:08 +030031#ifdef SPD_opteed
32 MARVELL_MAP_OPTEE_CORE_MEM,
33 MARVELL_OPTEE_PAGEABLE_LOAD_MEM,
34#endif
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030035 {0}
36};
37#endif
38
39#if IMAGE_BL2U
40const mmap_region_t plat_marvell_mmap[] = {
Konstantin Porotchkin5f8630b2020-06-19 17:48:48 +020041 MARVELL_MAP_SECURE_RAM,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030042 MAP_DEVICE0,
43 {0}
44};
45#endif
46
47#if IMAGE_BLE
48const mmap_region_t plat_marvell_mmap[] = {
49 MAP_DEVICE0,
50 {0}
51};
52#endif
53
54#if IMAGE_BL31
55const mmap_region_t plat_marvell_mmap[] = {
Konstantin Porotchkin5f8630b2020-06-19 17:48:48 +020056 MARVELL_MAP_SECURE_RAM,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030057 MAP_DEVICE0,
58 MARVELL_MAP_DRAM,
59 {0}
60};
61#endif
62#if IMAGE_BL32
63const mmap_region_t plat_marvell_mmap[] = {
Konstantin Porotchkin5f8630b2020-06-19 17:48:48 +020064 MARVELL_MAP_SECURE_RAM,
Konstantin Porotchkinf69ec582018-06-07 18:31:14 +030065 MAP_DEVICE0,
66 {0}
67};
68#endif
69
70MARVELL_CASSERT_MMAP;