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