Revision: 16871
          http://sourceforge.net/p/edk2/code/16871
Author:   oliviermartin
Date:     2015-02-16 10:19:52 +0000 (Mon, 16 Feb 2015)
Log Message:
-----------
ArmPkg/ArmLib.h: Add CPU Affinity definitions

The CPU affinity fields are defined by MPIDR/MPIDR_EL1.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Include/Library/ArmLib.h

Modified: trunk/edk2/ArmPkg/Include/Library/ArmLib.h
===================================================================
--- trunk/edk2/ArmPkg/Include/Library/ArmLib.h  2015-02-15 05:01:59 UTC (rev 
16870)
+++ trunk/edk2/ArmPkg/Include/Library/ArmLib.h  2015-02-16 10:19:52 UTC (rev 
16871)
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-  Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
+  Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -118,8 +118,13 @@
 //
 // ARM MP Core IDs
 //
-#define ARM_CORE_MASK         0xFF
-#define ARM_CLUSTER_MASK      (0xFF << 8)
+#define ARM_CORE_AFF0         0xFF
+#define ARM_CORE_AFF1         (0xFF << 8)
+#define ARM_CORE_AFF2         (0xFF << 16)
+#define ARM_CORE_AFF3         (0xFFULL << 32)
+
+#define ARM_CORE_MASK         ARM_CORE_AFF0
+#define ARM_CLUSTER_MASK      ARM_CORE_AFF1
 #define GET_CORE_ID(MpId)     ((MpId) & ARM_CORE_MASK)
 #define GET_CLUSTER_ID(MpId)  (((MpId) & ARM_CLUSTER_MASK) >> 8)
 #define GET_MPID(ClusterId, CoreId)   (((ClusterId) << 8) | (CoreId))


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to