PiDxeCis.h

Go to the documentation of this file.
00001 /** @file
00002   Include file matches things in PI.
00003 
00004   Copyright (c) 2006 - 2008, Intel Corporation
00005   All rights reserved. This program and the accompanying materials
00006   are licensed and made available under the terms and conditions of the BSD License
00007   which accompanies this distribution.  The full text of the license may be found at
00008   http://opensource.org/licenses/bsd-license.php
00009 
00010   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00011   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00012 
00013   @par Revision Reference:
00014   PI Version 1.0
00015 
00016 **/
00017 
00018 #ifndef __PI_DXECIS_H__
00019 #define __PI_DXECIS_H__
00020 
00021 #include <gpxe/efi/Pi/PiMultiPhase.h>
00022 
00023 ///
00024 /// Global Coherencey Domain types - Memory type
00025 ///
00026 typedef enum {
00027   EfiGcdMemoryTypeNonExistent,
00028   EfiGcdMemoryTypeReserved,
00029   EfiGcdMemoryTypeSystemMemory,
00030   EfiGcdMemoryTypeMemoryMappedIo,
00031   EfiGcdMemoryTypeMaximum
00032 } EFI_GCD_MEMORY_TYPE;
00033 
00034 ///
00035 /// Global Coherencey Domain types - IO type
00036 ///
00037 typedef enum {
00038   EfiGcdIoTypeNonExistent,
00039   EfiGcdIoTypeReserved,
00040   EfiGcdIoTypeIo,
00041   EfiGcdIoTypeMaximum
00042 } EFI_GCD_IO_TYPE;
00043 
00044 ///
00045 /// The type of allocation to perform.
00046 ///
00047 typedef enum {
00048   EfiGcdAllocateAnySearchBottomUp,
00049   EfiGcdAllocateMaxAddressSearchBottomUp,
00050   EfiGcdAllocateAddress,
00051   EfiGcdAllocateAnySearchTopDown,
00052   EfiGcdAllocateMaxAddressSearchTopDown,
00053   EfiGcdMaxAllocateType
00054 } EFI_GCD_ALLOCATE_TYPE;
00055 
00056 ///
00057 /// EFI_GCD_MEMORY_SPACE_DESCRIPTOR
00058 ///
00059 typedef struct {
00060   ///
00061   /// The physical address of the first byte in the memory region. Type
00062   /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
00063   /// description in the UEFI 2.0 specification
00064   ///
00065   EFI_PHYSICAL_ADDRESS  BaseAddress;
00066 
00067   ///
00068   /// The number of bytes in the memory region.
00069   ///
00070   UINT64                Length;
00071 
00072   ///
00073   /// The bit mask of attributes that the memory region is capable of supporting. The bit
00074   /// mask of available attributes is defined in the GetMemoryMap() function description
00075   /// in the UEFI 2.0 specification.
00076   ///
00077   UINT64                Capabilities;
00078   ///
00079   /// The bit mask of attributes that the memory region is currently using. The bit mask of
00080   /// available attributes is defined in GetMemoryMap().
00081   ///
00082   UINT64                Attributes;
00083   ///
00084   /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the
00085   /// AddMemorySpace() function description
00086   ///
00087   EFI_GCD_MEMORY_TYPE   GcdMemoryType;
00088 
00089   ///
00090   /// The image handle of the agent that allocated the memory resource described by
00091   /// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory
00092   /// resource is not currently allocated. Type EFI_HANDLE is defined in
00093   /// InstallProtocolInterface() in the UEFI 2.0 specification.
00094   ///
00095   EFI_HANDLE            ImageHandle;
00096 
00097   ///
00098   /// The device handle for which the memory resource has been allocated. If
00099   /// ImageHandle is NULL, then the memory resource is not currently allocated. If this
00100   /// field is NULL, then the memory resource is not associated with a device that is
00101   /// described by a device handle. Type EFI_HANDLE is defined in
00102   /// InstallProtocolInterface() in the UEFI 2.0 specification.
00103   ///
00104   EFI_HANDLE            DeviceHandle;
00105 } EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
00106 
00107 ///
00108 /// EFI_GCD_IO_SPACE_DESCRIPTOR
00109 ///
00110 typedef struct {
00111   ///
00112   /// Physical address of the first byte in the I/O region. Type
00113   /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
00114   /// description in the UEFI 2.0 specification.
00115   ///
00116   EFI_PHYSICAL_ADDRESS  BaseAddress;
00117 
00118   ///
00119   /// Number of bytes in the I/O region.
00120   ///
00121   UINT64                Length;
00122 
00123   ///
00124   /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the
00125   /// AddIoSpace() function description.
00126   ///
00127   EFI_GCD_IO_TYPE       GcdIoType;
00128 
00129   ///
00130   /// The image handle of the agent that allocated the I/O resource described by
00131   /// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O
00132   /// resource is not currently allocated. Type EFI_HANDLE is defined in
00133   /// InstallProtocolInterface() in the UEFI 2.0 specification.
00134   ///
00135   EFI_HANDLE            ImageHandle;
00136 
00137   ///
00138   /// The device handle for which the I/O resource has been allocated. If ImageHandle
00139   /// is NULL, then the I/O resource is not currently allocated. If this field is NULL, then
00140   /// the I/O resource is not associated with a device that is described by a device handle.
00141   /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI
00142   /// 2.0 specification.
00143   ///
00144   EFI_HANDLE            DeviceHandle;
00145 } EFI_GCD_IO_SPACE_DESCRIPTOR;
00146 
00147 
00148 /**
00149   Adds reserved memory, system memory, or memory-mapped I/O resources to the
00150   global coherency domain of the processor.
00151 
00152   @param  GcdMemoryType    The type of memory resource being added.
00153   @param  BaseAddress      The physical address that is the start address
00154                            of the memory resource being added.
00155   @param  Length           The size, in bytes, of the memory resource that
00156                            is being added.
00157   @param  Capabilities     The bit mask of attributes that the memory
00158                            resource region supports.
00159 
00160   @retval EFI_SUCCESS            The memory resource was added to the global
00161                                  coherency domain of the processor.
00162   @retval EFI_INVALID_PARAMETER  GcdMemoryType is invalid.
00163   @retval EFI_INVALID_PARAMETER  Length is zero.
00164   @retval EFI_OUT_OF_RESOURCES   There are not enough system resources to add
00165                                  the memory resource to the global coherency
00166                                  domain of the processor.
00167   @retval EFI_UNSUPPORTED        The processor does not support one or more bytes
00168                                  of the memory resource range specified by
00169                                  BaseAddress and Length.
00170   @retval EFI_ACCESS_DENIED      One or more bytes of the memory resource range
00171                                  specified by BaseAddress and Length conflicts
00172                                  with a memory resource range that was previously
00173                                  added to the global coherency domain of the processor.
00174   @retval EFI_ACCESS_DENIED      One or more bytes of the memory resource range
00175                                  specified by BaseAddress and Length was allocated
00176                                  in a prior call to AllocateMemorySpace()..
00177 
00178 **/
00179 typedef
00180 EFI_STATUS
00181 (EFIAPI *EFI_ADD_MEMORY_SPACE)(
00182   IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,
00183   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00184   IN UINT64                Length,
00185   IN UINT64                Capabilities
00186   );
00187 
00188 /**
00189   Allocates nonexistent memory, reserved memory, system memory, or memorymapped
00190   I/O resources from the global coherency domain of the processor.
00191 
00192   @param  GcdAllocateType  The type of allocation to perform.
00193   @param  GcdMemoryType    The type of memory resource being allocated.
00194   @param  Alignment        The log base 2 of the boundary that BaseAddress must
00195                            be aligned on output. Align with 2^Alignment.
00196   @param  Length           The size in bytes of the memory resource range that
00197                            is being allocated.
00198   @param  BaseAddress      A pointer to a physical address to allocate.
00199   @param  Imagehandle      The image handle of the agent that is allocating
00200                            the memory resource.
00201   @param  DeviceHandle     The device handle for which the memory resource
00202                            is being allocated.
00203 
00204   @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.
00205   @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.
00206   @retval EFI_INVALID_PARAMETER Length is zero.
00207   @retval EFI_INVALID_PARAMETER BaseAddress is NULL.
00208   @retval EFI_INVALID_PARAMETER ImageHandle is NULL.
00209   @retval EFI_NOT_FOUND         The memory resource request could not be satisfied.
00210                                 No descriptor contains the desired space.
00211   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to allocate the memory
00212                                 resource from the global coherency domain of the processor.
00213   @retval EFI_SUCCESS           The memory resource was allocated from the global coherency
00214                                 domain of the processor.
00215 
00216 
00217 **/
00218 typedef
00219 EFI_STATUS
00220 (EFIAPI *EFI_ALLOCATE_MEMORY_SPACE)(
00221   IN     EFI_GCD_ALLOCATE_TYPE               GcdAllocateType,
00222   IN     EFI_GCD_MEMORY_TYPE                 GcdMemoryType,
00223   IN     UINTN                               Alignment,
00224   IN     UINT64                              Length,
00225   IN OUT EFI_PHYSICAL_ADDRESS                *BaseAddress,
00226   IN     EFI_HANDLE                          ImageHandle,
00227   IN     EFI_HANDLE                          DeviceHandle OPTIONAL
00228   );
00229 
00230 /**
00231   Frees nonexistent memory, reserved memory, system memory, or memory-mapped
00232   I/O resources from the global coherency domain of the processor.
00233 
00234   @param  BaseAddress      The physical address that is the start address of the memory resource being freed.
00235   @param  Length           The size in bytes of the memory resource range that is being freed.
00236 
00237   @retval EFI_SUCCESS           The memory resource was freed from the global coherency domain of
00238                                 the processor.
00239   @retval EFI_INVALID_PARAMETER Length is zero.
00240   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory
00241                                 resource range specified by BaseAddress and Length.
00242   @retval EFI_NOT_FOUND         The memory resource range specified by BaseAddress and
00243                                 Length was not allocated with previous calls to AllocateMemorySpace().
00244   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to free the memory resource
00245                                 from the global coherency domain of the processor.
00246 
00247 **/
00248 typedef
00249 EFI_STATUS
00250 (EFIAPI *EFI_FREE_MEMORY_SPACE)(
00251   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00252   IN UINT64                Length
00253   );
00254 
00255 /**
00256   Removes reserved memory, system memory, or memory-mapped I/O resources from
00257   the global coherency domain of the processor.
00258 
00259   @param  BaseAddress      The physical address that is the start address of the memory resource being removed.
00260   @param  Length           The size in bytes of the memory resource that is being removed.
00261 
00262   @retval EFI_SUCCESS           The memory resource was removed from the global coherency
00263                                 domain of the processor.
00264   @retval EFI_INVALID_PARAMETER Length is zero.
00265   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory
00266                                 resource range specified by BaseAddress and Length.
00267   @retval EFI_NOT_FOUND         One or more bytes of the memory resource range specified by
00268                                 BaseAddress and Length was not added with previous calls to
00269                                 AddMemorySpace().
00270   @retval EFI_ACCESS_DEFINED    One or more bytes of the memory resource range specified by
00271                                 BaseAddress and Length has been allocated with AllocateMemorySpace().
00272   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to remove the memory
00273                                 resource from the global coherency domain of the processor.
00274 
00275 **/
00276 typedef
00277 EFI_STATUS
00278 (EFIAPI *EFI_REMOVE_MEMORY_SPACE)(
00279   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00280   IN UINT64                Length
00281   );
00282 
00283 /**
00284   Retrieves the descriptor for a memory region containing a specified address.
00285 
00286   @param  BaseAddress      The physical address that is the start address of a memory region.
00287   @param  Descriptor       A pointer to a caller allocated descriptor.
00288 
00289   @retval EFI_SUCCESS           The descriptor for the memory resource region containing
00290                                 BaseAddress was returned in Descriptor.
00291   @retval EFI_INVALID_PARAMETER Descriptor is NULL.
00292   @retval EFI_NOT_FOUND         A memory resource range containing BaseAddress was not found.
00293 
00294 **/
00295 typedef
00296 EFI_STATUS
00297 (EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR)(
00298   IN  EFI_PHYSICAL_ADDRESS             BaseAddress,
00299   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor
00300   );
00301 
00302 /**
00303   Modifies the attributes for a memory region in the global coherency domain of the
00304   processor.
00305 
00306   @param  BaseAddress      The physical address that is the start address of a memory region.
00307   @param  Length           The size in bytes of the memory region.
00308   @param  Attributes       The bit mask of attributes to set for the memory region.
00309 
00310   @retval EFI_SUCCESS           The attributes were set for the memory region.
00311   @retval EFI_INVALID_PARAMETER Length is zero.
00312   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory
00313                                 resource range specified by BaseAddress and Length.
00314   @retval EFI_UNSUPPORTED       The bit mask of attributes is not support for the memory resource
00315                                 range specified by BaseAddress and Length.
00316   @retval EFI_ACCESS_DEFINED    The attributes for the memory resource range specified by
00317                                 BaseAddress and Length cannot be modified.
00318   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the attributes of
00319                                 the memory resource range.
00320 
00321 **/
00322 typedef
00323 EFI_STATUS
00324 (EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(
00325   IN EFI_PHYSICAL_ADDRESS         BaseAddress,
00326   IN UINT64                       Length,
00327   IN UINT64                       Attributes
00328   );
00329 
00330 /**
00331   Returns a map of the memory resources in the global coherency domain of the
00332   processor.
00333 
00334   @param  NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.
00335   @param  MemorySpaceMap      A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.
00336 
00337   @retval EFI_SUCCESS           The memory space map was returned in the MemorySpaceMap
00338                                 buffer, and the number of descriptors in MemorySpaceMap was
00339                                 returned in NumberOfDescriptors.
00340   @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.
00341   @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.
00342   @retval EFI_OUT_OF_RESOURCES  There are not enough resources to allocate MemorySpaceMap.
00343 
00344 **/
00345 typedef
00346 EFI_STATUS
00347 (EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(
00348   OUT UINTN                            *NumberOfDescriptors,
00349   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  **MemorySpaceMap
00350   );
00351 
00352 /**
00353   Adds reserved I/O or I/O resources to the global coherency domain of the processor.
00354 
00355   @param  GcdIoType        The type of I/O resource being added.
00356   @param  BaseAddress      The physical address that is the start address of the I/O resource being added.
00357   @param  Length           The size in bytes of the I/O resource that is being added.
00358 
00359   @retval EFI_SUCCESS           The I/O resource was added to the global coherency domain of
00360                                 the processor.
00361   @retval EFI_INVALID_PARAMETER GcdIoType is invalid.
00362   @retval EFI_INVALID_PARAMETER Length is zero.
00363   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to add the I/O resource to
00364                                 the global coherency domain of the processor.
00365   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O
00366                                 resource range specified by BaseAddress and Length.
00367   @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by
00368                                 BaseAddress and Length conflicts with an I/O resource
00369                                 range that was previously added to the global coherency domain
00370                                 of the processor.
00371   @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by
00372                                 BaseAddress and Length was allocated in a prior call to
00373                                 AllocateIoSpace().
00374 
00375 **/
00376 typedef
00377 EFI_STATUS
00378 (EFIAPI *EFI_ADD_IO_SPACE)(
00379   IN EFI_GCD_IO_TYPE       GcdIoType,
00380   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00381   IN UINT64                Length
00382   );
00383 
00384 /**
00385   Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
00386   domain of the processor.
00387 
00388   @param  GcdAllocateType  The type of allocation to perform.
00389   @param  GcdIoType        The type of I/O resource being allocated.
00390   @param  Alignment        The log base 2 of the boundary that BaseAddress must be aligned on output.
00391   @param  Length           The size in bytes of the I/O resource range that is being allocated.
00392   @param  BaseAddress      A pointer to a physical address.
00393   @param  Imagehandle      The image handle of the agent that is allocating the I/O resource.
00394   @param  DeviceHandle     The device handle for which the I/O resource is being allocated.
00395 
00396   @retval EFI_SUCCESS           The I/O resource was allocated from the global coherency domain
00397                                 of the processor.
00398   @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.
00399   @retval EFI_INVALID_PARAMETER GcdIoType is invalid.
00400   @retval EFI_INVALID_PARAMETER Length is zero.
00401   @retval EFI_INVALID_PARAMETER BaseAddress is NULL.
00402   @retval EFI_INVALID_PARAMETER ImageHandle is NULL.
00403   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to allocate the I/O
00404                                 resource from the global coherency domain of the processor.
00405   @retval EFI_NOT_FOUND         The I/O resource request could not be satisfied.
00406 
00407 **/
00408 typedef
00409 EFI_STATUS
00410 (EFIAPI *EFI_ALLOCATE_IO_SPACE)(
00411   IN     EFI_GCD_ALLOCATE_TYPE               GcdAllocateType,
00412   IN     EFI_GCD_IO_TYPE                     GcdIoType,
00413   IN     UINTN                               Alignment,
00414   IN     UINT64                              Length,
00415   IN OUT EFI_PHYSICAL_ADDRESS                *BaseAddress,
00416   IN     EFI_HANDLE                          ImageHandle,
00417   IN     EFI_HANDLE                          DeviceHandle OPTIONAL
00418   );
00419 
00420 /**
00421   Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
00422   domain of the processor.
00423 
00424   @param  BaseAddress      The physical address that is the start address of the I/O resource being freed.
00425   @param  Length           The size in bytes of the I/O resource range that is being freed.
00426 
00427   @retval EFI_SUCCESS           The I/O resource was freed from the global coherency domain of the
00428                                 processor.
00429   @retval EFI_INVALID_PARAMETER Length is zero.
00430   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O resource
00431                                 range specified by BaseAddress and Length.
00432   @retval EFI_NOT_FOUND         The I/O resource range specified by BaseAddress and Length
00433                                 was not allocated with previous calls to AllocateIoSpace().
00434   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to free the I/O resource from
00435                                 the global coherency domain of the processor.
00436 
00437 **/
00438 typedef
00439 EFI_STATUS
00440 (EFIAPI *EFI_FREE_IO_SPACE)(
00441   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00442   IN UINT64                Length
00443   );
00444 
00445 /**
00446   Removes reserved I/O or I/O resources from the global coherency domain of the
00447   processor.
00448 
00449   @param  BaseAddress      A pointer to a physical address that is the start address of the I/O resource being
00450                            removed.
00451   @param Length            The size in bytes of the I/O resource that is being removed.
00452 
00453   @retval EFI_SUCCESS           The I/O resource was removed from the global coherency domain
00454                                 of the processor.
00455   @retval EFI_INVALID_PARAMETER Length is zero.
00456   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O
00457                                 resource range specified by BaseAddress and Length.
00458   @retval EFI_NOT_FOUND         One or more bytes of the I/O resource range specified by
00459                                 BaseAddress and Length was not added with previous
00460                                 calls to AddIoSpace().
00461   @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by
00462                                 BaseAddress and Length has been allocated with
00463                                 AllocateIoSpace().
00464   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to remove the I/O
00465                                 resource from the global coherency domain of the processor.
00466 
00467 **/
00468 typedef
00469 EFI_STATUS
00470 (EFIAPI *EFI_REMOVE_IO_SPACE)(
00471   IN EFI_PHYSICAL_ADDRESS  BaseAddress,
00472   IN UINT64                Length
00473   );
00474 
00475 /**
00476   Retrieves the descriptor for an I/O region containing a specified address.
00477 
00478   @param  BaseAddress      The physical address that is the start address of an I/O region.
00479   @param  Descriptor       A pointer to a caller allocated descriptor.
00480 
00481   @retval EFI_SUCCESS           The descriptor for the I/O resource region containing
00482                                 BaseAddress was returned in Descriptor.
00483   @retval EFI_INVALID_PARAMETER Descriptor is NULL.
00484   @retval EFI_NOT_FOUND         An I/O resource range containing BaseAddress was not found.
00485 
00486 **/
00487 typedef
00488 EFI_STATUS
00489 (EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(
00490   IN  EFI_PHYSICAL_ADDRESS         BaseAddress,
00491   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor
00492   );
00493 
00494 /**
00495   Returns a map of the I/O resources in the global coherency domain of the processor.
00496 
00497   @param  NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.
00498   @param  MemorySpaceMap      A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.
00499 
00500   @retval EFI_SUCCESS           The I/O space map was returned in the IoSpaceMap buffer, and
00501                                 the number of descriptors in IoSpaceMap was returned in
00502                                 NumberOfDescriptors.
00503   @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.
00504   @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.
00505   @retval EFI_OUT_OF_RESOURCES  There are not enough resources to allocate IoSpaceMap.
00506 
00507 
00508 **/
00509 typedef
00510 EFI_STATUS
00511 (EFIAPI *EFI_GET_IO_SPACE_MAP)(
00512   OUT UINTN                        *NumberOfDescriptors,
00513   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap
00514   );
00515 
00516 
00517 
00518 /**
00519   Loads and executed DXE drivers from firmware volumes.
00520 
00521   The Dispatch() function searches for DXE drivers in firmware volumes that have been
00522   installed since the last time the Dispatch() service was called. It then evaluates
00523   the dependency expressions of all the DXE drivers and loads and executes those DXE
00524   drivers whose dependency expression evaluate to TRUE. This service must interact with
00525   the Security Architectural Protocol to authenticate DXE drivers before they are executed.
00526   This process is continued until no more DXE drivers can be executed.
00527 
00528   @retval EFI_SUCCESS         One or more DXE driver were dispatched.
00529   @retval EFI_NOT_FOUND       No DXE drivers were dispatched.
00530   @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.
00531                               Thus no action was taken.
00532 
00533 **/
00534 typedef
00535 EFI_STATUS
00536 (EFIAPI *EFI_DISPATCH)(
00537   VOID
00538   );
00539 
00540 /**
00541   Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
00542 
00543   @param  FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
00544   @param  FileName             A pointer to the name of the file in a firmware volume.
00545 
00546   @retval EFI_SUCCESS         The DXE driver was found and its SOR bit was cleared.
00547   @retval EFI_NOT_FOUND       The DXE driver does not exist, or the DXE driver exists and its SOR
00548                               bit is not set.
00549 
00550 **/
00551 typedef
00552 EFI_STATUS
00553 (EFIAPI *EFI_SCHEDULE)(
00554   IN EFI_HANDLE  FirmwareVolumeHandle,
00555   IN CONST EFI_GUID    *FileName
00556   );
00557 
00558 /**
00559   Promotes a file stored in a firmware volume from the untrusted to the trusted state.
00560 
00561   @param  FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
00562   @param  DriverName           A pointer to the name of the file in a firmware volume.
00563 
00564   @return Status of promoting FFS from untrusted to trusted
00565           state.
00566   @retval EFI_NOT_FOUND       The file was not found in the untrusted state.
00567 
00568 **/
00569 typedef
00570 EFI_STATUS
00571 (EFIAPI *EFI_TRUST)(
00572   IN EFI_HANDLE  FirmwareVolumeHandle,
00573   IN CONST EFI_GUID    *FileName
00574   );
00575 
00576 /**
00577   Creates a firmware volume handle for a firmware volume that is present in system memory.
00578 
00579   @param  FirmwareVolumeHeader A pointer to the header of the firmware volume.
00580   @param  Size                 The size, in bytes, of the firmware volume.
00581   @param  FirmwareVolumeHandle On output, a pointer to the created handle.
00582 
00583   @retval EFI_SUCCESS          The EFI_FIRMWARE_VOLUME_PROTOCOL and
00584                                EFI_DEVICE_PATH_PROTOCOL were installed onto
00585                                FirmwareVolumeHandle for the firmware volume described
00586                                by FirmwareVolumeHeader and Size.
00587   @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader
00588                                and Size is corrupted.
00589   @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the
00590                                EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL
00591                                for the firmware volume described by FirmwareVolumeHeader and Size.
00592 
00593 **/
00594 typedef
00595 EFI_STATUS
00596 (EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(
00597   IN CONST VOID                       *FirmwareVolumeHeader,
00598   IN UINTN                            Size,
00599   OUT EFI_HANDLE                      *FirmwareVolumeHandle
00600   );
00601 
00602 //
00603 // DXE Services Table
00604 //
00605 #define DXE_SERVICES_SIGNATURE  0x565245535f455844ULL
00606 #define DXE_SERVICES_REVISION   ((1<<16) | (00))
00607 
00608 typedef struct {
00609   EFI_TABLE_HEADER                Hdr;
00610 
00611   //
00612   // Global Coherency Domain Services
00613   //
00614   EFI_ADD_MEMORY_SPACE            AddMemorySpace;
00615   EFI_ALLOCATE_MEMORY_SPACE       AllocateMemorySpace;
00616   EFI_FREE_MEMORY_SPACE           FreeMemorySpace;
00617   EFI_REMOVE_MEMORY_SPACE         RemoveMemorySpace;
00618   EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;
00619   EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;
00620   EFI_GET_MEMORY_SPACE_MAP        GetMemorySpaceMap;
00621   EFI_ADD_IO_SPACE                AddIoSpace;
00622   EFI_ALLOCATE_IO_SPACE           AllocateIoSpace;
00623   EFI_FREE_IO_SPACE               FreeIoSpace;
00624   EFI_REMOVE_IO_SPACE             RemoveIoSpace;
00625   EFI_GET_IO_SPACE_DESCRIPTOR     GetIoSpaceDescriptor;
00626   EFI_GET_IO_SPACE_MAP            GetIoSpaceMap;
00627 
00628   //
00629   // Dispatcher Services
00630   //
00631   EFI_DISPATCH                    Dispatch;
00632   EFI_SCHEDULE                    Schedule;
00633   EFI_TRUST                       Trust;
00634   //
00635   // Service to process a single firmware volume found in a capsule
00636   //
00637   EFI_PROCESS_FIRMWARE_VOLUME     ProcessFirmwareVolume;
00638 } DXE_SERVICES;
00639 
00640 typedef DXE_SERVICES EFI_DXE_SERVICES;
00641 
00642 #endif

Generated on Tue Apr 6 20:01:07 2010 for gPXE by  doxygen 1.5.7.1