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