]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbHelper.S
ARM Packages: Replace tabs by spaces for indentation
[mirror_edk2.git] / ArmPlatformPkg / ArmRealViewEbPkg / Library / ArmRealViewEbLibRTSM / ArmRealViewEbHelper.S
CommitLineData
bebda7ce 1//\r
b5a57223 2// Copyright (c) 2012-2013, ARM Limited. All rights reserved.\r
bebda7ce 3//\r
4// This program and the accompanying materials\r
5// are licensed and made available under the terms and conditions of the BSD License\r
6// which accompanies this distribution. The full text of the license may be found at\r
7// http://opensource.org/licenses/bsd-license.php\r
8//\r
9// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11//\r
12//\r
13\r
14#include <AsmMacroIoLib.h>\r
15#include <Library/ArmLib.h>\r
16\r
3402aac7 17.text\r
b5a57223 18.align 2\r
bebda7ce 19\r
b5a57223 20GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
bebda7ce 21GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
22GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
23\r
24GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
25GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
26\r
27//UINTN\r
28//ArmPlatformGetCorePosition (\r
29// IN UINTN MpId\r
30// );\r
31ASM_PFX(ArmPlatformGetCorePosition):\r
91c38d4e
RC
32 and r1, r0, #ARM_CORE_MASK\r
33 and r0, r0, #ARM_CLUSTER_MASK\r
34 add r0, r1, r0, LSR #7\r
35 bx lr\r
bebda7ce 36\r
37//UINTN\r
38//ArmPlatformIsPrimaryCore (\r
39// IN UINTN MpId\r
40// );\r
41ASM_PFX(ArmPlatformIsPrimaryCore):\r
42 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)\r
43 ldr r1, [r1]\r
44 and r0, r0, r1\r
45 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)\r
46 ldr r1, [r1]\r
47 cmp r0, r1\r
48 moveq r0, #1\r
49 movne r0, #0\r
50 bx lr\r
b5a57223 51\r
52ASM_PFX(ArmPlatformPeiBootAction):\r
53 bx lr\r