From 8a610f8294335530bd7b190641c43b1788e9725c Mon Sep 17 00:00:00 2001 From: Vijayenthiran Subramaniam Date: Mon, 15 Jul 2019 23:56:40 +0530 Subject: sgi_plat: add mmap entry for 4TB+ device region Add mmap entry for 4TB+ device region so that the primary CPU can access the peripherals on the slave chip Change-Id: I0c6d1c14ac581d4ed77d986d8e5c6c7a3c840068 Signed-off-by: Vijayenthiran Subramaniam --- plat/arm/board/rdn1edge/include/platform_def.h | 4 ++-- plat/arm/css/sgi/include/sgi_base_platform_def.h | 4 ++-- plat/arm/css/sgi/sgi_plat.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/plat/arm/board/rdn1edge/include/platform_def.h b/plat/arm/board/rdn1edge/include/platform_def.h index 4908bb171..aa97afa30 100644 --- a/plat/arm/board/rdn1edge/include/platform_def.h +++ b/plat/arm/board/rdn1edge/include/platform_def.h @@ -37,8 +37,8 @@ * Physical and virtual address space limits for MMU in AARCH64 & AARCH32 modes */ #ifdef __aarch64__ -#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36) +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 43) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 43) #else #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) 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 97d563262..3d3d7e208 100644 --- a/plat/arm/css/sgi/include/sgi_base_platform_def.h +++ b/plat/arm/css/sgi/include/sgi_base_platform_def.h @@ -31,12 +31,12 @@ #if defined(IMAGE_BL31) # if ENABLE_SPM # define PLAT_ARM_MMAP_ENTRIES 9 -# define MAX_XLAT_TABLES 7 +# define MAX_XLAT_TABLES 8 # define PLAT_SP_IMAGE_MMAP_REGIONS 9 # define PLAT_SP_IMAGE_MAX_XLAT_TABLES 10 # else # define PLAT_ARM_MMAP_ENTRIES 8 -# define MAX_XLAT_TABLES 5 +# define MAX_XLAT_TABLES 7 # endif #elif defined(IMAGE_BL32) # define PLAT_ARM_MMAP_ENTRIES 8 diff --git a/plat/arm/css/sgi/sgi_plat.c b/plat/arm/css/sgi/sgi_plat.c index 97b75d403..1ab2ed5e0 100644 --- a/plat/arm/css/sgi/sgi_plat.c +++ b/plat/arm/css/sgi/sgi_plat.c @@ -55,6 +55,15 @@ const mmap_region_t plat_arm_mmap[] = { {0} }; #endif + +#define FOUR_TB ULL(0x40000000000) +//chip 1 device +#define CSS_SGI_MAP_DEVICE_CHIP1 MAP_REGION_FLAT( \ + FOUR_TB + CSS_SGI_DEVICE_BASE, \ + CSS_SGI_DEVICE_SIZE, \ + MT_DEVICE | MT_RW | MT_SECURE) + + #if IMAGE_BL31 const mmap_region_t plat_arm_mmap[] = { ARM_MAP_SHARED_RAM, @@ -64,6 +73,7 @@ const mmap_region_t plat_arm_mmap[] = { #if ENABLE_SPM ARM_SPM_BUF_EL3_MMAP, #endif + CSS_SGI_MAP_DEVICE_CHIP1, {0} }; -- cgit v1.2.3