]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
plat: arm: Make BL32_BASE platform dependent when SPD_spmd is enabled
authorArunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Mon, 27 Jul 2020 12:51:30 +0000 (13:51 +0100)
committerManish Pandey <manish.pandey2@arm.com>
Tue, 20 Oct 2020 20:06:59 +0000 (20:06 +0000)
To support platforms without Trusted DRAM this patch defines
PLAT_ARM_SPMC_BASE and enables platform to use either Trusted DRAM or
DRAM region behind TZC.

Change-Id: Icaa5c7d33334258ff27e8e0bfd0812c304e68ae4
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
include/plat/arm/common/arm_def.h
plat/arm/board/fvp/include/platform_def.h

index c018643066349a1f195045eb7f08866e39d2d628..00746c6da08a6e326e1add993111da16264cc375 100644 (file)
 # elif defined(SPD_spmd)
 #  define TSP_SEC_MEM_BASE             (ARM_AP_TZC_DRAM1_BASE + ULL(0x200000))
 #  define TSP_SEC_MEM_SIZE             (ARM_AP_TZC_DRAM1_SIZE - ULL(0x200000))
-#  define BL32_BASE                    PLAT_ARM_TRUSTED_DRAM_BASE
-#  define BL32_LIMIT                   (PLAT_ARM_TRUSTED_DRAM_BASE     \
-                                               + (UL(1) << 21))
+#  define BL32_BASE                    PLAT_ARM_SPMC_BASE
+#  define BL32_LIMIT                   (PLAT_ARM_SPMC_BASE +           \
+                                                PLAT_ARM_SPMC_SIZE)
 # elif ARM_BL31_IN_DRAM
 #  define TSP_SEC_MEM_BASE             (ARM_AP_TZC_DRAM1_BASE +        \
                                                PLAT_ARM_MAX_BL31_SIZE)
index 50f638924f25db85bde464d1ca754b927b364840..8defcf837a832f403c4dc4515122399118538421 100644 (file)
 #define PLAT_ARM_TRUSTED_DRAM_BASE     UL(0x06000000)
 #define PLAT_ARM_TRUSTED_DRAM_SIZE     UL(0x02000000)  /* 32 MB */
 
+/*
+ * Max size of SPMC is 2MB for fvp. With SPMD enabled this value corresponds to
+ * max size of BL32 image.
+ */
+#if defined(SPD_spmd)
+#define PLAT_ARM_SPMC_BASE             PLAT_ARM_TRUSTED_DRAM_BASE
+#define PLAT_ARM_SPMC_SIZE             UL(0x200000)  /* 2 MB */
+#endif
+
 /* virtual address used by dynamic mem_protect for chunk_base */
 #define PLAT_ARM_MEM_PROTEC_VA_FRAME   UL(0xc0000000)