#define MPIDR_U_BIT_MASK 0x40000000\r
\r
typedef struct {\r
- UINT32 ClusterId;\r
- UINT32 CoreId;\r
+ UINT64 Mpidr;\r
\r
// MP Core Mailbox\r
EFI_PHYSICAL_ADDRESS MailboxSetAddress;\r
#define GET_CORE_ID(MpId) ((MpId) & ARM_CORE_MASK)\r
#define GET_CLUSTER_ID(MpId) (((MpId) & ARM_CLUSTER_MASK) >> 8)\r
#define GET_MPID(ClusterId, CoreId) (((ClusterId) << 8) | (CoreId))\r
+#define GET_MPIDR_AFF0(MpId) ((MpId) & ARM_CORE_AFF0)\r
+#define GET_MPIDR_AFF1(MpId) (((MpId) & ARM_CORE_AFF1) >> 8)\r
+#define GET_MPIDR_AFF2(MpId) (((MpId) & ARM_CORE_AFF2) >> 16)\r
+#define GET_MPIDR_AFF3(MpId) (((MpId) & ARM_CORE_AFF3) >> 32)\r
#define PRIMARY_CORE_ID (PcdGet32(PcdArmPrimaryCore) & ARM_CORE_MASK)\r
\r
/** Reads the CCSIDR register for the specified cache.\r
ARM_CORE_INFO mArmPlatformNullMpCoreInfoTable[] = {\r
{\r
// Cluster 0, Core 0\r
- 0x0, 0x0,\r
+ 0x0,\r
\r
// MP Core MailBox Set/Get/Clear Addresses and Clear Value\r
(EFI_PHYSICAL_ADDRESS)0,\r
},\r
{\r
// Cluster 0, Core 1\r
- 0x0, 0x1,\r
+ 0x1,\r
\r
// MP Core MailBox Set/Get/Clear Addresses and Clear Value\r
(EFI_PHYSICAL_ADDRESS)0,\r
},\r
{\r
// Cluster 0, Core 2\r
- 0x0, 0x2,\r
+ 0x2,\r
\r
// MP Core MailBox Set/Get/Clear Addresses and Clear Value\r
(EFI_PHYSICAL_ADDRESS)0,\r
},\r
{\r
// Cluster 0, Core 3\r
- 0x0, 0x3,\r
+ 0x3,\r
\r
// MP Core MailBox Set/Get/Clear Addresses and Clear Value\r
(EFI_PHYSICAL_ADDRESS)0,\r
\r
// Find the core in the ArmCoreTable\r
for (Index = 0; Index < ArmCoreCount; Index++) {\r
- if ((ArmCoreInfoTable[Index].ClusterId == ClusterId) && (ArmCoreInfoTable[Index].CoreId == CoreId)) {\r
+ if ((GET_MPIDR_AFF1 (ArmCoreInfoTable[Index].Mpidr) == ClusterId) &&\r
+ (GET_MPIDR_AFF0 (ArmCoreInfoTable[Index].Mpidr) == CoreId))\r
+ {\r
break;\r
}\r
}\r
\r
// Find the core in the ArmCoreTable\r
for (Index = 0; Index < ArmCoreCount; Index++) {\r
- if ((ArmCoreInfoTable[Index].ClusterId == ClusterId) && (ArmCoreInfoTable[Index].CoreId == CoreId)) {\r
+ if ((GET_MPIDR_AFF1 (ArmCoreInfoTable[Index].Mpidr) == ClusterId) &&\r
+ (GET_MPIDR_AFF0 (ArmCoreInfoTable[Index].Mpidr) == CoreId))\r
+ {\r
break;\r
}\r
}\r