[edk2-devel] [edk2-platforms][PATCH 1/1] AmpereAltraPkg: Update ArmPlatformLib to work with changed ARM_CORE_INFO

Nhi Pham via groups.io nhi=os.amperecomputing.com at groups.io
Tue Jan 17 09:53:49 UTC 2023


Hi Rebecca,

That's Ampere Altra Family specific MPIDR encoding. So, we could not 
leverage the definitions in the ArmPkg/Include/Library/ArmLib.h.

-Nhi

On 1/13/2023 9:40 PM, Rebecca Cran wrote:
> On 1/12/23 21:21, Nhi Pham via groups.io wrote:
>
>> +//
>> +// MPIDR manipulation
>> +//
>> +#define AC01_GET_MPIDR(SocketId, ClusterId, CoreId) \
>> +          (((SocketId) << 32) | ((ClusterId) << 16) | ((CoreId) << 8))
>> +#define AC01_GET_SOCKET_ID(Mpidr)  (((Mpidr) & ARM_CORE_AFF3) >> 32)
>> +#define AC01_GET_CLUSTER_ID(Mpidr) (((Mpidr) & ARM_CORE_AFF2) >> 16)
>> +#define AC01_GET_CORE_ID(Mpidr)    (((Mpidr) & ARM_CORE_AFF1) >> 8)
>> +
>
> Ideally, this should go in ArmPkg/Include/Library/ArmLib.h, but I'm 
> not sure how we should handle the older format where the the core was 
> in the first 8 bits.
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98661): https://edk2.groups.io/g/devel/message/98661
Mute This Topic: https://groups.io/mt/96240088/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list