2 # Copyright (c) 2011-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 <AsmMacroIoLib.h>
15 #include <Library/ArmLib.h>
20 GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)
21 GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)
22 GCC_ASM_EXPORT(ArmPlatformGetCorePosition)
24 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)
25 GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)
28 //ArmPlatformGetPrimaryCoreMpId (
31 ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
32 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r0)
37 //ArmPlatformIsPrimaryCore (
40 ASM_PFX(ArmPlatformIsPrimaryCore):
41 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)
44 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)
52 //ArmPlatformGetCorePosition (
55 ASM_PFX(ArmPlatformGetCorePosition):
56 and r0, r0, #ARM_CORE_MASK
59 ASM_FUNCTION_REMOVE_IF_UNREFERENCED