ARM platforms: Demonstrate mem_protect from el3_runtime
authorRoberto Vargas <roberto.vargas@arm.com>
Fri, 5 Jan 2018 16:00:05 +0000 (16:00 +0000)
committerRoberto Vargas <roberto.vargas@arm.com>
Tue, 1 May 2018 14:25:25 +0000 (15:25 +0100)
commit638b034cc34ecdc54b9c790d5192229a027c8156
treefc634c377f4eae6f510fe43e558a273358672d9f
parenta8d9550b527107b85703d7b4e93073e653ae95f7
ARM platforms: Demonstrate mem_protect from el3_runtime

Previously mem_protect used to be only supported from BL2. This is not
helpful in the case when ARM TF-A BL2 is not used. This patch demonstrates
mem_protect from el3_runtime firmware on ARM Platforms specifically
when RESET_TO_BL31 or RESET_TO_SP_MIN flag is set as BL2 may be absent
in these cases. The Non secure DRAM is dynamically mapped into EL3 mmap
tables temporarily and then the protected regions are then cleared. This
avoids the need to map the non secure DRAM permanently to BL31/sp_min.

The stack size is also increased, because DYNAMIC_XLAT_TABLES require
a bigger stack.

Change-Id: Ia44c594192ed5c5adc596c0cff2c7cc18c001fde
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
14 files changed:
include/lib/utils.h
include/plat/arm/board/common/board_arm_def.h
include/plat/arm/common/plat_arm.h
include/plat/arm/css/common/css_def.h
lib/utils/mem_region.c
plat/arm/board/common/board_css_common.c
plat/arm/board/fvp/fvp_pm.c
plat/arm/board/fvp/include/platform_def.h
plat/arm/board/juno/include/platform_def.h
plat/arm/common/arm_bl2_setup.c
plat/arm/common/arm_bl31_setup.c
plat/arm/common/arm_nor_psci_mem_protect.c
plat/arm/common/sp_min/arm_sp_min_setup.c
plat/arm/css/common/css_pm.c