aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2020-06-17 15:37:17 +0100
committerAlexei Fedorov <Alexei.Fedorov@arm.com>2020-06-17 15:37:17 +0100
commitdf954c91755578994be898e718cfe32f84b94498 (patch)
tree51b1c5627c792ed95122423cb6485dffd6a9a6db
parent87c9a5cc97c16f6c1c991fab334bfed4e4fce296 (diff)
downloadtf-a-tests-df954c91755578994be898e718cfe32f84b94498.tar.gz
TFTF: Fix regions' mapping with no NS bit set
This patch fixes the bug in tftf_plat_configure_mmu() function (tf-a-tests\plat\common\plat_common.c) which is missing setting MT_NS attribute flag when maps Code, RO data and RW Data + BSS memory regions, causing them to be reported as Secure memory: [LV3] VA:0x88000000 PA:0x88000000 size:0x1000 MEM-RO-EXEC-S ... [LV3] VA:0x88016000 PA:0x88016000 size:0x1000 MEM-RO-XN-S ... [LV3] VA:0x88020000 PA:0x88020000 size:0x1000 MEM-RW-XN-S Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Change-Id: If64aa65179ffe223d3e6f1c6bf73a7e4ce7fa536
-rw-r--r--plat/common/plat_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plat/common/plat_common.c b/plat/common/plat_common.c
index b6cfec3..c43ae12 100644
--- a/plat/common/plat_common.c
+++ b/plat/common/plat_common.c
@@ -88,15 +88,15 @@ void tftf_plat_configure_mmu(void)
{
/* Code */
mmap_add_region(IMAGE_TEXT_BASE, IMAGE_TEXT_BASE,
- IMAGE_TEXT_END - IMAGE_TEXT_BASE, MT_CODE);
+ IMAGE_TEXT_END - IMAGE_TEXT_BASE, MT_CODE | MT_NS);
/* RO data */
mmap_add_region(IMAGE_RODATA_BASE, IMAGE_RODATA_BASE,
- IMAGE_RODATA_END - IMAGE_RODATA_BASE, MT_RO_DATA);
+ IMAGE_RODATA_END - IMAGE_RODATA_BASE, MT_RO_DATA | MT_NS);
/* Data + BSS */
mmap_add_region(IMAGE_RW_BASE, IMAGE_RW_BASE,
- IMAGE_RW_END - IMAGE_RW_BASE, MT_RW_DATA);
+ IMAGE_RW_END - IMAGE_RW_BASE, MT_RW_DATA | MT_NS);
#if IMAGE_TFTF
mmap_add_region(COHERENT_RAM_START, COHERENT_RAM_START,