Commit d306eb80 authored by Thomas Abraham's avatar Thomas Abraham
Browse files

plat/sgi: improve macros defining cper buffer memory region



Remove the 'ARM_' prefix from the macros defining the CPER buffer memory
and replace it with 'CSS_SGI_' prefix. These macros are applicable only
for platforms supported within plat/sgi. In addition to this, ensure
that these macros are defined only if the RAS_EXTENSION build option is
enabled.
Signed-off-by: default avatarThomas Abraham <thomas.abraham@arm.com>
Change-Id: I44df42cded18d9d3a4cb13e5c990e9ab3194daee
parent 513ba5c9
...@@ -165,28 +165,36 @@ ...@@ -165,28 +165,36 @@
#define PLAT_SP_PRI PLAT_RAS_PRI #define PLAT_SP_PRI PLAT_RAS_PRI
#if RAS_EXTENSION #if SPM_MM && RAS_EXTENSION
/* Allocate 128KB for CPER buffers */ /*
#define PLAT_SP_BUF_BASE ULL(0x20000) * CPER buffer memory of 128KB is reserved and it is placed adjacent to the
* memory shared between EL3 and S-EL0.
#define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ */
PLAT_SP_IMAGE_NS_BUF_SIZE + \ #define CSS_SGI_SP_CPER_BUF_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \
PLAT_SP_BUF_BASE) PLAT_SP_IMAGE_NS_BUF_SIZE)
#define CSS_SGI_SP_CPER_BUF_SIZE ULL(0x20000)
#define ARM_SP_CPER_BUF_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ #define CSS_SGI_SP_CPER_BUF_MMAP MAP_REGION2( \
PLAT_SP_IMAGE_NS_BUF_SIZE) CSS_SGI_SP_CPER_BUF_BASE, \
#define ARM_SP_CPER_BUF_SIZE ULL(0x20000) CSS_SGI_SP_CPER_BUF_BASE, \
#define ARM_SP_CPER_BUF_MMAP MAP_REGION2( \ CSS_SGI_SP_CPER_BUF_SIZE, \
ARM_SP_CPER_BUF_BASE, \ MT_RW_DATA | MT_NS | MT_USER, \
ARM_SP_CPER_BUF_BASE, \
ARM_SP_CPER_BUF_SIZE, \
MT_RW_DATA | MT_NS | MT_USER, \
PAGE_SIZE) PAGE_SIZE)
#else /*
* Secure partition stack follows right after the memory space reserved for
* CPER buffer memory.
*/
#define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \
PLAT_SP_IMAGE_NS_BUF_SIZE + \
CSS_SGI_SP_CPER_BUF_SIZE)
#elif SPM_MM
/*
* Secure partition stack follows right after the memory region that is shared
* between EL3 and S-EL0.
*/
#define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \
PLAT_SP_IMAGE_NS_BUF_SIZE) PLAT_SP_IMAGE_NS_BUF_SIZE)
#endif /* RAS_EXTENSION */ #endif /* SPM_MM && RAS_EXTENSION */
/* Platform ID address */ /* Platform ID address */
#define SSC_VERSION (SSC_REG_BASE + SSC_VERSION_OFFSET) #define SSC_VERSION (SSC_REG_BASE + SSC_VERSION_OFFSET)
......
/* /*
* Copyright (c) 2018-2020, Arm Limited and Contributors. All rights reserved. * Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -81,7 +81,9 @@ const mmap_region_t plat_arm_secure_partition_mmap[] = { ...@@ -81,7 +81,9 @@ const mmap_region_t plat_arm_secure_partition_mmap[] = {
PLAT_ARM_SECURE_MAP_DEVICE, PLAT_ARM_SECURE_MAP_DEVICE,
ARM_SP_IMAGE_MMAP, ARM_SP_IMAGE_MMAP,
ARM_SP_IMAGE_NS_BUF_MMAP, ARM_SP_IMAGE_NS_BUF_MMAP,
ARM_SP_CPER_BUF_MMAP, #if RAS_EXTENSION
CSS_SGI_SP_CPER_BUF_MMAP,
#endif
ARM_SP_IMAGE_RW_MMAP, ARM_SP_IMAGE_RW_MMAP,
ARM_SPM_BUF_EL0_MMAP, ARM_SPM_BUF_EL0_MMAP,
{0} {0}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment