VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Pi/PiDxeCis.h@ 105670

Last change on this file since 105670 was 105670, checked in by vboxsync, 8 months ago

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette