diff options
author | Summer Qin <summer.qin@arm.com> | 2017-02-28 16:46:17 +0000 |
---|---|---|
committer | Summer Qin <summer.qin@arm.com> | 2017-03-27 14:53:43 +0100 |
commit | d8d6cf247b1b5691d23e50c16377c0e2248cdd97 (patch) | |
tree | 0f205399d29d296d50de33b95ef4e3c45cc951e0 /include | |
parent | d6845d3dc3030335e9c13cf37f9ba1333a776629 (diff) |
ARM platforms: Add support for MT bit in MPIDR
This patch modifies some of the functions in ARM platform layer to cater
for the case when multi-threading `MT` is set in MPIDR. A new build flag
`ARM_PLAT_MT` is added, and when enabled, the functions accessing MPIDR
now assume that the `MT` bit is set for the platform and access the bit
fields accordingly.
Also, a new API plat_arm_get_cpu_pe_count is added when `ARM_PLAT_MT` is
enabled, returning the PE count within the physical cpu corresponding to
`mpidr`.
Change-Id: I04ccf212ac3054a60882761f4087bae299af13cb
Signed-off-by: Summer Qin <summer.qin@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/aarch32/arch.h | 1 | ||||
-rw-r--r-- | include/lib/aarch64/arch.h | 1 | ||||
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 6 |
3 files changed, 7 insertions, 1 deletions
diff --git a/include/lib/aarch32/arch.h b/include/lib/aarch32/arch.h index 8525c7ba..14212d5d 100644 --- a/include/lib/aarch32/arch.h +++ b/include/lib/aarch32/arch.h @@ -46,6 +46,7 @@ /******************************************************************************* * MPIDR macros ******************************************************************************/ +#define MPIDR_MT_MASK (1 << 24) #define MPIDR_CPU_MASK MPIDR_AFFLVL_MASK #define MPIDR_CLUSTER_MASK (MPIDR_AFFLVL_MASK << MPIDR_AFFINITY_BITS) #define MPIDR_AFFINITY_BITS 8 diff --git a/include/lib/aarch64/arch.h b/include/lib/aarch64/arch.h index 5876ce81..a854e961 100644 --- a/include/lib/aarch64/arch.h +++ b/include/lib/aarch64/arch.h @@ -49,6 +49,7 @@ /******************************************************************************* * MPIDR macros ******************************************************************************/ +#define MPIDR_MT_MASK (1 << 24) #define MPIDR_CPU_MASK MPIDR_AFFLVL_MASK #define MPIDR_CLUSTER_MASK MPIDR_AFFLVL_MASK << MPIDR_AFFINITY_BITS #define MPIDR_AFFINITY_BITS 8 diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index e878f9eb..ccdfd41a 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -203,6 +203,10 @@ void plat_arm_interconnect_init(void); void plat_arm_interconnect_enter_coherency(void); void plat_arm_interconnect_exit_coherency(void); +#if ARM_PLAT_MT +unsigned int plat_arm_get_cpu_pe_count(u_register_t mpidr); +#endif + #if LOAD_IMAGE_V2 /* * This function is called after loading SCP_BL2 image and it is used to perform |