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