BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / ArmPlatformPkg / Include / Library / ArmPlatformLib.h
CommitLineData
1e57a462 1/** @file\r
2*\r
bc7b889a 3* Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
1e57a462 4*\r
3402aac7
RC
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
1e57a462 12*\r
13**/\r
14\r
15#ifndef _ARMPLATFORMLIB_H_\r
16#define _ARMPLATFORMLIB_H_\r
17\r
18//\r
19// The package level header files this module uses\r
20//\r
21#include <PiPei.h>\r
22//\r
23// The protocols, PPI and GUID defintions for this module\r
24//\r
25#include <Ppi/MasterBootMode.h>\r
26#include <Ppi/BootInRecoveryMode.h>\r
1e57a462 27\r
28#include <Library/ArmLib.h>\r
29\r
bebda7ce 30/**\r
31 Return the core position from the value of its MpId register\r
32\r
33 This function returns the core position from the position 0 in the processor.\r
34 This function might be called from assembler before any stack is set.\r
35\r
36 @return Return the core position\r
37\r
38**/\r
1e57a462 39UINTN\r
40ArmPlatformGetCorePosition (\r
41 IN UINTN MpId\r
42 );\r
43\r
bebda7ce 44/**\r
45 Return a non-zero value if the callee is the primary core\r
46\r
47 This function returns a non-zero value if the callee is the primary core.\r
48 The primary core is the core responsible to initialize the hardware and run UEFI.\r
49 This function might be called from assembler before any stack is set.\r
50\r
51 @return Return a non-zero value if the callee is the primary core.\r
52\r
53**/\r
54UINTN\r
55ArmPlatformIsPrimaryCore (\r
56 IN UINTN MpId\r
57 );\r
58\r
d05ca26c 59/**\r
60 Return the MpId of the primary core\r
61\r
62 This function returns the MpId of the primary core.\r
63 This function might be called from assembler before any stack is set.\r
64\r
65 @return Return the MpId of the primary core\r
66\r
67**/\r
68UINTN\r
69ArmPlatformGetPrimaryCoreMpId (\r
70 VOID\r
71 );\r
72\r
1e57a462 73/**\r
74 Return the current Boot Mode\r
75\r
76 This function returns the boot reason on the platform\r
77\r
78 @return Return the current Boot Mode of the platform\r
79\r
80**/\r
81EFI_BOOT_MODE\r
82ArmPlatformGetBootMode (\r
83 VOID\r
84 );\r
85\r
6913a683
OM
86/**\r
87 First platform specific function to be called in the PEI phase\r
88\r
89 This function is actually the first function called by the PrePi\r
90 or PrePeiCore modules. It allows to retrieve arguments passed to\r
91 the UEFI firmware through the CPU registers.\r
92\r
93 This function might be written into assembler as no stack are set\r
94 when the function is invoked.\r
95\r
96**/\r
97VOID\r
98ArmPlatformPeiBootAction (\r
99 VOID\r
100 );\r
101\r
1e57a462 102/**\r
103 Initialize controllers that must setup in the normal world\r
104\r
105 This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei\r
106 in the PEI phase.\r
107\r
108**/\r
109RETURN_STATUS\r
110ArmPlatformInitialize (\r
111 IN UINTN MpId\r
112 );\r
113\r
1e57a462 114/**\r
115 Return the Virtual Memory Map of your platform\r
116\r
117 This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform.\r
118\r
119 @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing a Physical-to-\r
120 Virtual Memory mapping. This array must be ended by a zero-filled\r
121 entry\r
122\r
123**/\r
124VOID\r
125ArmPlatformGetVirtualMemoryMap (\r
126 OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap\r
127 );\r
128\r
1e57a462 129/**\r
130 Return the Platform specific PPIs\r
131\r
132 This function exposes the Platform Specific PPIs. They can be used by any PrePi modules or passed\r
133 to the PeiCore by PrePeiCore.\r
134\r
135 @param[out] PpiListSize Size in Bytes of the Platform PPI List\r
136 @param[out] PpiList Platform PPI List\r
137\r
138**/\r
139VOID\r
140ArmPlatformGetPlatformPpiList (\r
141 OUT UINTN *PpiListSize,\r
142 OUT EFI_PEI_PPI_DESCRIPTOR **PpiList\r
143 );\r
144\r
145#endif\r