mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-30 07:39:24 +00:00
refactor(neoverse-rd): refactor mmap macro for RoS device memory region
There are two macros that define ROS device memory map range and attributes - one for local chip and the other for remote chip. Refactor these two macros into a single macro that uses the chip ID to identify the local or the remote chip. Signed-off-by: Rohit Mathew <rohit.mathew@arm.com> Change-Id: Iceb87f5fc319efa37105d66bb1c88b622a2bb366
This commit is contained in:
parent
3917f05734
commit
d72c8d0f86
4 changed files with 9 additions and 15 deletions
|
@ -18,13 +18,7 @@
|
|||
* MMU mapping
|
||||
******************************************************************************/
|
||||
|
||||
#define PLAT_ARM_SECURE_MAP_DEVICE \
|
||||
MAP_REGION_FLAT( \
|
||||
SOC_CSS_DEVICE_BASE, \
|
||||
SOC_CSS_DEVICE_SIZE, \
|
||||
MT_DEVICE | MT_RW | MT_SECURE | MT_USER)
|
||||
|
||||
#define SOC_CSS_MAP_DEVICE_REMOTE_CHIP(n) \
|
||||
#define PLAT_ARM_SECURE_MAP_DEVICE(n) \
|
||||
MAP_REGION_FLAT( \
|
||||
NRD_REMOTE_CHIP_MEM_OFFSET(n) + \
|
||||
SOC_CSS_DEVICE_BASE, \
|
||||
|
|
|
@ -33,7 +33,7 @@ const mmap_region_t plat_arm_mmap[] = {
|
|||
ARM_MAP_SHARED_RAM,
|
||||
NRD_MAP_FLASH0_RO,
|
||||
NRD_MAP_DEVICE(0),
|
||||
SOC_CSS_MAP_DEVICE,
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(0),
|
||||
{0}
|
||||
};
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ const mmap_region_t plat_arm_mmap[] = {
|
|||
ARM_V2M_MAP_MEM_PROTECT,
|
||||
#endif
|
||||
NRD_MAP_DEVICE(0),
|
||||
SOC_CSS_MAP_DEVICE,
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(0),
|
||||
ARM_MAP_NS_DRAM1,
|
||||
#if NRD_CHIP_COUNT > 1
|
||||
NRD_MAP_DEVICE(1),
|
||||
|
@ -76,7 +76,7 @@ const mmap_region_t plat_arm_mmap[] = {
|
|||
#ifdef PLAT_ARM_MEM_PROT_ADDR
|
||||
ARM_V2M_MAP_MEM_PROTECT,
|
||||
#endif
|
||||
SOC_CSS_MAP_DEVICE,
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(0),
|
||||
#if SPM_MM
|
||||
ARM_SPM_BUF_EL3_MMAP,
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ const mmap_region_t plat_arm_secure_partition_mmap[] = {
|
|||
PLAT_ARM_SECURE_MAP_SYSTEMREG,
|
||||
PLAT_ARM_SECURE_MAP_NOR2,
|
||||
SOC_PLATFORM_SECURE_UART,
|
||||
PLAT_ARM_SECURE_MAP_DEVICE,
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(0),
|
||||
ARM_SP_IMAGE_MMAP,
|
||||
ARM_SP_IMAGE_NS_BUF_MMAP,
|
||||
ARM_SP_IMAGE_RW_MMAP,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
static const mmap_region_t rdn1edge_dynamic_mmap[] = {
|
||||
ARM_MAP_SHARED_RAM_REMOTE_CHIP(1),
|
||||
NRD_MAP_DEVICE(1),
|
||||
SOC_CSS_MAP_DEVICE_REMOTE_CHIP(1)
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(1)
|
||||
};
|
||||
|
||||
static struct gic600_multichip_data rdn1e1_multichip_data __init = {
|
||||
|
|
|
@ -15,16 +15,16 @@
|
|||
static const mmap_region_t rdv1mc_dynamic_mmap[] = {
|
||||
ARM_MAP_SHARED_RAM_REMOTE_CHIP(1),
|
||||
NRD_MAP_DEVICE(1),
|
||||
SOC_CSS_MAP_DEVICE_REMOTE_CHIP(1),
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(1),
|
||||
#if (NRD_CHIP_COUNT > 2)
|
||||
ARM_MAP_SHARED_RAM_REMOTE_CHIP(2),
|
||||
NRD_MAP_DEVICE(2),
|
||||
SOC_CSS_MAP_DEVICE_REMOTE_CHIP(2),
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(2),
|
||||
#endif
|
||||
#if (NRD_CHIP_COUNT > 3)
|
||||
ARM_MAP_SHARED_RAM_REMOTE_CHIP(3),
|
||||
NRD_MAP_DEVICE(3),
|
||||
SOC_CSS_MAP_DEVICE_REMOTE_CHIP(3)
|
||||
PLAT_ARM_SECURE_MAP_DEVICE(3)
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue