2 // Copyright (c) 2012-2013, ARM Limited. All rights reserved.
4 // This program and the accompanying materials
5 // are licensed and made available under the terms and conditions of the BSD License
6 // which accompanies this distribution. The full text of the license may be found at
7 // http://opensource.org/licenses/bsd-license.php
9 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #include <AsmMacroIoLibV8.h>
15 #include <Library/ArmLib.h>
17 ASM_FUNC(ArmPlatformPeiBootAction)
21 //ArmPlatformGetCorePosition (
24 // With this function: CorePos = (ClusterId * 4) + CoreId
25 ASM_FUNC(ArmPlatformGetCorePosition)
26 and x1, x0, #ARM_CORE_MASK
27 and x0, x0, #ARM_CLUSTER_MASK
28 add x0, x1, x0, LSR #6
32 //ArmPlatformGetPrimaryCoreMpId (
35 ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)
36 MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))
40 //ArmPlatformIsPrimaryCore (
43 ASM_FUNC(ArmPlatformIsPrimaryCore)
44 MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))
46 MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))