aboutsummaryrefslogtreecommitdiff
path: root/plat/rpi
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2019-07-15 08:58:23 +0100
committerAndre Przywara <andre.przywara@arm.com>2019-09-13 16:54:21 +0100
commita95e6415ac3117eeaec522574bde753f1e4ffb9f (patch)
tree20a4c77c471d4e0cb03a17a9129ed884c61e9923 /plat/rpi
parent110fd1fe4d3315a774199a8c58810a02ec3eb041 (diff)
downloadtrusted-firmware-a-a95e6415ac3117eeaec522574bde753f1e4ffb9f.tar.gz
rpi3: Make SHARED_RAM optional
The existing Raspberry Pi 3 port sports a number of memory regions, which are used for several purposes. The upcoming RPi4 port will not use all of those, so make the SHARED_RAM region optional, by only mapping it if it has actually been defined. This helps to get a cleaner RPi4 port. Change-Id: Id69677b7fb6ed48d9f238854b610896785db8cab Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'plat/rpi')
-rw-r--r--plat/rpi/common/rpi3_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plat/rpi/common/rpi3_common.c b/plat/rpi/common/rpi3_common.c
index ac0330899c..ab63d98f10 100644
--- a/plat/rpi/common/rpi3_common.c
+++ b/plat/rpi/common/rpi3_common.c
@@ -23,9 +23,11 @@
DEVICE0_SIZE, \
MT_DEVICE | MT_RW | MT_SECURE)
+#ifdef SHARED_RAM_BASE
#define MAP_SHARED_RAM MAP_REGION_FLAT(SHARED_RAM_BASE, \
SHARED_RAM_SIZE, \
MT_DEVICE | MT_RW | MT_SECURE)
+#endif
#ifdef RPI3_PRELOADED_DTB_BASE
#define MAP_NS_DTB MAP_REGION_FLAT(RPI3_PRELOADED_DTB_BASE, 0x10000, \
@@ -54,7 +56,9 @@
*/
#ifdef IMAGE_BL1
static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
MAP_SHARED_RAM,
+#endif
MAP_DEVICE0,
MAP_FIP,
#ifdef SPD_opteed
@@ -66,7 +70,9 @@ static const mmap_region_t plat_rpi3_mmap[] = {
#ifdef IMAGE_BL2
static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
MAP_SHARED_RAM,
+#endif
MAP_DEVICE0,
MAP_FIP,
MAP_NS_DRAM0,
@@ -79,7 +85,9 @@ static const mmap_region_t plat_rpi3_mmap[] = {
#ifdef IMAGE_BL31
static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
MAP_SHARED_RAM,
+#endif
MAP_DEVICE0,
#ifdef RPI3_PRELOADED_DTB_BASE
MAP_NS_DTB,