]>
Commit | Line | Data |
---|---|---|
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 | |
14 | #include <AsmMacroIoLib.h>\r | |
2d45f194 | 15 | #include <Library/ArmLib.h>\r |
bebda7ce | 16 | \r |
17 | #include <AutoGen.h>\r | |
18 | \r | |
19 | INCLUDE AsmMacroIoLib.inc\r | |
20 | \r | |
b5a57223 | 21 | EXPORT ArmPlatformPeiBootAction\r |
bebda7ce | 22 | EXPORT ArmPlatformIsPrimaryCore\r |
d05ca26c | 23 | EXPORT ArmPlatformGetPrimaryCoreMpId\r |
2d45f194 | 24 | EXPORT ArmPlatformGetCorePosition\r |
bebda7ce | 25 | \r |
26 | IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCore\r | |
27 | IMPORT _gPcd_FixedAtBuild_PcdArmPrimaryCoreMask\r | |
28 | \r | |
29 | AREA CTA9x4Helper, CODE, READONLY\r | |
30 | \r | |
d05ca26c | 31 | //UINTN\r |
32 | //ArmPlatformGetPrimaryCoreMpId (\r | |
33 | // VOID\r | |
34 | // );\r | |
35 | ArmPlatformGetPrimaryCoreMpId FUNCTION\r | |
99267097 | 36 | LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)\r |
d05ca26c | 37 | ldr r0, [r0]\r |
38 | bx lr\r | |
39 | ENDFUNC\r | |
40 | \r | |
bebda7ce | 41 | //UINTN\r |
42 | //ArmPlatformIsPrimaryCore (\r | |
43 | // IN UINTN MpId\r | |
44 | // );\r | |
45 | ArmPlatformIsPrimaryCore FUNCTION\r | |
46 | LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)\r | |
47 | ldr r1, [r1]\r | |
48 | and r0, r0, r1\r | |
49 | LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)\r | |
50 | ldr r1, [r1]\r | |
51 | cmp r0, r1\r | |
52 | moveq r0, #1\r | |
53 | movne r0, #0\r | |
54 | bx lr\r | |
55 | ENDFUNC\r | |
56 | \r | |
2d45f194 | 57 | //UINTN\r |
58 | //ArmPlatformGetCorePosition (\r | |
59 | // IN UINTN MpId\r | |
60 | // );\r | |
61 | ArmPlatformGetCorePosition FUNCTION\r | |
62 | and r0, r0, #ARM_CORE_MASK\r | |
63 | bx lr\r | |
64 | ENDFUNC\r | |
65 | \r | |
b5a57223 | 66 | ArmPlatformPeiBootAction FUNCTION\r |
67 | bx lr\r | |
68 | ENDFUNC\r | |
69 | \r | |
bebda7ce | 70 | END\r |