]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(rme): xlat table setup fails for bl2
authorSoby Mathew <soby.mathew@arm.com>
Wed, 6 Jul 2022 15:01:40 +0000 (16:01 +0100)
committerSoby Mathew <soby.mathew@arm.com>
Thu, 7 Jul 2022 08:35:50 +0000 (10:35 +0200)
The patch 8c980a4 created a 4KB shared region from the 32MB
Realm region for RMM-EL3 communication. But this meant that BL2
needs to map a region of 32MB - 4KB, which required more xlat
tables at runtime. This patch maps the entire 32MB region in BL2
which is more memory efficient in terms of xlat tables needed.

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I17aa27545293d7b5bbec1c9132ea2c22bf2e7e65

include/plat/arm/common/arm_def.h

index 47fbe76b042111a747c72b6cd3c4b09f83070fd5..ab0e4ff2cc3202e12ea11ea8e6fc762bc65ae52e 100644 (file)
                                        MT_MEMORY | MT_RW | MT_SECURE)
 
 #if ENABLE_RME
+/*
+ * We add the EL3_RMM_SHARED size to RMM mapping to map the region as a block.
+ * Else we end up requiring more pagetables in BL2 for ROMLIB build.
+ */
 #define ARM_MAP_RMM_DRAM       MAP_REGION_FLAT(                        \
                                        PLAT_ARM_RMM_BASE,              \
-                                       PLAT_ARM_RMM_SIZE,              \
+                                       (PLAT_ARM_RMM_SIZE +            \
+                                       ARM_EL3_RMM_SHARED_SIZE),       \
                                        MT_MEMORY | MT_RW | MT_REALM)