From 90ed18ca87ef876848d479ac1c314af15169b712 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Mon, 16 Feb 2015 10:19:52 +0000 Subject: 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 Tested-by: Ard Biesheuvel Reviewed-by: Ard Biesheuvel git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16871 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Include/Library/ArmLib.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 526b06a5ca..9effb3eea9 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -1,7 +1,7 @@ /** @file Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2015, ARM Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -118,8 +118,13 @@ typedef enum { // // 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)) -- cgit v1.2.3