]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm
ArmPlatformPkg RVCT: drop dependency on GCC macro library
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibCTA9x4 / CTA9x4Helper.asm
... / ...
CommitLineData
1//\r
2// Copyright (c) 2013, ARM Limited. All rights reserved.\r
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 <Library/ArmLib.h>\r
15\r
16#include <AutoGen.h>\r
17\r
18 INCLUDE AsmMacroIoLib.inc\r
19\r
20 EXPORT ArmPlatformPeiBootAction\r
21 EXPORT ArmPlatformIsPrimaryCore\r
22 EXPORT ArmPlatformGetPrimaryCoreMpId\r
23 EXPORT ArmPlatformGetCorePosition\r
24\r
25 AREA CTA9x4Helper, CODE, READONLY\r
26\r
27//UINTN\r
28//ArmPlatformGetPrimaryCoreMpId (\r
29// VOID\r
30// );\r
31ArmPlatformGetPrimaryCoreMpId FUNCTION\r
32 mov32 r0, FixedPcdGet32(PcdArmPrimaryCore)\r
33 bx lr\r
34 ENDFUNC\r
35\r
36//UINTN\r
37//ArmPlatformIsPrimaryCore (\r
38// IN UINTN MpId\r
39// );\r
40ArmPlatformIsPrimaryCore FUNCTION\r
41 mov32 r1, FixedPcdGet32(PcdArmPrimaryCoreMask)\r
42 and r0, r0, r1\r
43 mov32 r1, FixedPcdGet32(PcdArmPrimaryCore)\r
44 cmp r0, r1\r
45 moveq r0, #1\r
46 movne r0, #0\r
47 bx lr\r
48 ENDFUNC\r
49\r
50//UINTN\r
51//ArmPlatformGetCorePosition (\r
52// IN UINTN MpId\r
53// );\r
54ArmPlatformGetCorePosition FUNCTION\r
55 and r0, r0, #ARM_CORE_MASK\r
56 bx lr\r
57 ENDFUNC\r
58\r
59ArmPlatformPeiBootAction FUNCTION\r
60 bx lr\r
61 ENDFUNC\r
62\r
63 END\r