]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Include/Library/ArmPlatformLib.h
ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory
[mirror_edk2.git] / ArmPlatformPkg / Include / Library / ArmPlatformLib.h
1 /** @file
2 *
3 * Copyright (c) 2011-2013, ARM Limited. All rights reserved.
4 *
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
9 *
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 *
13 **/
14
15 #ifndef _ARMPLATFORMLIB_H_
16 #define _ARMPLATFORMLIB_H_
17
18 //
19 // The package level header files this module uses
20 //
21 #include <PiPei.h>
22 //
23 // The protocols, PPI and GUID defintions for this module
24 //
25 #include <Ppi/MasterBootMode.h>
26 #include <Ppi/BootInRecoveryMode.h>
27
28 #include <Library/ArmLib.h>
29
30 /**
31 Return the core position from the value of its MpId register
32
33 This function returns the core position from the position 0 in the processor.
34 This function might be called from assembler before any stack is set.
35
36 @return Return the core position
37
38 **/
39 UINTN
40 ArmPlatformGetCorePosition (
41 IN UINTN MpId
42 );
43
44 /**
45 Return a non-zero value if the callee is the primary core
46
47 This function returns a non-zero value if the callee is the primary core.
48 The primary core is the core responsible to initialize the hardware and run UEFI.
49 This function might be called from assembler before any stack is set.
50
51 @return Return a non-zero value if the callee is the primary core.
52
53 **/
54 UINTN
55 ArmPlatformIsPrimaryCore (
56 IN UINTN MpId
57 );
58
59 /**
60 Return the MpId of the primary core
61
62 This function returns the MpId of the primary core.
63 This function might be called from assembler before any stack is set.
64
65 @return Return the MpId of the primary core
66
67 **/
68 UINTN
69 ArmPlatformGetPrimaryCoreMpId (
70 VOID
71 );
72
73 /**
74 Return the current Boot Mode
75
76 This function returns the boot reason on the platform
77
78 @return Return the current Boot Mode of the platform
79
80 **/
81 EFI_BOOT_MODE
82 ArmPlatformGetBootMode (
83 VOID
84 );
85
86 /**
87 First platform specific function to be called in the PEI phase
88
89 This function is actually the first function called by the PrePi
90 or PrePeiCore modules. It allows to retrieve arguments passed to
91 the UEFI firmware through the CPU registers.
92
93 This function might be written into assembler as no stack are set
94 when the function is invoked.
95
96 **/
97 VOID
98 ArmPlatformPeiBootAction (
99 VOID
100 );
101
102 /**
103 Initialize controllers that must setup in the normal world
104
105 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
106 in the PEI phase.
107
108 **/
109 RETURN_STATUS
110 ArmPlatformInitialize (
111 IN UINTN MpId
112 );
113
114 /**
115 Return the Virtual Memory Map of your platform
116
117 This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.
118
119 @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing a Physical-to-
120 Virtual Memory mapping. This array must be ended by a zero-filled
121 entry
122
123 **/
124 VOID
125 ArmPlatformGetVirtualMemoryMap (
126 OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap
127 );
128
129 /**
130 Return the Platform specific PPIs
131
132 This function exposes the Platform Specific PPIs. They can be used by any PrePi modules or passed
133 to the PeiCore by PrePeiCore.
134
135 @param[out] PpiListSize Size in Bytes of the Platform PPI List
136 @param[out] PpiList Platform PPI List
137
138 **/
139 VOID
140 ArmPlatformGetPlatformPpiList (
141 OUT UINTN *PpiListSize,
142 OUT EFI_PEI_PPI_DESCRIPTOR **PpiList
143 );
144
145 #endif