summaryrefslogtreecommitdiff
path: root/plat/ti
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2019-01-22 14:16:03 -0600
committerAndrew F. Davis <afd@ti.com>2019-04-19 12:56:43 -0400
commite2dc40a222348a05cd8faffd541e6b678f34bf98 (patch)
tree0e47974d832cab7bc2d126bbcba0ddf3ac3642c5 /plat/ti
parent32e29fcb0cba19d615f97cc8d8eeb3aff89f656d (diff)
ti: k3: common: Enable SEPARATE_CODE_AND_RODATA by default
This should be more secure and looks a bit cleaner. Signed-off-by: Andrew F. Davis <afd@ti.com> Change-Id: Ie5eaf0234b211ba02631cf5eab5faa1402a34461
Diffstat (limited to 'plat/ti')
-rw-r--r--plat/ti/k3/common/k3_bl31_setup.c2
-rw-r--r--plat/ti/k3/common/plat_common.mk3
-rw-r--r--plat/ti/k3/include/platform_def.h1
3 files changed, 4 insertions, 2 deletions
diff --git a/plat/ti/k3/common/k3_bl31_setup.c b/plat/ti/k3/common/k3_bl31_setup.c
index 69ecbfc6..66ce9a7d 100644
--- a/plat/ti/k3/common/k3_bl31_setup.c
+++ b/plat/ti/k3/common/k3_bl31_setup.c
@@ -99,7 +99,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
void bl31_plat_arch_setup(void)
{
const mmap_region_t bl_regions[] = {
- MAP_REGION_FLAT(BL31_BASE, BL31_END - BL31_BASE,
+ MAP_REGION_FLAT(BL31_START, BL31_END - BL31_START,
MT_MEMORY | MT_RW | MT_SECURE),
MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
MT_CODE | MT_SECURE),
diff --git a/plat/ti/k3/common/plat_common.mk b/plat/ti/k3/common/plat_common.mk
index c91a0358..29fcafdb 100644
--- a/plat/ti/k3/common/plat_common.mk
+++ b/plat/ti/k3/common/plat_common.mk
@@ -22,6 +22,9 @@ ERRATA_A53_836870 := 1
ERRATA_A53_843419 := 1
ERRATA_A53_855873 := 1
+# Split out RO data into a non-executable section
+SEPARATE_CODE_AND_RODATA := 1
+
# Leave the caches enabled on core powerdown path
TI_AM65X_WORKAROUND := 1
$(eval $(call add_define,TI_AM65X_WORKAROUND))
diff --git a/plat/ti/k3/include/platform_def.h b/plat/ti/k3/include/platform_def.h
index c768b50e..68fdae74 100644
--- a/plat/ti/k3/include/platform_def.h
+++ b/plat/ti/k3/include/platform_def.h
@@ -82,7 +82,6 @@
#define BL31_BASE SEC_SRAM_BASE
#define BL31_SIZE SEC_SRAM_SIZE
#define BL31_LIMIT (BL31_BASE + BL31_SIZE)
-#define BL31_PROGBITS_LIMIT BL31_LIMIT
/*
* Defines the maximum number of translation tables that are allocated by the