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.
-- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98482): https://edk2.groups.io/g/devel/message/98482 Mute This Topic: https://groups.io/mt/96240088/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-