diff options
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r-- | ArmPkg/Include/Library/ArmLib.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 468e663989..89d915a8df 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -73,6 +73,14 @@ typedef enum { ARM_PROCESSOR_MODE_MASK = 0x1F } 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) >> 6) & 0x3C) +// 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) + ARM_CACHE_TYPE EFIAPI ArmCacheType ( |