Fix capitalization issues
[mirror_edk2.git] / MdePkg / Include / Peim / PeiCis.h
Content-type: text/html git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Peim/PeiCis.h


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 8) line 1, <$fd> line 577.
CommitLineData
c1288a39
LG
1/** @file
2 Framework PEI master include file. This file should match the PEI CIS spec.
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. 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 Module Name: PeiCis.h
14
15 @par Revision Reference:
16 Version 0.91.
17
18**/
19
20#ifndef __PEIM_CIS_H__
21#define __PEIM_CIS_H__
22
23#include <Common/MultiPhase.h>
24#include <Common/BootMode.h>
25#include <Common/Hob.h>
26#include <Common/FirmwareVolumeImageFormat.h>
27#include <Common/FirmwareVolumeHeader.h>
28#include <Common/FirmwareFileSystem.h>
29#include <Common/Dependency.h>
30
31#define TIANO_ERROR(a) (MAX_2_BITS | (a))
32
33#if (EFI_SPECIFICATION_VERSION < 0x00020000)
34//
35// Tiano added a couple of return types. These are owned by UEFI specification
36// and Tiano can not use them. Thus for UEFI 2.0/R9 support we moved the values
37// to a UEFI OEM extension range to conform to UEFI specification.
38//
39#define EFI_NOT_AVAILABLE_YET EFIERR (28)
40#define EFI_UNLOAD_IMAGE EFIERR (29)
41#else
42#define EFI_NOT_AVAILABLE_YET TIANO_ERROR (0)
43#define EFI_UNLOAD_IMAGE TIANO_ERROR (1)
44#endif
45
46//
47// Declare forward referenced data structures
48//
49typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;
50typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;
51
52
53#include <Ppi/CpuIo.h>
54#include <Ppi/PciCfg.h>
55
56//
57// PEI Specification Revision information
58//
59#define PEI_SPECIFICATION_MAJOR_REVISION 0
60#define PEI_SPECIFICATION_MINOR_REVISION 91
61
62/**
63 The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
64 Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
65
66 @param FfsHeader Pointer to the FFS file header.
67
68 @param PeiServices Describes the list of possible PEI Services.
69
70 @return Status code
71
72**/
73typedef
74EFI_STATUS
75(EFIAPI *EFI_PEIM_ENTRY_POINT)(
76 IN EFI_FFS_FILE_HEADER *FfsHeader,
77 IN EFI_PEI_SERVICES **PeiServices
78 );
79
80/**
81 Entry point of the notification callback function itself within the PEIM.
82
83 @param PeiServices Indirect reference to the PEI Services Table.
84
85 @param NotifyDescriptor Address of the notification descriptor data structure.
86
87 @param Ppi Address of the PPI that was installed.
88
89 @return Status code
90
91**/
92typedef
93EFI_STATUS
94(EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT) (
95 IN EFI_PEI_SERVICES **PeiServices,
96 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
97 IN VOID *Ppi
98 );
99
100//
101// PEI Ppi Services List Descriptors
102//
103#define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001
104#define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010
105#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020
106#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040
107#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060
108#define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000
109
110typedef struct {
111 UINTN Flags;
112 EFI_GUID *Guid;
113 VOID *Ppi;
114} EFI_PEI_PPI_DESCRIPTOR;
115
116struct _EFI_PEI_NOTIFY_DESCRIPTOR {
117 UINTN Flags;
118 EFI_GUID *Guid;
119 EFI_PEIM_NOTIFY_ENTRY_POINT Notify;
120};
121
122/**
123 This service is the first one provided by the PEI Foundation. This function
124 installs an interface in the PEI PPI database by GUID. The purpose of the
125 service is to publish an interface that other parties can use to call
126 additional PEIMs.
127
128 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
129 published by the PEI Foundation.
130
131 @param PpiList A pointer to the list of interfaces that the caller shall install.
132
133 @retval EFI_SUCCESS The interface was successfully installed.
134
135 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
136
137 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
138
139**/
140typedef
141EFI_STATUS
142(EFIAPI *EFI_PEI_INSTALL_PPI) (
143 IN EFI_PEI_SERVICES **PeiServices,
144 IN EFI_PEI_PPI_DESCRIPTOR *PpiList
145 );
146
147/**
148 This function reinstalls an interface in the PEI PPI database by GUID.
149 The purpose of the service is to publish an interface that other parties
150 can use to replace a same-named interface in the protocol database
151 with a different interface.
152
153 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
154 published by the PEI Foundation.
155
156 @param OldPpi A pointer to the former PPI in the database.
157
158 @param NewPpi A pointer to the new interfaces that the caller shall install.
159
160 @retval EFI_SUCCESS The interface was successfully installed.
161
162 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
163
164 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
165
166 @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.
167
168**/
169typedef
170EFI_STATUS
171(EFIAPI *EFI_PEI_REINSTALL_PPI) (
172 IN EFI_PEI_SERVICES **PeiServices,
173 IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,
174 IN EFI_PEI_PPI_DESCRIPTOR *NewPpi
175 );
176
177/**
178 This function locates an interface in the PEI PPI database by GUID.
179
180 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.
181
182 @param Guid A pointer to the GUID whose corresponding interface needs to be found.
183
184 @param Instance The N-th instance of the interface that is required.
185
186 @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.
187
188 @param Ppi A pointer to the instance of the interface.
189
190 @retval EFI_SUCCESS The interface was successfully returned.
191
192 @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.
193
194**/
195typedef
196EFI_STATUS
197(EFIAPI *EFI_PEI_LOCATE_PPI) (
198 IN EFI_PEI_SERVICES **PeiServices,
199 IN EFI_GUID *Guid,
200 IN UINTN Instance,
201 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
202 IN OUT VOID **Ppi
203 );
204
205/**
206 This function installs a notification service to be called back when a
207 given interface is installed or reinstalled. The purpose of the service
208 is to publish an interface that other parties can use to call additional PPIs
209 that may materialize later.
210
211 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
212
213 @param NotifyList A pointer to the list of notification interfaces that the caller shall install.
214
215 @retval EFI_SUCCESS The interface was successfully installed.
216
217 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
218
219 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
220
221**/
222typedef
223EFI_STATUS
224(EFIAPI *EFI_PEI_NOTIFY_PPI) (
225 IN EFI_PEI_SERVICES **PeiServices,
226 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
227 );
228
229/**
230 This function returns the present value of the boot mode.
231
232 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
233
234 @param BootMode A pointer to contain the value of the boot mode.
235
236 @retval EFI_SUCCESS The boot mode was returned successfully.
237
238**/
239typedef
240EFI_STATUS
241(EFIAPI *EFI_PEI_GET_BOOT_MODE) (
242 IN EFI_PEI_SERVICES **PeiServices,
243 OUT EFI_BOOT_MODE *BootMode
244 );
245
246/**
247 This function sets the value of the boot mode.
248
249 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
250
251 @param BootMode The value of the boot mode to set.
252
253 @retval EFI_SUCCESS The boot mode was returned successfully.
254
255**/
256typedef
257EFI_STATUS
258(EFIAPI *EFI_PEI_SET_BOOT_MODE) (
259 IN EFI_PEI_SERVICES **PeiServices,
260 IN EFI_BOOT_MODE BootMode
261 );
262
263/**
264 This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.
265
266 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
267
268 @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize
269
270 @retval EFI_SUCCESS The list was successfully returned.
271
272 @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
273
274**/
275typedef
276EFI_STATUS
277(EFIAPI *EFI_PEI_GET_HOB_LIST) (
278 IN EFI_PEI_SERVICES **PeiServices,
279 IN OUT VOID **HobList
280 );
281
282/**
283