]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Library/ArmPlatformLibNull/Arm/ArmPlatformHelper.S
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPlatformPkg / Library / ArmPlatformLibNull / Arm / ArmPlatformHelper.S
CommitLineData
e7072e04 1//\r
b5a57223 2// Copyright (c) 2012-2013, ARM Limited. All rights reserved.\r
e7072e04 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
bebda7ce 14#include <AsmMacroIoLib.h>\r
e7072e04 15#include <Library/ArmLib.h>\r
16\r
3402aac7 17.text\r
b5a57223 18.align 2\r
e7072e04 19\r
b5a57223 20GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
e7072e04 21GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
d05ca26c 22GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
bebda7ce 23GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
24\r
25GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
26GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
e7072e04 27\r
b5a57223 28ASM_PFX(ArmPlatformPeiBootAction):\r
29 bx lr\r
30\r
e7072e04 31//UINTN\r
32//ArmPlatformGetCorePosition (\r
33// IN UINTN MpId\r
34// );\r
35ASM_PFX(ArmPlatformGetCorePosition):\r
36 and r1, r0, #ARM_CORE_MASK\r
37 and r0, r0, #ARM_CLUSTER_MASK\r
38 add r0, r1, r0, LSR #7\r
39 bx lr\r
40\r
d05ca26c 41//UINTN\r
42//ArmPlatformGetPrimaryCoreMpId (\r
43// VOID\r
44// );\r
45ASM_PFX(ArmPlatformGetPrimaryCoreMpId):\r
99267097 46 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)\r
d05ca26c 47 ldr r0, [r0]\r
48 bx lr\r
bebda7ce 49\r
50//UINTN\r
51//ArmPlatformIsPrimaryCore (\r
52// IN UINTN MpId\r
53// );\r
54ASM_PFX(ArmPlatformIsPrimaryCore):\r
55 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)\r
56 ldr r1, [r1]\r
57 and r0, r0, r1\r
58 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)\r
59 ldr r1, [r1]\r
60 cmp r0, r1\r
61 moveq r0, #1\r
62 movne r0, #0\r
63 bx lr\r