mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 23:35:10 +00:00
feat(plat): add platform API that gets cluster ID
This patch adds an API(plat_cluster_id_by_mpidr) that retrieves the cluster ID by looking at the MPIDR_EL1 for platforms that have ARM_PLAT_MT set Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I0266f2e49a3114d169a7708d7ddbd4f6229a7a41
This commit is contained in:
parent
bbbc32c904
commit
e6ae019a84
2 changed files with 10 additions and 0 deletions
|
@ -383,6 +383,8 @@ int arm_get_rotpk_info_dev(void **key_ptr, unsigned int *key_len,
|
|||
unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr);
|
||||
#endif
|
||||
|
||||
unsigned int plat_cluster_id_by_mpidr(u_register_t mpidr);
|
||||
|
||||
/*
|
||||
* This function is called after loading SCP_BL2 image and it is used to perform
|
||||
* any platform-specific actions required to handle the SCP firmware.
|
||||
|
|
|
@ -65,3 +65,11 @@ unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr)
|
|||
return PLAT_MAX_PE_PER_CPU;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* Return the cluster ID of current CPU
|
||||
*****************************************************************************/
|
||||
unsigned int plat_cluster_id_by_mpidr(u_register_t mpidr)
|
||||
{
|
||||
return MPIDR_AFFLVL2_VAL(mpidr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue