mem_protect: Add mem_protect support in Juno and FVP for DRAM1
authorRoberto Vargas <roberto.vargas@arm.com>
Thu, 3 Aug 2017 08:16:43 +0000 (09:16 +0100)
committerRoberto Vargas <roberto.vargas@arm.com>
Mon, 25 Sep 2017 12:32:20 +0000 (13:32 +0100)
commitf145403c2a1a7064cb55670ac0674dc6586398ab
tree8da5287f959444b451329224dc57ff595fb82b05
parent43cbaf061587e7e8b3529e4b1d30de3ab1b52d3e
mem_protect: Add mem_protect support in Juno and FVP for DRAM1

mem_protect needs some kind of non-volatile memory because it has
to remember its state across reset and power down events.
The most suitable electronic part for this feature is a NVRAM
which should be only accesible from the secure world. Juno and
FVP lack such hardware and for this reason the MEM_PROTECT
functionality is implemented with Flash EEPROM memory on both
boards, even though this memory is accesible from the non-secure
world. This is done only to show a full implementation of
these PSCI features, but an actual system shouldn't use a
non-secure NVRAM to implement it.

The EL3 runtime software will write the mem_protect flag and BL2
will read and clear the memory ranges if enabled. It is done in
BL2 because it reduces the time that TF needs access to the full
non-secure memory.

The memory layout of both boards is defined using macros which
take different values in Juno and FVP platforms. Generic platform
helpers are added that use the platform specific macros to generate
a mem_region_t that is valid for the platform.

Change-Id: I2c6818ac091a2966fa07a52c5ddf8f6fde4941e9
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
13 files changed:
include/plat/arm/board/common/board_arm_def.h
include/plat/arm/board/common/v2m_def.h
include/plat/arm/common/plat_arm.h
plat/arm/board/common/board_common.mk
plat/arm/board/common/board_css_common.c
plat/arm/board/fvp/fvp_common.c
plat/arm/board/fvp/fvp_pm.c
plat/arm/board/fvp/sp_min/sp_min-fvp.mk
plat/arm/board/juno/include/platform_def.h
plat/arm/board/juno/sp_min/sp_min-juno.mk
plat/arm/common/arm_bl2_setup.c
plat/arm/common/arm_nor_psci_mem_protect.c [new file with mode: 0644]
plat/arm/css/common/css_pm.c