]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ARM/VirtHelper.S
MdeModulePkg/UfsPciHcDxe: Fix EBC build error
[mirror_edk2.git] / ArmPlatformPkg / ArmVirtualizationPkg / Library / ArmVirtualizationPlatformLib / ARM / VirtHelper.S
CommitLineData
a36d531f
MC
1#\r
2# Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
3# Copyright (c) 2014, Linaro Limited. All rights reserved.\r
4#\r
5# This program and the accompanying materials\r
6# are licensed and made available under the terms and conditions of the BSD License\r
7# which accompanies this distribution. The full text of the license may be found at\r
8# http://opensource.org/licenses/bsd-license.php\r
9#\r
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12#\r
13#\r
14\r
15#include <AsmMacroIoLib.h>\r
16#include <Base.h>\r
17#include <Library/ArmLib.h>\r
18#include <Library/PcdLib.h>\r
19#include <AutoGen.h>\r
20\r
21.text\r
22.align 2\r
23\r
24GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
25GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
26GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
27GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
28GCC_ASM_EXPORT(ArmGetPhysAddrTop)\r
29\r
30GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
31GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
32GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdCoreCount)\r
33\r
34ASM_PFX(ArmPlatformPeiBootAction):\r
35 bx lr\r
36\r
37//UINTN\r
38//ArmPlatformGetPrimaryCoreMpId (\r
39// VOID\r
40// );\r
41ASM_PFX(ArmPlatformGetPrimaryCoreMpId):\r
42 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)\r
43 ldr r0, [r0]\r
44 bx lr\r
45\r
46//UINTN\r
47//ArmPlatformIsPrimaryCore (\r
48// IN UINTN MpId\r
49// );\r
50ASM_PFX(ArmPlatformIsPrimaryCore):\r
51 mov r0, #1\r
52 bx lr\r
53\r
54//UINTN\r
55//ArmPlatformGetCorePosition (\r
56// IN UINTN MpId\r
57// );\r
58// With this function: CorePos = (ClusterId * 4) + CoreId\r
59ASM_PFX(ArmPlatformGetCorePosition):\r
60 and r1, r0, #ARM_CORE_MASK\r
61 and r0, r0, #ARM_CLUSTER_MASK\r
62 add r0, r1, r0, LSR #6\r
63 bx lr\r
64\r
65//EFI_PHYSICAL_ADDRESS\r
66//GetPhysAddrTop (\r
67// VOID\r
68// );\r
69ASM_PFX(ArmGetPhysAddrTop):\r
70 mov r0, #0x00000000\r
71 mov r1, #0x10000\r
72 bx lr\r
73\r
74ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r