]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ARM/VirtHelper.asm
MdeModulePkg/UfsPciHcDxe: Fix EBC build error
[mirror_edk2.git] / ArmPlatformPkg / ArmVirtualizationPkg / Library / ArmVirtualizationPlatformLib / ARM / VirtHelper.asm
CommitLineData
6f5872b1
MC
1//\r
2// Copyright (c) 2011-2014, 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
a36d531f
MC
13\r
14#include <AsmMacroIoLib.h>\r
15#include <Base.h>\r
16#include <Library/ArmLib.h>\r
17#include <Library/PcdLib.h>\r
18#include <AutoGen.h>\r
19\r
20 INCLUDE AsmMacroIoLib.inc\r
21\r
22 EXPORT ArmPlatformPeiBootAction\r
23 EXPORT ArmPlatformIsPrimaryCore\r
24 EXPORT ArmPlatformGetPrimaryCoreMpId\r
25 EXPORT ArmPlatformGetCorePosition\r
26 EXPORT ArmGetPhysAddrTop\r
27\r
28 IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore\r
29 IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask\r
30 IMPORT _gPcd_FixedAtBuild_PcdCoreCount\r
31\r
6f5872b1
MC
32 AREA VirtHelper, CODE, READONLY\r
33\r
a36d531f
MC
34ArmPlatformPeiBootAction FUNCTION\r
35 bx lr\r
36 ENDFUNC\r
37\r
38//UINTN\r
39//ArmPlatformGetPrimaryCoreMpId (\r
40// VOID\r
41// );\r
42ArmPlatformGetPrimaryCoreMpId FUNCTION\r
43 LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)\r
44 ldr r0, [r0]\r
45 bx lr\r
46 ENDFUNC\r
47\r
48//UINTN\r
49//ArmPlatformIsPrimaryCore (\r
50// IN UINTN MpId\r
51// );\r
52ArmPlatformIsPrimaryCore FUNCTION\r
53 mov r0, #1\r
54 bx lr\r
55 ENDFUNC\r
56\r
57//UINTN\r
58//ArmPlatformGetCorePosition (\r
59// IN UINTN MpId\r
60// );\r
61// With this function: CorePos = (ClusterId * 4) + CoreId\r
62ArmPlatformGetCorePosition FUNCTION\r
63 and r1, r0, #ARM_CORE_MASK\r
64 and r0, r0, #ARM_CLUSTER_MASK\r
65 add r0, r1, r0, LSR #6\r
66 bx lr\r
67 ENDFUNC\r
68\r
69//EFI_PHYSICAL_ADDRESS\r
70//GetPhysAddrTop (\r
71// VOID\r
72// );\r
73ArmGetPhysAddrTop FUNCTION\r
74 mov r0, #0x00000000\r
75 mov r1, #0x10000\r
76 bx lr\r
77 ENDFUNC\r
78\r
79 END\r