diff options
author | Jagadeesh Ujja <jagadeesh.ujja@arm.com> | 2019-01-25 14:58:15 +0530 |
---|---|---|
committer | Thomas Abraham <thomas.abraham@arm.com> | 2019-03-08 10:25:34 +0530 |
commit | d3de9b3b0e69c2944d5eaae4323d309f12f90265 (patch) | |
tree | a41102289bb7a2a099de9060368d0a145ce130b4 | |
parent | 9f1c1c049e752d7f06f387dc6ce15bdac83b8765 (diff) |
plat/arm/sgi: allow nor2 flash and system registers access from s-el0RD-N1-E1-EDGE-19.1-RC0
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 ad242e09c..76391084b 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 42eff866a..39742c6f7 100644 --- a/plat/arm/css/sgi/sgi_plat.c +++ b/plat/arm/css/sgi/sgi_plat.c @@ -67,6 +67,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, |