• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2//  Copyright (c) 2013, ARM Limited. All rights reserved.
3//
4//  This program and the accompanying materials
5//  are licensed and made available under the terms and conditions of the BSD License
6//  which accompanies this distribution.  The full text of the license may be found at
7//  http://opensource.org/licenses/bsd-license.php
8//
9//  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10//  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11//
12//
13
14#include <Library/ArmLib.h>
15
16#include <AutoGen.h>
17
18  INCLUDE AsmMacroIoLib.inc
19
20  EXPORT  ArmPlatformPeiBootAction
21  EXPORT  ArmPlatformIsPrimaryCore
22  EXPORT  ArmPlatformGetPrimaryCoreMpId
23  EXPORT  ArmPlatformGetCorePosition
24
25  AREA CTA9x4Helper, CODE, READONLY
26
27//UINTN
28//ArmPlatformGetPrimaryCoreMpId (
29//  VOID
30//  );
31ArmPlatformGetPrimaryCoreMpId FUNCTION
32  mov32 r0, FixedPcdGet32(PcdArmPrimaryCore)
33  bx      lr
34  ENDFUNC
35
36//UINTN
37//ArmPlatformIsPrimaryCore (
38//  IN UINTN MpId
39//  );
40ArmPlatformIsPrimaryCore FUNCTION
41  mov32 r1, FixedPcdGet32(PcdArmPrimaryCoreMask)
42  and   r0, r0, r1
43  mov32 r1, FixedPcdGet32(PcdArmPrimaryCore)
44  cmp   r0, r1
45  moveq r0, #1
46  movne r0, #0
47  bx    lr
48  ENDFUNC
49
50//UINTN
51//ArmPlatformGetCorePosition (
52//  IN UINTN MpId
53//  );
54ArmPlatformGetCorePosition FUNCTION
55  and   r0, r0, #ARM_CORE_MASK
56  bx    lr
57  ENDFUNC
58
59ArmPlatformPeiBootAction FUNCTION
60  bx    lr
61  ENDFUNC
62
63  END
64