]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Pi/PiDxeCis.h
Update PI Service Table Versions per PI 1.2 Errata C.
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
... / ...
CommitLineData
1/** @file\r
2 Include file matches things in PI.\r
3\r
4Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials are licensed and made available under \r
6the terms and conditions of the BSD License that accompanies this distribution. \r
7The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php. \r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 @par Revision Reference:\r
14 PI Version 1.2\r
15\r
16**/\r
17\r
18#ifndef __PI_DXECIS_H__\r
19#define __PI_DXECIS_H__\r
20\r
21#include <Uefi/UefiMultiPhase.h>\r
22#include <Pi/PiMultiPhase.h>\r
23\r
24///\r
25/// Global Coherencey Domain types - Memory type.\r
26///\r
27typedef enum {\r
28 ///\r
29 /// A memory region that is visible to the boot processor. However, there are no system\r
30 /// components that are currently decoding this memory region.\r
31 ///\r
32 EfiGcdMemoryTypeNonExistent,\r
33 ///\r
34 /// A memory region that is visible to the boot processor. This memory region is being\r
35 /// decoded by a system component, but the memory region is not considered to be either\r
36 /// system memory or memory-mapped I/O.\r
37 ///\r
38 EfiGcdMemoryTypeReserved,\r
39 ///\r
40 /// A memory region that is visible to the boot processor. A memory controller is\r
41 /// currently decoding this memory region and the memory controller is producing a\r
42 /// tested system memory region that is available to the memory services.\r
43 ///\r
44 EfiGcdMemoryTypeSystemMemory,\r
45 ///\r
46 /// A memory region that is visible to the boot processor. This memory region is\r
47 /// currently being decoded by a component as memory-mapped I/O that can be used to\r
48 /// access I/O devices in the platform.\r
49 ///\r
50 EfiGcdMemoryTypeMemoryMappedIo,\r
51 EfiGcdMemoryTypeMaximum\r
52} EFI_GCD_MEMORY_TYPE;\r
53\r
54///\r
55/// Global Coherencey Domain types - IO type.\r
56///\r
57typedef enum {\r
58 ///\r
59 /// An I/O region that is visible to the boot processor. However, there are no system\r
60 /// components that are currently decoding this I/O region.\r
61 ///\r
62 EfiGcdIoTypeNonExistent,\r
63 ///\r
64 /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
65 /// decoded by a system component, but the I/O region cannot be used to access I/O devices.\r
66 ///\r
67 EfiGcdIoTypeReserved,\r
68 ///\r
69 /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
70 /// decoded by a system component that is producing I/O ports that can be used to access I/O devices.\r
71 ///\r
72 EfiGcdIoTypeIo,\r
73 EfiGcdIoTypeMaximum\r
74} EFI_GCD_IO_TYPE;\r
75\r
76///\r
77/// The type of allocation to perform.\r
78/// \r
79typedef enum {\r
80 ///\r
81 /// The GCD memory space map is searched from the lowest address up to the highest address\r
82 /// looking for unallocated memory ranges.\r
83 ///\r
84 EfiGcdAllocateAnySearchBottomUp,\r
85 ///\r
86 /// The GCD memory space map is searched from the lowest address up \r
87 /// to the specified MaxAddress looking for unallocated memory ranges.\r
88 ///\r
89 EfiGcdAllocateMaxAddressSearchBottomUp,\r
90 ///\r
91 /// The GCD memory space map is checked to see if the memory range starting \r
92 /// at the specified Address is available.\r
93 ///\r
94 EfiGcdAllocateAddress,\r
95 ///\r
96 /// The GCD memory space map is searched from the highest address down to the lowest address \r
97 /// looking for unallocated memory ranges.\r
98 ///\r
99 EfiGcdAllocateAnySearchTopDown,\r
100 ///\r
101 /// The GCD memory space map is searched from the specified MaxAddress \r
102 /// down to the lowest address looking for unallocated memory ranges.\r
103 ///\r
104 EfiGcdAllocateMaxAddressSearchTopDown,\r
105 EfiGcdMaxAllocateType\r
106} EFI_GCD_ALLOCATE_TYPE;\r
107\r
108///\r
109/// EFI_GCD_MEMORY_SPACE_DESCRIPTOR.\r
110/// \r
111typedef struct {\r
112 ///\r
113 /// The physical address of the first byte in the memory region. Type\r
114 /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r
115 /// description in the UEFI 2.0 specification.\r
116 /// \r
117 EFI_PHYSICAL_ADDRESS BaseAddress;\r
118\r
119 ///\r
120 /// The number of bytes in the memory region.\r
121 /// \r
122 UINT64 Length;\r
123\r
124 ///\r
125 /// The bit mask of attributes that the memory region is capable of supporting. The bit\r
126 /// mask of available attributes is defined in the GetMemoryMap() function description\r
127 /// in the UEFI 2.0 specification.\r
128 /// \r
129 UINT64 Capabilities;\r
130 ///\r
131 /// The bit mask of attributes that the memory region is currently using. The bit mask of\r
132 /// available attributes is defined in GetMemoryMap().\r
133 /// \r
134 UINT64 Attributes;\r
135 ///\r
136 /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the\r
137 /// AddMemorySpace() function description.\r
138 /// \r
139 EFI_GCD_MEMORY_TYPE GcdMemoryType;\r
140\r
141 ///\r
142 /// The image handle of the agent that allocated the memory resource described by\r
143 /// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory\r
144 /// resource is not currently allocated. Type EFI_HANDLE is defined in\r
145 /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
146 /// \r
147 EFI_HANDLE ImageHandle;\r
148\r
149 ///\r
150 /// The device handle for which the memory resource has been allocated. If\r
151 /// ImageHandle is NULL, then the memory resource is not currently allocated. If this\r
152 /// field is NULL, then the memory resource is not associated with a device that is\r
153 /// described by a device handle. Type EFI_HANDLE is defined in\r
154 /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
155 /// \r
156 EFI_HANDLE DeviceHandle;\r
157} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r
158\r
159///\r
160/// EFI_GCD_IO_SPACE_DESCRIPTOR.\r
161/// \r
162typedef struct {\r
163 ///\r
164 /// Physical address of the first byte in the I/O region. Type\r
165 /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r
166 /// description in the UEFI 2.0 specification.\r
167 /// \r
168 EFI_PHYSICAL_ADDRESS BaseAddress;\r
169\r
170 ///\r
171 /// Number of bytes in the I/O region.\r
172 ///\r
173 UINT64 Length;\r
174\r
175 /// \r
176 /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the\r
177 /// AddIoSpace() function description.\r
178 /// \r
179 EFI_GCD_IO_TYPE GcdIoType;\r
180\r
181 /// \r
182 /// The image handle of the agent that allocated the I/O resource described by\r
183 /// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O\r
184 /// resource is not currently allocated. Type EFI_HANDLE is defined in\r
185 /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
186 /// \r
187 EFI_HANDLE ImageHandle;\r
188\r
189 ///\r
190 /// The device handle for which the I/O resource has been allocated. If ImageHandle\r
191 /// is NULL, then the I/O resource is not currently allocated. If this field is NULL, then\r
192 /// the I/O resource is not associated with a device that is described by a device handle.\r
193 /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI\r
194 /// 2.0 specification.\r
195 /// \r
196 EFI_HANDLE DeviceHandle;\r
197} EFI_GCD_IO_SPACE_DESCRIPTOR;\r
198\r
199\r
200/**\r
201 Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
202 global coherency domain of the processor.\r
203\r
204 @param GcdMemoryType The type of memory resource being added.\r
205 @param BaseAddress The physical address that is the start address\r
206 of the memory resource being added.\r
207 @param Length The size, in bytes, of the memory resource that\r
208 is being added.\r
209 @param Capabilities The bit mask of attributes that the memory \r
210 resource region supports.\r
211\r
212 @retval EFI_SUCCESS The memory resource was added to the global\r
213 coherency domain of the processor.\r
214 @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.\r
215 @retval EFI_INVALID_PARAMETER Length is zero.\r
216 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add\r
217 the memory resource to the global coherency \r
218 domain of the processor.\r
219 @retval EFI_UNSUPPORTED The processor does not support one or more bytes\r
220 of the memory resource range specified by \r
221 BaseAddress and Length.\r
222 @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range\r
223 specified by BaseAddress and Length conflicts \r
224 with a memory resource range that was previously\r
225 added to the global coherency domain of the processor.\r
226 @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range\r
227 specified by BaseAddress and Length was allocated\r
228 in a prior call to AllocateMemorySpace().\r
229\r
230**/\r
231typedef\r
232EFI_STATUS\r
233(EFIAPI *EFI_ADD_MEMORY_SPACE)(\r
234 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
235 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
236 IN UINT64 Length,\r
237 IN UINT64 Capabilities\r
238 );\r
239\r
240/**\r
241 Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
242 I/O resources from the global coherency domain of the processor.\r
243\r
244 @param GcdAllocateType The type of allocation to perform.\r
245 @param GcdMemoryType The type of memory resource being allocated.\r
246 @param Alignment The log base 2 of the boundary that BaseAddress must\r
247 be aligned on output. Align with 2^Alignment.\r
248 @param Length The size in bytes of the memory resource range that\r
249 is being allocated.\r
250 @param BaseAddress A pointer to a physical address to allocate.\r
251 @param Imagehandle The image handle of the agent that is allocating \r
252 the memory resource.\r
253 @param DeviceHandle The device handle for which the memory resource\r
254 is being allocated.\r
255\r
256 @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r
257 @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.\r
258 @retval EFI_INVALID_PARAMETER Length is zero.\r
259 @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r
260 @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r
261 @retval EFI_NOT_FOUND The memory resource request could not be satisfied.\r
262 No descriptor contains the desired space.\r
263 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the memory\r
264 resource from the global coherency domain of the processor.\r
265 @retval EFI_SUCCESS The memory resource was allocated from the global coherency\r
266 domain of the processor.\r
267\r
268\r
269**/\r
270typedef\r
271EFI_STATUS\r
272(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE)(\r
273 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
274 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
275 IN UINTN Alignment,\r
276 IN UINT64 Length,\r
277 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
278 IN EFI_HANDLE ImageHandle,\r
279 IN EFI_HANDLE DeviceHandle OPTIONAL\r
280 );\r
281\r
282/**\r
283 Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
284 I/O resources from the global coherency domain of the processor.\r
285\r
286 @param BaseAddress The physical address that is the start address of the memory resource being freed.\r
287 @param Length The size in bytes of the memory resource range that is being freed.\r
288\r
289 @retval EFI_SUCCESS The memory resource was freed from the global coherency domain of\r
290 the processor.\r
291 @retval EFI_INVALID_PARAMETER Length is zero. \r
292 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r
293 resource range specified by BaseAddress and Length.\r
294 @retval EFI_NOT_FOUND The memory resource range specified by BaseAddress and\r
295 Length was not allocated with previous calls to AllocateMemorySpace().\r
296 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the memory resource\r
297 from the global coherency domain of the processor.\r
298\r
299**/\r
300typedef\r
301EFI_STATUS\r
302(EFIAPI *EFI_FREE_MEMORY_SPACE)(\r
303 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
304 IN UINT64 Length\r
305 );\r
306\r
307/**\r
308 Removes reserved memory, system memory, or memory-mapped I/O resources from\r
309 the global coherency domain of the processor.\r
310\r
311 @param BaseAddress The physical address that is the start address of the memory resource being removed.\r
312 @param Length The size in bytes of the memory resource that is being removed.\r
313\r
314 @retval EFI_SUCCESS The memory resource was removed from the global coherency\r
315 domain of the processor.\r
316 @retval EFI_INVALID_PARAMETER Length is zero. \r
317 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r
318 resource range specified by BaseAddress and Length.\r
319 @retval EFI_NOT_FOUND One or more bytes of the memory resource range specified by\r
320 BaseAddress and Length was not added with previous calls to\r
321 AddMemorySpace().\r
322 @retval EFI_ACCESS_DEFINED One or more bytes of the memory resource range specified by\r
323 BaseAddress and Length has been allocated with AllocateMemorySpace().\r
324 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the memory\r
325 resource from the global coherency domain of the processor.\r
326\r
327**/\r
328typedef\r
329EFI_STATUS\r
330(EFIAPI *EFI_REMOVE_MEMORY_SPACE)(\r
331 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
332 IN UINT64 Length\r
333 );\r
334\r
335/**\r
336 Retrieves the descriptor for a memory region containing a specified address.\r
337\r
338 @param BaseAddress The physical address that is the start address of a memory region.\r
339 @param Descriptor A pointer to a caller allocated descriptor.\r
340\r
341 @retval EFI_SUCCESS The descriptor for the memory resource region containing\r
342 BaseAddress was returned in Descriptor.\r
343 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
344 @retval EFI_NOT_FOUND A memory resource range containing BaseAddress was not found.\r
345\r
346**/\r
347typedef\r
348EFI_STATUS\r
349(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR)(\r
350 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
351 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
352 );\r
353\r
354/**\r
355 Modifies the attributes for a memory region in the global coherency domain of the\r
356 processor.\r
357\r
358 @param BaseAddress The physical address that is the start address of a memory region.\r
359 @param Length The size in bytes of the memory region.\r
360 @param Attributes The bit mask of attributes to set for the memory region.\r
361\r
362 @retval EFI_SUCCESS The attributes were set for the memory region.\r
363 @retval EFI_INVALID_PARAMETER Length is zero. \r
364 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r
365 resource range specified by BaseAddress and Length.\r
366 @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource\r
367 range specified by BaseAddress and Length.\r
368 @retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by\r
369 BaseAddress and Length cannot be modified.\r
370 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of\r
371 the memory resource range.\r
372\r
373**/\r
374typedef\r
375EFI_STATUS\r
376(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(\r
377 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
378 IN UINT64 Length,\r
379 IN UINT64 Attributes\r
380 );\r
381\r
382/**\r
383 Returns a map of the memory resources in the global coherency domain of the\r
384 processor.\r
385\r
386 @param NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.\r
387 @param MemorySpaceMap A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.\r
388\r
389 @retval EFI_SUCCESS The memory space map was returned in the MemorySpaceMap\r
390 buffer, and the number of descriptors in MemorySpaceMap was\r
391 returned in NumberOfDescriptors.\r
392 @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
393 @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.\r
394 @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate MemorySpaceMap.\r
395\r
396**/\r
397typedef\r
398EFI_STATUS\r
399(EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(\r
400 OUT UINTN *NumberOfDescriptors,\r
401 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
402 );\r
403\r
404/**\r
405 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
406\r
407 @param GcdIoType The type of I/O resource being added.\r
408 @param BaseAddress The physical address that is the start address of the I/O resource being added.\r
409 @param Length The size in bytes of the I/O resource that is being added.\r
410\r
411 @retval EFI_SUCCESS The I/O resource was added to the global coherency domain of\r
412 the processor.\r
413 @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
414 @retval EFI_INVALID_PARAMETER Length is zero.\r
415 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add the I/O resource to\r
416 the global coherency domain of the processor.\r
417 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r
418 resource range specified by BaseAddress and Length.\r
419 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
420 BaseAddress and Length conflicts with an I/O resource\r
421 range that was previously added to the global coherency domain\r
422 of the processor.\r
423 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
424 BaseAddress and Length was allocated in a prior call to\r
425 AllocateIoSpace().\r
426\r
427**/\r
428typedef\r
429EFI_STATUS\r
430(EFIAPI *EFI_ADD_IO_SPACE)(\r
431 IN EFI_GCD_IO_TYPE GcdIoType,\r
432 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
433 IN UINT64 Length\r
434 );\r
435\r
436/**\r
437 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
438 domain of the processor.\r
439\r
440 @param GcdAllocateType The type of allocation to perform.\r
441 @param GcdIoType The type of I/O resource being allocated.\r
442 @param Alignment The log base 2 of the boundary that BaseAddress must be aligned on output.\r
443 @param Length The size in bytes of the I/O resource range that is being allocated.\r
444 @param BaseAddress A pointer to a physical address.\r
445 @param Imagehandle The image handle of the agent that is allocating the I/O resource.\r
446 @param DeviceHandle The device handle for which the I/O resource is being allocated.\r
447\r
448 @retval EFI_SUCCESS The I/O resource was allocated from the global coherency domain\r
449 of the processor.\r
450 @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r
451 @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
452 @retval EFI_INVALID_PARAMETER Length is zero.\r
453 @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r
454 @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r
455 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the I/O\r
456 resource from the global coherency domain of the processor.\r
457 @retval EFI_NOT_FOUND The I/O resource request could not be satisfied.\r
458\r
459**/\r
460typedef\r
461EFI_STATUS\r
462(EFIAPI *EFI_ALLOCATE_IO_SPACE)(\r
463 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
464 IN EFI_GCD_IO_TYPE GcdIoType,\r
465 IN UINTN Alignment,\r
466 IN UINT64 Length,\r
467 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
468 IN EFI_HANDLE ImageHandle,\r
469 IN EFI_HANDLE DeviceHandle OPTIONAL\r
470 );\r
471\r
472/**\r
473 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
474 domain of the processor.\r
475\r
476 @param BaseAddress The physical address that is the start address of the I/O resource being freed.\r
477 @param Length The size in bytes of the I/O resource range that is being freed.\r
478\r
479 @retval EFI_SUCCESS The I/O resource was freed from the global coherency domain of the\r
480 processor.\r
481 @retval EFI_INVALID_PARAMETER Length is zero.\r
482 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O resource\r
483 range specified by BaseAddress and Length.\r
484 @retval EFI_NOT_FOUND The I/O resource range specified by BaseAddress and Length\r
485 was not allocated with previous calls to AllocateIoSpace().\r
486 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the I/O resource from\r
487 the global coherency domain of the processor.\r
488\r
489**/\r
490typedef\r
491EFI_STATUS\r
492(EFIAPI *EFI_FREE_IO_SPACE)(\r
493 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
494 IN UINT64 Length\r
495 );\r
496\r
497/**\r
498 Removes reserved I/O or I/O resources from the global coherency domain of the\r
499 processor.\r
500\r
501 @param BaseAddress A pointer to a physical address that is the start address of the I/O resource being\r
502 removed.\r
503 @param Length The size in bytes of the I/O resource that is being removed.\r
504\r
505 @retval EFI_SUCCESS The I/O resource was removed from the global coherency domain\r
506 of the processor.\r
507 @retval EFI_INVALID_PARAMETER Length is zero.\r
508 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r
509 resource range specified by BaseAddress and Length.\r
510 @retval EFI_NOT_FOUND One or more bytes of the I/O resource range specified by\r
511 BaseAddress and Length was not added with previous\r
512 calls to AddIoSpace().\r
513 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
514 BaseAddress and Length has been allocated with\r
515 AllocateIoSpace().\r
516 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the I/O\r
517 resource from the global coherency domain of the processor.\r
518\r
519**/\r
520typedef\r
521EFI_STATUS\r
522(EFIAPI *EFI_REMOVE_IO_SPACE)(\r
523 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
524 IN UINT64 Length\r
525 );\r
526\r
527/**\r
528 Retrieves the descriptor for an I/O region containing a specified address.\r
529\r
530 @param BaseAddress The physical address that is the start address of an I/O region.\r
531 @param Descriptor A pointer to a caller allocated descriptor.\r
532\r
533 @retval EFI_SUCCESS The descriptor for the I/O resource region containing\r
534 BaseAddress was returned in Descriptor.\r
535 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
536 @retval EFI_NOT_FOUND An I/O resource range containing BaseAddress was not found.\r
537\r
538**/\r
539typedef\r
540EFI_STATUS\r
541(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(\r
542 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
543 OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
544 );\r
545\r
546/**\r
547 Returns a map of the I/O resources in the global coherency domain of the processor.\r
548\r
549 @param NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.\r
550 @param MemorySpaceMap A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.\r
551\r
552 @retval EFI_SUCCESS The I/O space map was returned in the IoSpaceMap buffer, and\r
553 the number of descriptors in IoSpaceMap was returned in\r
554 NumberOfDescriptors.\r
555 @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
556 @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.\r
557 @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate IoSpaceMap.\r
558\r
559\r
560**/\r
561typedef\r
562EFI_STATUS\r
563(EFIAPI *EFI_GET_IO_SPACE_MAP)(\r
564 OUT UINTN *NumberOfDescriptors,\r
565 OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
566 );\r
567\r
568\r
569\r
570/**\r
571 Loads and executed DXE drivers from firmware volumes.\r
572\r
573 The Dispatch() function searches for DXE drivers in firmware volumes that have been \r
574 installed since the last time the Dispatch() service was called. It then evaluates \r
575 the dependency expressions of all the DXE drivers and loads and executes those DXE\r
576 drivers whose dependency expression evaluate to TRUE. This service must interact with\r
577 the Security Architectural Protocol to authenticate DXE drivers before they are executed.\r
578 This process is continued until no more DXE drivers can be executed.\r
579\r
580 @retval EFI_SUCCESS One or more DXE driver were dispatched.\r
581 @retval EFI_NOT_FOUND No DXE drivers were dispatched.\r
582 @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.\r
583 Thus, no action was taken.\r
584\r
585**/\r
586typedef\r
587EFI_STATUS\r
588(EFIAPI *EFI_DISPATCH)(\r
589 VOID\r
590 );\r
591\r
592/**\r
593 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
594\r
595 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
596 @param FileName A pointer to the name of the file in a firmware volume.\r
597\r
598 @retval EFI_SUCCESS The DXE driver was found and its SOR bit was cleared.\r
599 @retval EFI_NOT_FOUND The DXE driver does not exist, or the DXE driver exists and its SOR\r
600 bit is not set.\r
601\r
602**/\r
603typedef\r
604EFI_STATUS\r
605(EFIAPI *EFI_SCHEDULE)(\r
606 IN EFI_HANDLE FirmwareVolumeHandle,\r
607 IN CONST EFI_GUID *FileName\r
608 );\r
609\r
610/**\r
611 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
612\r
613 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
614 @param DriverName A pointer to the name of the file in a firmware volume.\r
615\r
616 @return Status of promoting FFS from untrusted to trusted\r
617 state.\r
618 @retval EFI_NOT_FOUND The file was not found in the untrusted state.\r
619\r
620**/\r
621typedef\r
622EFI_STATUS\r
623(EFIAPI *EFI_TRUST)(\r
624 IN EFI_HANDLE FirmwareVolumeHandle,\r
625 IN CONST EFI_GUID *FileName\r
626 );\r
627\r
628/**\r
629 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
630\r
631 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r
632 @param Size The size, in bytes, of the firmware volume.\r
633 @param FirmwareVolumeHandle On output, a pointer to the created handle.\r
634\r
635 @retval EFI_SUCCESS The EFI_FIRMWARE_VOLUME_PROTOCOL and\r
636 EFI_DEVICE_PATH_PROTOCOL were installed onto\r
637 FirmwareVolumeHandle for the firmware volume described\r
638 by FirmwareVolumeHeader and Size.\r
639 @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader\r
640 and Size is corrupted.\r
641 @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the\r
642 EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL \r
643 for the firmware volume described by FirmwareVolumeHeader and Size.\r
644\r
645**/\r
646typedef\r
647EFI_STATUS\r
648(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(\r
649 IN CONST VOID *FirmwareVolumeHeader,\r
650 IN UINTN Size,\r
651 OUT EFI_HANDLE *FirmwareVolumeHandle\r
652 );\r
653\r
654//\r
655// DXE Services Table\r
656//\r
657#define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL\r
658#define DXE_SPECIFICATION_MAJOR_REVISION 1\r
659#define DXE_SPECIFICATION_MINOR_REVISION 20\r
660#define DXE_SERVICES_REVISION ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))\r
661\r
662typedef struct {\r
663 ///\r
664 /// The table header for the DXE Services Table.\r
665 /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r
666 ///\r
667 EFI_TABLE_HEADER Hdr;\r
668\r
669 //\r
670 // Global Coherency Domain Services\r
671 //\r
672 EFI_ADD_MEMORY_SPACE AddMemorySpace;\r
673 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r
674 EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r
675 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r
676 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r
677 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r
678 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r
679 EFI_ADD_IO_SPACE AddIoSpace;\r
680 EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r
681 EFI_FREE_IO_SPACE FreeIoSpace;\r
682 EFI_REMOVE_IO_SPACE RemoveIoSpace;\r
683 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r
684 EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r
685\r
686 //\r
687 // Dispatcher Services\r
688 //\r
689 EFI_DISPATCH Dispatch;\r
690 EFI_SCHEDULE Schedule;\r
691 EFI_TRUST Trust;\r
692 //\r
693 // Service to process a single firmware volume found in a capsule\r
694 //\r
695 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r
696} DXE_SERVICES;\r
697\r
698typedef DXE_SERVICES EFI_DXE_SERVICES;\r
699\r
700\r
701/**\r
702 The function prototype for invoking a function on an Application Processor.\r
703\r
704 This definition is used by the UEFI MP Serices Protocol, and the\r
705 PI SMM System Table.\r
706\r
707 @param[in,out] Buffer The pointer to private data buffer.\r
708**/\r
709typedef\r
710VOID\r
711(EFIAPI *EFI_AP_PROCEDURE)(\r
712 IN OUT VOID *Buffer\r
713 );\r
714\r
715#endif\r