diff options
author | Daniel Boulby <daniel.boulby@arm.com> | 2018-07-16 14:09:15 +0100 |
---|---|---|
committer | Daniel Boulby <daniel.boulby@arm.com> | 2018-08-01 16:26:26 +0100 |
commit | 2ecaafd2e832593e3f5b0a14c166ff88e4bebe43 (patch) | |
tree | 8de9abcb6c0669dc4ac1838c4e4ab0a01a47b801 /include | |
parent | 60e062fb0e33f7d9825267cbfb397d7c7aca1169 (diff) |
Fix build for SEPARATE_CODE_AND_RODATA=0
TF won't build since no memory region is specified
for when SEPARATE_CODE_AND_RODATA=0 it still relies on
the ARM_MAP_BL_RO_DATA region which is never defined for
this case. Create memory region combining code and RO data for
when the build flag SEPARATE_CODE_AND_RODATA=0 to fix this
Change-Id: I6c129eb0833497710cce55e76b8908ce03e0a638
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/plat/arm/common/arm_def.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index 9a661d7a..47f2ac21 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -241,16 +241,25 @@ ARM_EL3_TZC_DRAM1_SIZE, \ MT_MEMORY | MT_RW | MT_SECURE) +/* + * If SEPARATE_CODE_AND_RODATA=1 we define a region for each section + * otherwise one region is defined containing both. + */ #if SEPARATE_CODE_AND_RODATA -#define ARM_MAP_BL_CODE MAP_REGION_FLAT( \ +#define ARM_MAP_BL_RO MAP_REGION_FLAT( \ BL_CODE_BASE, \ BL_CODE_END - BL_CODE_BASE, \ - MT_CODE | MT_SECURE) -#define ARM_MAP_BL_RO_DATA MAP_REGION_FLAT( \ + MT_CODE | MT_SECURE), \ + MAP_REGION_FLAT( \ BL_RO_DATA_BASE, \ BL_RO_DATA_END \ - BL_RO_DATA_BASE, \ MT_RO_DATA | MT_SECURE) +#else +#define ARM_MAP_BL_RO MAP_REGION_FLAT( \ + BL_CODE_BASE, \ + BL_CODE_END - BL_CODE_BASE, \ + MT_CODE | MT_SECURE) #endif #if USE_COHERENT_MEM #define ARM_MAP_BL_COHERENT_RAM MAP_REGION_FLAT( \ @@ -261,14 +270,10 @@ #endif /* - * The number of regions like RO(code), coherent and data required by + * The max number of regions like RO(code), coherent and data required by * different BL stages which need to be mapped in the MMU. */ -#if USE_COHERENT_MEM # define ARM_BL_REGIONS 4 -#else -# define ARM_BL_REGIONS 3 -#endif #define MAX_MMAP_REGIONS (PLAT_ARM_MMAP_ENTRIES + \ ARM_BL_REGIONS) |