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