2 // Copyright (c) 2012-2013, ARM Limited. All rights reserved.
4 // SPDX-License-Identifier: BSD-2-Clause-Patent
8 #include <AsmMacroIoLibV8.h>
9 #include <Library/ArmLib.h>
11 ASM_FUNC(ArmPlatformPeiBootAction)
15 //ArmPlatformGetCorePosition (
18 // With this function: CorePos = (ClusterId * 4) + CoreId
19 ASM_FUNC(ArmPlatformGetCorePosition)
20 and x1, x0, #ARM_CORE_MASK
21 and x0, x0, #ARM_CLUSTER_MASK
22 add x0, x1, x0, LSR #6
26 //ArmPlatformGetPrimaryCoreMpId (
29 ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
30 MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))
34 //ArmPlatformIsPrimaryCore (
37 ASM_FUNC(ArmPlatformIsPrimaryCore)
38 MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
40 MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))