]>
Commit | Line | Data |
---|---|---|
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 | 13 | \r |
a36d531f | 14 | #include <Library/ArmLib.h>\r |
a36d531f MC |
15 | #include <AutoGen.h>\r |
16 | \r | |
17 | INCLUDE AsmMacroIoLib.inc\r | |
18 | \r | |
19 | EXPORT ArmPlatformPeiBootAction\r | |
20 | EXPORT ArmPlatformIsPrimaryCore\r | |
21 | EXPORT ArmPlatformGetPrimaryCoreMpId\r | |
22 | EXPORT ArmPlatformGetCorePosition\r | |
23 | EXPORT ArmGetPhysAddrTop\r | |
24 | \r | |
6f5872b1 MC |
25 | AREA VirtHelper, CODE, READONLY\r |
26 | \r | |
a36d531f MC |
27 | ArmPlatformPeiBootAction FUNCTION\r |
28 | bx lr\r | |
29 | ENDFUNC\r | |
30 | \r | |
31 | //UINTN\r | |
32 | //ArmPlatformGetPrimaryCoreMpId (\r | |
33 | // VOID\r | |
34 | // );\r | |
35 | ArmPlatformGetPrimaryCoreMpId FUNCTION\r | |
dfc28388 | 36 | MOV32 r0, FixedPcdGet32 (PcdArmPrimaryCore)\r |
a36d531f MC |
37 | bx lr\r |
38 | ENDFUNC\r | |
39 | \r | |
40 | //UINTN\r | |
41 | //ArmPlatformIsPrimaryCore (\r | |
42 | // IN UINTN MpId\r | |
43 | // );\r | |
44 | ArmPlatformIsPrimaryCore FUNCTION\r | |
45 | mov r0, #1\r | |
46 | bx lr\r | |
47 | ENDFUNC\r | |
48 | \r | |
49 | //UINTN\r | |
50 | //ArmPlatformGetCorePosition (\r | |
51 | // IN UINTN MpId\r | |
52 | // );\r | |
53 | // With this function: CorePos = (ClusterId * 4) + CoreId\r | |
54 | ArmPlatformGetCorePosition FUNCTION\r | |
55 | and r1, r0, #ARM_CORE_MASK\r | |
56 | and r0, r0, #ARM_CLUSTER_MASK\r | |
57 | add r0, r1, r0, LSR #6\r | |
58 | bx lr\r | |
59 | ENDFUNC\r | |
60 | \r | |
61 | //EFI_PHYSICAL_ADDRESS\r | |
62 | //GetPhysAddrTop (\r | |
63 | // VOID\r | |
64 | // );\r | |
65 | ArmGetPhysAddrTop FUNCTION\r | |
66 | mov r0, #0x00000000\r | |
67 | mov r1, #0x10000\r | |
68 | bx lr\r | |
69 | ENDFUNC\r | |
70 | \r | |
71 | END\r |