summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-26 10:47:15 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-03-26 10:47:15 +0000
commit69f60552de28634d7b46b726e02a4ee7ea79ca2d (patch)
tree1ca4acffc510940a2b21358e24fa5ad0f7947e2f /ArmPkg
parentbe613c8b2cae701a0449c21e1c9df28a04daacbf (diff)
downloadedk2-69f60552de28634d7b46b726e02a4ee7ea79ca2d.tar.gz
edk2-69f60552de28634d7b46b726e02a4ee7ea79ca2d.tar.bz2
edk2-69f60552de28634d7b46b726e02a4ee7ea79ca2d.zip
ArmPkg/ArmLib.h: Fixed the ClusterId and CoreId masks
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13124 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Include/Library/ArmLib.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h
index c8f0d94cad..3a3991c231 100644
--- a/ArmPkg/Include/Library/ArmLib.h
+++ b/ArmPkg/Include/Library/ArmLib.h
@@ -82,12 +82,12 @@ typedef enum {
} ARM_PROCESSOR_MODE;
#define IS_PRIMARY_CORE(MpId) (((MpId) & PcdGet32(PcdArmPrimaryCoreMask)) == PcdGet32(PcdArmPrimaryCore))
-#define GET_CORE_ID(MpId) ((MpId) & 0x3)
-#define GET_CLUSTER_ID(MpId) (((MpId) >> 8) & 0x3C)
+#define GET_CORE_ID(MpId) ((MpId) & 0xFF)
+#define GET_CLUSTER_ID(MpId) (((MpId) >> 8) & 0xFF)
// Get the position of the core for the Stack Offset (4 Core per Cluster)
// Position = (ClusterId * 4) + CoreId
-#define GET_CORE_POS(MpId) ((((MpId) >> 6) & 0x3C) + ((MpId) & 0x3))
-#define PRIMARY_CORE_ID (PcdGet32(PcdArmPrimaryCore) & 0x3)
+#define GET_CORE_POS(MpId) ((((MpId) >> 6) & 0xFF) + ((MpId) & 0xFF))
+#define PRIMARY_CORE_ID (PcdGet32(PcdArmPrimaryCore) & 0xFF)
ARM_CACHE_TYPE
EFIAPI