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