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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-