From a95e6415ac3117eeaec522574bde753f1e4ffb9f Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 15 Jul 2019 08:58:23 +0100 Subject: [PATCH] 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 --- plat/rpi/common/rpi3_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plat/rpi/common/rpi3_common.c b/plat/rpi/common/rpi3_common.c index ac033089..ab63d98f 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, -- 2.30.2