From e359565ec271d7a3fc863293e9f1f607c938f0ce Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Sun, 12 May 2013 23:56:35 +0000 Subject: ArmPkg/BdsLinuxFdt.c: Fix creation of 'cpu' and 'psci' device tree nodes. * Fix name of 'device_type' and 'migrate' properties. * Fix 'reg' property. It is supposed to contain the CPU MPIDR of the CPU being described. * Fix byte ordering of data in 'psci' node. * Fix some problems regarding the size of data. In a number of places it was assumed data would be 32-bits wide. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14351 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Include/Library/ArmLib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ArmPkg/Include') diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 75f7755362..5663844b1f 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -116,6 +116,7 @@ typedef enum { #define ARM_CLUSTER_MASK (0xFF << 8) #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)) // Get the position of the core for the Stack Offset (4 Core per Cluster) // Position = (ClusterId * 4) + CoreId #define GET_CORE_POS(MpId) ((((MpId) & ARM_CLUSTER_MASK) >> 6) + ((MpId) & ARM_CORE_MASK)) -- cgit v1.2.3