diff options
author | Jagadeesh Ujja <jagadeesh.ujja@arm.com> | 2019-01-25 14:58:15 +0530 |
---|---|---|
committer | Thomas Abraham <thomas.abraham@arm.com> | 2019-10-08 10:17:40 +0530 |
commit | 6eb3e14a7e53f21dd934f19537cdfa83f08aed29 (patch) | |
tree | 18379cdc08c272696b64550a9407193a0d96575a | |
parent | 723ca99bf993fe53635fe023546b531471660374 (diff) |
plat/arm/sgi: allow nor2 flash and system registers access from s-el0ARMLT-19.10sgi575
Allow the access of system registers and nor2 flash memory region
from s-el0. This allows the secure parititions to access these
memory regions.
Change-Id: Iedc7307603ad76568b9c7808d0508e16afccc0dc
Signed-off-by: Jagadeesh Ujja <jagadeesh.ujja@arm.com>
-rw-r--r-- | plat/arm/css/sgi/include/sgi_base_platform_def.h | 18 | ||||
-rw-r--r-- | plat/arm/css/sgi/sgi_plat.c | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/plat/arm/css/sgi/include/sgi_base_platform_def.h b/plat/arm/css/sgi/include/sgi_base_platform_def.h index 8d2ceec30..8c6564266 100644 --- a/plat/arm/css/sgi/include/sgi_base_platform_def.h +++ b/plat/arm/css/sgi/include/sgi_base_platform_def.h @@ -31,7 +31,7 @@ # if ENABLE_SPM # define PLAT_ARM_MMAP_ENTRIES 9 # define MAX_XLAT_TABLES 7 -# define PLAT_SP_IMAGE_MMAP_REGIONS 7 +# define PLAT_SP_IMAGE_MMAP_REGIONS 9 # define PLAT_SP_IMAGE_MAX_XLAT_TABLES 10 # else # define PLAT_ARM_MMAP_ENTRIES 8 @@ -142,6 +142,22 @@ #define PLAT_SP_PRI PLAT_RAS_PRI +/* Map the System registers to access from S-EL0 */ +#define CSS_SYSTEMREG_DEVICE_BASE (0x1C010000) +#define CSS_SYSTEMREG_DEVICE_SIZE (0x00010000) +#define PLAT_ARM_SECURE_MAP_SYSTEMREG MAP_REGION_FLAT( \ + CSS_SYSTEMREG_DEVICE_BASE, \ + CSS_SYSTEMREG_DEVICE_SIZE, \ + MT_DEVICE | MT_RW | MT_SECURE | MT_USER) + +/* Map the NOR2 Flash to access from S-EL0 */ +#define CSS_NOR2_FLASH_DEVICE_BASE (0x10000000) +#define CSS_NOR2_FLASH_DEVICE_SIZE (0x04000000) +#define PLAT_ARM_SECURE_MAP_NOR2 MAP_REGION_FLAT( \ + CSS_NOR2_FLASH_DEVICE_BASE, \ + CSS_NOR2_FLASH_DEVICE_SIZE, \ + MT_DEVICE | MT_RW | MT_SECURE | MT_USER) + #define MM_COMMUNICATE_BUFFER_BASE UL(0xFF600000) #define MM_COMMUNICATE_BUFFER_SIZE 0x10000 #define CPER_BUFFER_BASE UL(0xFF610000) diff --git a/plat/arm/css/sgi/sgi_plat.c b/plat/arm/css/sgi/sgi_plat.c index 3e207ecc2..97b75d403 100644 --- a/plat/arm/css/sgi/sgi_plat.c +++ b/plat/arm/css/sgi/sgi_plat.c @@ -69,6 +69,8 @@ const mmap_region_t plat_arm_mmap[] = { #if ENABLE_SPM && defined(IMAGE_BL31) const mmap_region_t plat_arm_secure_partition_mmap[] = { + PLAT_ARM_SECURE_MAP_SYSTEMREG, + PLAT_ARM_SECURE_MAP_NOR2, PLAT_ARM_SECURE_MAP_DEVICE, ARM_SP_IMAGE_MMAP, ARM_SP_IMAGE_NS_BUF_MMAP, |