mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
plat/arm/sgi: add chip_id and multi_chip_mode to platform variant info
Multi-chip platforms have two or more identical chips connected using a high speed coherent link. In order to identify such platforms, add chip_id and multi_chip_mode information in the platform variant info structure. The values of these two new elements is populated during boot. Change-Id: Ie6e89cb33b3f0f408814f6239cd06647053e23ed Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
This commit is contained in:
parent
c7d4a2178b
commit
6daeec7094
6 changed files with 27 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -29,6 +29,10 @@
|
|||
#define SID_REG_BASE 0x2a4a0000
|
||||
#define SID_SYSTEM_ID_OFFSET 0x40
|
||||
#define SID_SYSTEM_CFG_OFFSET 0x70
|
||||
#define SID_NODE_ID_OFFSET 0x60
|
||||
#define SID_CHIP_ID_MASK 0xFF
|
||||
#define SID_MULTI_CHIP_MODE_MASK 0x100
|
||||
#define SID_MULTI_CHIP_MODE_SHIFT 8
|
||||
|
||||
/* The slave_bootsecure controls access to GPU, DMC and CS. */
|
||||
#define CSS_NIC400_SLAVE_BOOTSECURE 8
|
||||
|
|
|
@ -18,6 +18,11 @@ unsigned int plat_arm_sgi_get_config_id(void)
|
|||
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
|
||||
}
|
||||
|
||||
unsigned int plat_arm_sgi_get_multi_chip_mode(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
{
|
||||
sgi_bl31_common_platform_setup();
|
||||
|
|
|
@ -18,6 +18,12 @@ unsigned int plat_arm_sgi_get_config_id(void)
|
|||
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
|
||||
}
|
||||
|
||||
unsigned int plat_arm_sgi_get_multi_chip_mode(void)
|
||||
{
|
||||
return (mmio_read_32(SID_REG_BASE + SID_NODE_ID_OFFSET) &
|
||||
SID_MULTI_CHIP_MODE_MASK) >> SID_MULTI_CHIP_MODE_SHIFT;
|
||||
}
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
{
|
||||
sgi_bl31_common_platform_setup();
|
||||
|
|
|
@ -19,6 +19,11 @@ unsigned int plat_arm_sgi_get_config_id(void)
|
|||
& SSC_VERSION_CONFIG_MASK;
|
||||
}
|
||||
|
||||
unsigned int plat_arm_sgi_get_multi_chip_mode(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void bl31_platform_setup(void)
|
||||
{
|
||||
sgi_bl31_common_platform_setup();
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
typedef struct sgi_platform_info {
|
||||
unsigned int platform_id; /* Part Number of the platform */
|
||||
unsigned int config_id; /* Config Id of the platform */
|
||||
unsigned int chip_id; /* Chip Id or Node number */
|
||||
unsigned int multi_chip_mode; /* Multi-chip mode availability */
|
||||
} sgi_platform_info_t;
|
||||
|
||||
extern sgi_platform_info_t sgi_plat_info;
|
||||
|
@ -28,4 +30,7 @@ unsigned int plat_arm_sgi_get_platform_id(void);
|
|||
/* returns the configuration id of the platform */
|
||||
unsigned int plat_arm_sgi_get_config_id(void);
|
||||
|
||||
/* returns true if operating in multi-chip configuration */
|
||||
unsigned int plat_arm_sgi_get_multi_chip_mode(void);
|
||||
|
||||
#endif /* SGI_VARIANT_H */
|
||||
|
|
|
@ -51,6 +51,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
{
|
||||
sgi_plat_info.platform_id = plat_arm_sgi_get_platform_id();
|
||||
sgi_plat_info.config_id = plat_arm_sgi_get_config_id();
|
||||
sgi_plat_info.multi_chip_mode = plat_arm_sgi_get_multi_chip_mode();
|
||||
|
||||
arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue