]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiDxeCis.h
Import Library Class from original MDE package. Also I added the EFI_PEI_CORE_ENTRY_P...
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
CommitLineData
959ccb23 1/** @file\r
2 Include file matches things in PI.\r
3\r
4 Copyright (c) 2006 - 2007, Intel Corporation \r
5 All rights reserved. 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
13 Module Name: PiDxeCis.h\r
14\r
15 @par Revision Reference:\r
16 Version 1.0.\r
17\r
18**/\r
19\r
20#ifndef __PI_DXECIS_H__\r
21#define __PI_DXECIS_H__\r
22\r
23#include <Pi/PiMultiPhase.h>\r
24\r
25//\r
26// Global Coherencey Domain types\r
27//\r
28typedef enum {\r
29 EfiGcdMemoryTypeNonExistent,\r
30 EfiGcdMemoryTypeReserved,\r
31 EfiGcdMemoryTypeSystemMemory,\r
32 EfiGcdMemoryTypeMemoryMappedIo,\r
33 EfiGcdMemoryTypeMaximum\r
34} EFI_GCD_MEMORY_TYPE;\r
35\r
36\r
37typedef enum {\r
38 EfiGcdIoTypeNonExistent,\r
39 EfiGcdIoTypeReserved,\r
40 EfiGcdIoTypeIo,\r
41 EfiGcdIoTypeMaximum\r
42} EFI_GCD_IO_TYPE;\r
43\r
44\r
45typedef enum {\r
46 EfiGcdAllocateAnySearchBottomUp,\r
47 EfiGcdAllocateMaxAddressSearchBottomUp,\r
48 EfiGcdAllocateAddress,\r
49 EfiGcdAllocateAnySearchTopDown,\r
50 EfiGcdAllocateMaxAddressSearchTopDown,\r
51 EfiGcdMaxAllocateType\r
52} EFI_GCD_ALLOCATE_TYPE;\r
53\r
54\r
55typedef struct {\r
56 EFI_PHYSICAL_ADDRESS BaseAddress;\r
57 UINT64 Length;\r
58 UINT64 Capabilities;\r
59 UINT64 Attributes;\r
60 EFI_GCD_MEMORY_TYPE GcdMemoryType;\r
61 EFI_HANDLE ImageHandle;\r
62 EFI_HANDLE DeviceHandle;\r
63} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r
64\r
65\r
66typedef struct {\r
67 EFI_PHYSICAL_ADDRESS BaseAddress;\r
68 UINT64 Length;\r
69 EFI_GCD_IO_TYPE GcdIoType;\r
70 EFI_HANDLE ImageHandle;\r
71 EFI_HANDLE DeviceHandle;\r
72} EFI_GCD_IO_SPACE_DESCRIPTOR;\r
73\r
74\r
75/**\r
76 Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
77 global coherency domain of the processor.\r
78\r
79 @param GcdMemoryType Memory type of the memory space.\r
80 @param BaseAddress Base address of the memory space.\r
81 @param Length Length of the memory space.\r
82 @param Capabilities alterable attributes of the memory space.\r
83\r
84 @retval EFI_SUCCESS Merged this memory space into GCD map.\r
85\r
86**/\r
87typedef\r
88EFI_STATUS\r
89(EFIAPI *EFI_ADD_MEMORY_SPACE) (\r
90 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
91 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
92 IN UINT64 Length,\r
93 IN UINT64 Capabilities\r
94 )\r
95;\r
96\r
97/**\r
98 Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
99 I/O resources from the global coherency domain of the processor.\r
100\r
101 @param GcdAllocateType The type of allocate operation\r
102 @param GcdMemoryType The desired memory type\r
103 @param Alignment Align with 2^Alignment\r
104 @param Length Length to allocate\r
105 @param BaseAddress Base address to allocate\r
106 @param Imagehandle The image handle consume the allocated space.\r
107 @param DeviceHandle The device handle consume the allocated space.\r
108\r
109 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
110 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
111 @retval EFI_SUCCESS Memory space successfully allocated.\r
112\r
113**/\r
114typedef\r
115EFI_STATUS\r
116(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (\r
117 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
118 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
119 IN UINTN Alignment,\r
120 IN UINT64 Length,\r
121 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
122 IN EFI_HANDLE ImageHandle,\r
123 IN EFI_HANDLE DeviceHandle OPTIONAL\r
124 )\r
125;\r
126\r
127/**\r
128 Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
129 I/O resources from the global coherency domain of the processor.\r
130\r
131 @param BaseAddress Base address of the segment.\r
132 @param Length Length of the segment.\r
133\r
134 @retval EFI_SUCCESS Space successfully freed.\r
135\r
136**/\r
137typedef\r
138EFI_STATUS\r
139(EFIAPI *EFI_FREE_MEMORY_SPACE) (\r
140 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
141 IN UINT64 Length\r
142 )\r
143;\r
144\r
145/**\r
146 Removes reserved memory, system memory, or memory-mapped I/O resources from\r
147 the global coherency domain of the processor.\r
148\r
149 @param BaseAddress Base address of the memory space.\r
150 @param Length Length of the memory space.\r
151\r
152 @retval EFI_SUCCESS Successfully remove a segment of memory space.\r
153\r
154**/\r
155typedef\r
156EFI_STATUS\r
157(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (\r
158 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
159 IN UINT64 Length\r
160 )\r
161;\r
162\r
163/**\r
164 Retrieves the descriptor for a memory region containing a specified address.\r
165\r
166 @param BaseAddress Specified start address\r
167 @param Descriptor Specified length\r
168\r
169 @retval EFI_INVALID_PARAMETER Invalid parameter\r
170 @retval EFI_SUCCESS Successfully get memory space descriptor.\r
171\r
172**/\r
173typedef\r
174EFI_STATUS\r
175(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (\r
176 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
177 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
178 )\r
179;\r
180\r
181/**\r
182 Modifies the attributes for a memory region in the global coherency domain of the\r
183 processor.\r
184\r
185 @param BaseAddress Specified start address\r
186 @param Length Specified length\r
187 @param Attributes Specified attributes\r
188\r
189 @retval EFI_SUCCESS Successfully set attribute of a segment of memory space.\r
190\r
191**/\r
192typedef\r
959ccb23 193EFI_STATUS\r
194(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (\r
195 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
196 IN UINT64 Length,\r
197 IN UINT64 Attributes\r
198 )\r
199;\r
200\r
201/**\r
202 Returns a map of the memory resources in the global coherency domain of the\r
203 processor.\r
204\r
205 @param NumberOfDescriptors Number of descriptors.\r
206 @param MemorySpaceMap Descriptor array\r
207\r
208 @retval EFI_INVALID_PARAMETER Invalid parameter\r
209 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
210 @retval EFI_SUCCESS Successfully get memory space map.\r
211\r
212**/\r
213typedef\r
214EFI_STATUS\r
215(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (\r
216 OUT UINTN *NumberOfDescriptors,\r
217 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
218 )\r
219;\r
220\r
221/**\r
222 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
223\r
224 @param GcdIoType IO type of the segment.\r
225 @param BaseAddress Base address of the segment.\r
226 @param Length Length of the segment.\r
227\r
228 @retval EFI_SUCCESS Merged this segment into GCD map.\r
229\r
230**/\r
231typedef\r
232EFI_STATUS\r
233(EFIAPI *EFI_ADD_IO_SPACE) (\r
234 IN EFI_GCD_IO_TYPE GcdIoType,\r
235 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
236 IN UINT64 Length\r
237 )\r
238;\r
239\r
240/**\r
241 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
242 domain of the processor.\r
243\r
244 @param GcdAllocateType The type of allocate operation\r
245 @param GcdIoType The desired IO type\r
246 @param Alignment Align with 2^Alignment\r
247 @param Length Length to allocate\r
248 @param BaseAddress Base address to allocate\r
249 @param Imagehandle The image handle consume the allocated space.\r
250 @param DeviceHandle The device handle consume the allocated space.\r
251\r
252 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
253 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
254 @retval EFI_SUCCESS IO space successfully allocated.\r
255\r
256**/\r
257typedef\r
258EFI_STATUS\r
259(EFIAPI *EFI_ALLOCATE_IO_SPACE) (\r
260 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
261 IN EFI_GCD_IO_TYPE GcdIoType,\r
262 IN UINTN Alignment,\r
263 IN UINT64 Length,\r
264 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
265 IN EFI_HANDLE ImageHandle,\r
266 IN EFI_HANDLE DeviceHandle OPTIONAL\r
267 )\r
268;\r
269\r
270/**\r
271 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
272 domain of the processor.\r
273\r
274 @param BaseAddress Base address of the segment.\r
275 @param Length Length of the segment.\r
276\r
277 @retval EFI_SUCCESS Space successfully freed.\r
278\r
279**/\r
280typedef\r
281EFI_STATUS\r
282(EFIAPI *EFI_FREE_IO_SPACE) (\r
283 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
284 IN UINT64 Length\r
285 )\r
286;\r
287\r
288/**\r
289 Removes reserved I/O or I/O resources from the global coherency domain of the\r
290 processor.\r
291\r
292 @param BaseAddress Base address of the segment.\r
293 @param Length Length of the segment.\r
294\r
295 @retval EFI_SUCCESS Successfully removed a segment of IO space.\r
296\r
297**/\r
298typedef\r
299EFI_STATUS\r
300(EFIAPI *EFI_REMOVE_IO_SPACE) (\r
301 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
302 IN UINT64 Length\r
303 )\r
304;\r
305\r
306/**\r
307 Retrieves the descriptor for an I/O region containing a specified address.\r
308\r
309 @param BaseAddress Specified start address\r
310 @param Descriptor Specified length\r
311\r
312 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
313 @retval EFI_SUCCESS Successfully get the IO space descriptor.\r
314\r
315**/\r
316typedef\r
317EFI_STATUS\r
318(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (\r
319 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
320 OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
321 )\r
322;\r
323\r
324/**\r
325 Returns a map of the I/O resources in the global coherency domain of the processor.\r
326\r
327 @param NumberOfDescriptors Number of descriptors.\r
328 @param MemorySpaceMap Descriptor array\r
329\r
330 @retval EFI_INVALID_PARAMETER Invalid parameter\r
331 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
332 @retval EFI_SUCCESS Successfully get IO space map.\r
333\r
334**/\r
335typedef\r
336EFI_STATUS\r
337(EFIAPI *EFI_GET_IO_SPACE_MAP) (\r
338 OUT UINTN *NumberOfDescriptors,\r
339 OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
340 )\r
341;\r
342\r
343\r
344\r
345/**\r
346 Loads and executed DXE drivers from firmware volumes.\r
347\r
348 @return Status code\r
349\r
350**/\r
351typedef\r
352EFI_STATUS\r
00edb218
A
353(EFIAPI *EFI_DISPATCH) (\r
354 VOID\r
355 )\r
959ccb23 356;\r
357\r
358/**\r
359 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
360\r
361 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
362 @param DriverName A pointer to the name of the file in a firmware volume.\r
363\r
364 @return Status code\r
365\r
366**/\r
367typedef\r
368EFI_STATUS\r
369(EFIAPI *EFI_SCHEDULE) (\r
370 IN EFI_HANDLE FirmwareVolumeHandle,\r
371 IN EFI_GUID *DriverName\r
372 )\r
373;\r
374\r
375/**\r
376 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
377\r
378 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
379 @param DriverName A pointer to the name of the file in a firmware volume.\r
380\r
381 @return Status code\r
382\r
383**/\r
384typedef\r
385EFI_STATUS\r
386(EFIAPI *EFI_TRUST) (\r
387 IN EFI_HANDLE FirmwareVolumeHandle,\r
388 IN EFI_GUID *DriverName\r
389 )\r
390;\r
391\r
392/**\r
393 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
394\r
395 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r
396 @param Size The size, in bytes, of the firmware volume.\r
397 @param FirmwareVolumeHandle On output, a pointer to the created handle.\r
398\r
399 @return Status code\r
400\r
401**/\r
402typedef\r
403EFI_STATUS\r
404(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (\r
405 IN VOID *FvHeader,\r
406 IN UINTN Size,\r
407 OUT EFI_HANDLE *FirmwareVolumeHandle\r
408 )\r
409;\r
410\r
411//\r
412// DXE Services Table\r
413//\r
00edb218
A
414#define DXE_SERVICES_SIGNATURE 0x565245535f455844\r
415#define DXE_SERVICES_REVISION ((1<<16) | (00)\r
959ccb23 416\r
417typedef struct {\r
418 EFI_TABLE_HEADER Hdr;\r
419\r
420 //\r
421 // Global Coherency Domain Services\r
422 //\r
423 EFI_ADD_MEMORY_SPACE AddMemorySpace;\r
424 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r
425 EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r
426 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r
427 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r
428 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r
429 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r
430 EFI_ADD_IO_SPACE AddIoSpace;\r
431 EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r
432 EFI_FREE_IO_SPACE FreeIoSpace;\r
433 EFI_REMOVE_IO_SPACE RemoveIoSpace;\r
434 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r
435 EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r
436\r
437 //\r
438 // Dispatcher Services\r
439 //\r
440 EFI_DISPATCH Dispatch;\r
441 EFI_SCHEDULE Schedule;\r
442 EFI_TRUST Trust;\r
443 //\r
444 // Service to process a single firmware volume found in a capsule\r
445 //\r
446 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r
447} DXE_SERVICES;\r
448\r
449typedef DXE_SERVICES EFI_DXE_SERVICES;\r
450\r
451#endif\r