]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiDxeCis.h
Add EFI_DISPOSABLE_SECTION type defined in PI 1.2 specification.
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
index cfcefb9857db106e1646f714458b57d7a3e52453..9ed4da661ad868b7a2f77e05facc27193f913b00 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Include file matches things in PI.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   @par Revision Reference:\r
-  Version 1.0.\r
+  PI Version 1.0\r
 \r
 **/\r
 \r
 #ifndef __PI_DXECIS_H__\r
 #define __PI_DXECIS_H__\r
 \r
+#include <Uefi/UefiMultiPhase.h>\r
 #include <Pi/PiMultiPhase.h>\r
 \r
 ///\r
 /// Global Coherencey Domain types - Memory type\r
 ///\r
 typedef enum {\r
+  ///\r
+  /// A memory region that is visible to the boot processor. However, there are no system\r
+  /// components that are currently decoding this memory region.\r
+  ///\r
   EfiGcdMemoryTypeNonExistent,\r
+  ///\r
+  /// A memory region that is visible to the boot processor. This memory region is being\r
+  /// decoded by a system component, but the memory region is not considered to be either\r
+  /// system memory or memory-mapped I/O.\r
+  ///\r
   EfiGcdMemoryTypeReserved,\r
+  ///\r
+  /// A memory region that is visible to the boot processor. A memory controller is\r
+  /// currently decoding this memory region and the memory controller is producing a\r
+  /// tested system memory region that is available to the memory services.\r
+  ///\r
   EfiGcdMemoryTypeSystemMemory,\r
+  ///\r
+  /// A memory region that is visible to the boot processor. This memory region is\r
+  /// currently being decoded by a component as memory-mapped I/O that can be used to\r
+  /// access I/O devices in the platform.\r
+  ///\r
   EfiGcdMemoryTypeMemoryMappedIo,\r
   EfiGcdMemoryTypeMaximum\r
 } EFI_GCD_MEMORY_TYPE;\r
@@ -35,8 +55,20 @@ typedef enum {
 /// Global Coherencey Domain types - IO type\r
 ///\r
 typedef enum {\r
+  ///\r
+  /// An I/O region that is visible to the boot processor. However, there are no system\r
+  /// components that are currently decoding this I/O region.\r
+  ///\r
   EfiGcdIoTypeNonExistent,\r
+  ///\r
+  /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
+  /// decoded by a system component, but the I/O region cannot be used to access I/O devices.\r
+  ///\r
   EfiGcdIoTypeReserved,\r
+  ///\r
+  /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
+  /// decoded by a system component that is producing I/O ports that can be used to access I/O devices.\r
+  ///\r
   EfiGcdIoTypeIo,\r
   EfiGcdIoTypeMaximum\r
 } EFI_GCD_IO_TYPE;\r
@@ -45,10 +77,30 @@ typedef enum {
 /// The type of allocation to perform.\r
 /// \r
 typedef enum {\r
+  ///\r
+  /// The GCD memory space map is searched from the lowest address up to the highest address\r
+  /// looking for unallocated memory ranges.\r
+  ///\r
   EfiGcdAllocateAnySearchBottomUp,\r
+  ///\r
+  /// The GCD memory space map is searched from the lowest address up \r
+  /// to the specified MaxAddress looking for unallocated memory ranges.\r
+  ///\r
   EfiGcdAllocateMaxAddressSearchBottomUp,\r
+  ///\r
+  /// The GCD memory space map is checked to see if the memory range starting \r
+  /// at the specified Address is available.\r
+  ///\r
   EfiGcdAllocateAddress,\r
+  ///\r
+  /// The GCD memory space map is searched from the highest address down to the lowest address \r
+  /// looking for unallocated memory ranges.\r
+  ///\r
   EfiGcdAllocateAnySearchTopDown,\r
+  ///\r
+  /// The GCD memory space map is searched from the specified MaxAddress \r
+  /// down to the lowest address looking for unallocated memory ranges.\r
+  ///\r
   EfiGcdAllocateMaxAddressSearchTopDown,\r
   EfiGcdMaxAllocateType\r
 } EFI_GCD_ALLOCATE_TYPE;\r
@@ -115,7 +167,9 @@ typedef struct {
   /// \r
   EFI_PHYSICAL_ADDRESS  BaseAddress;\r
 \r
+  ///\r
   /// Number of bytes in the I/O region.\r
+  ///\r
   UINT64                Length;\r
 \r
   /// \r
@@ -147,12 +201,31 @@ typedef struct {
   Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
   global coherency domain of the processor.\r
 \r
-  @param  GcdMemoryType    Memory type of the memory space.\r
-  @param  BaseAddress      Base address of the memory space.\r
-  @param  Length           Length of the memory space.\r
-  @param  Capabilities     alterable attributes of the memory space.\r
-\r
-  @retval EFI_SUCCESS           Merged this memory space into GCD map.\r
+  @param  GcdMemoryType    The type of memory resource being added.\r
+  @param  BaseAddress      The physical address that is the start address\r
+                           of the memory resource being added.\r
+  @param  Length           The size, in bytes, of the memory resource that\r
+                           is being added.\r
+  @param  Capabilities     The bit mask of attributes that the memory \r
+                           resource region supports.\r
+\r
+  @retval EFI_SUCCESS            The memory resource was added to the global\r
+                                 coherency domain of the processor.\r
+  @retval EFI_INVALID_PARAMETER  GcdMemoryType is invalid.\r
+  @retval EFI_INVALID_PARAMETER  Length is zero.\r
+  @retval EFI_OUT_OF_RESOURCES   There are not enough system resources to add\r
+                                 the memory resource to the global coherency \r
+                                 domain of the processor.\r
+  @retval EFI_UNSUPPORTED        The processor does not support one or more bytes\r
+                                 of the memory resource range specified by \r
+                                 BaseAddress and Length.\r
+  @retval EFI_ACCESS_DENIED      One or more bytes of the memory resource range\r
+                                 specified by BaseAddress and Length conflicts \r
+                                 with a memory resource range that was previously\r
+                                 added to the global coherency domain of the processor.\r
+  @retval EFI_ACCESS_DENIED      One or more bytes of the memory resource range\r
+                                 specified by BaseAddress and Length was allocated\r
+                                 in a prior call to AllocateMemorySpace()..\r
 \r
 **/\r
 typedef\r
@@ -162,24 +235,36 @@ EFI_STATUS
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length,\r
   IN UINT64                Capabilities\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
   I/O resources from the global coherency domain of the processor.\r
 \r
-  @param  GcdAllocateType  The type of allocate operation\r
-  @param  GcdMemoryType    The desired memory type\r
-  @param  Alignment        Align with 2^Alignment\r
-  @param  Length           Length to allocate\r
-  @param  BaseAddress      Base address to allocate\r
-  @param  Imagehandle      The image handle consume the allocated space.\r
-  @param  DeviceHandle     The device handle consume the allocated space.\r
+  @param  GcdAllocateType  The type of allocation to perform.\r
+  @param  GcdMemoryType    The type of memory resource being allocated.\r
+  @param  Alignment        The log base 2 of the boundary that BaseAddress must\r
+                           be aligned on output. Align with 2^Alignment.\r
+  @param  Length           The size in bytes of the memory resource range that\r
+                           is being allocated.\r
+  @param  BaseAddress      A pointer to a physical address to allocate.\r
+  @param  Imagehandle      The image handle of the agent that is allocating \r
+                           the memory resource.\r
+  @param  DeviceHandle     The device handle for which the memory resource\r
+                           is being allocated.\r
+\r
+  @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r
+  @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.\r
+  @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r
+  @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r
+  @retval EFI_NOT_FOUND         The memory resource request could not be satisfied.\r
+                                No descriptor contains the desired space.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to allocate the memory\r
+                                resource from the global coherency domain of the processor.\r
+  @retval EFI_SUCCESS           The memory resource was allocated from the global coherency\r
+                                domain of the processor.\r
 \r
-  @retval EFI_INVALID_PARAMETER Invalid parameter.\r
-  @retval EFI_NOT_FOUND         No descriptor contains the desired space.\r
-  @retval EFI_SUCCESS           Memory space successfully allocated.\r
 \r
 **/\r
 typedef\r
@@ -192,17 +277,24 @@ EFI_STATUS
   IN OUT EFI_PHYSICAL_ADDRESS                *BaseAddress,\r
   IN     EFI_HANDLE                          ImageHandle,\r
   IN     EFI_HANDLE                          DeviceHandle OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
   I/O resources from the global coherency domain of the processor.\r
 \r
-  @param  BaseAddress      Base address of the segment.\r
-  @param  Length           Length of the segment.\r
+  @param  BaseAddress      The physical address that is the start address of the memory resource being freed.\r
+  @param  Length           The size in bytes of the memory resource range that is being freed.\r
 \r
-  @retval EFI_SUCCESS           Space successfully freed.\r
+  @retval EFI_SUCCESS           The memory resource was freed from the global coherency domain of\r
+                                the processor.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.   \r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory\r
+                                resource range specified by BaseAddress and Length.\r
+  @retval EFI_NOT_FOUND         The memory resource range specified by BaseAddress and\r
+                                Length was not allocated with previous calls to AllocateMemorySpace().\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to free the memory resource\r
+                                from the global coherency domain of the processor.\r
 \r
 **/\r
 typedef\r
@@ -210,17 +302,27 @@ EFI_STATUS
 (EFIAPI *EFI_FREE_MEMORY_SPACE)(\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Removes reserved memory, system memory, or memory-mapped I/O resources from\r
   the global coherency domain of the processor.\r
 \r
-  @param  BaseAddress      Base address of the memory space.\r
-  @param  Length           Length of the memory space.\r
-\r
-  @retval EFI_SUCCESS           Successfully remove a segment of memory space.\r
+  @param  BaseAddress      The physical address that is the start address of the memory resource being removed.\r
+  @param  Length           The size in bytes of the memory resource that is being removed.\r
+\r
+  @retval EFI_SUCCESS           The memory resource was removed from the global coherency\r
+                                domain of the processor.\r
+  @retval EFI_INVALID_PARAMETER Length is zero. \r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory\r
+                                resource range specified by BaseAddress and Length.\r
+  @retval EFI_NOT_FOUND         One or more bytes of the memory resource range specified by\r
+                                BaseAddress and Length was not added with previous calls to\r
+                                AddMemorySpace().\r
+  @retval EFI_ACCESS_DEFINED    One or more bytes of the memory resource range specified by\r
+                                BaseAddress and Length has been allocated with AllocateMemorySpace().\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to remove the memory\r
+                                resource from the global coherency domain of the processor.\r
 \r
 **/\r
 typedef\r
@@ -228,17 +330,18 @@ EFI_STATUS
 (EFIAPI *EFI_REMOVE_MEMORY_SPACE)(\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Retrieves the descriptor for a memory region containing a specified address.\r
 \r
-  @param  BaseAddress      Specified start address\r
-  @param  Descriptor       Specified length\r
+  @param  BaseAddress      The physical address that is the start address of a memory region.\r
+  @param  Descriptor       A pointer to a caller allocated descriptor.\r
 \r
-  @retval EFI_INVALID_PARAMETER Invalid parameter\r
-  @retval EFI_SUCCESS           Successfully get memory space descriptor.\r
+  @retval EFI_SUCCESS           The descriptor for the memory resource region containing\r
+                                BaseAddress was returned in Descriptor.\r
+  @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
+  @retval EFI_NOT_FOUND         A memory resource range containing BaseAddress was not found.\r
 \r
 **/\r
 typedef\r
@@ -246,18 +349,26 @@ EFI_STATUS
 (EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR)(\r
   IN  EFI_PHYSICAL_ADDRESS             BaseAddress,\r
   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Modifies the attributes for a memory region in the global coherency domain of the\r
   processor.\r
 \r
-  @param  BaseAddress      Specified start address\r
-  @param  Length           Specified length\r
-  @param  Attributes       Specified attributes\r
-\r
-  @retval EFI_SUCCESS           Successfully set attribute of a segment of memory space.\r
+  @param  BaseAddress      The physical address that is the start address of a memory region.\r
+  @param  Length           The size in bytes of the memory region.\r
+  @param  Attributes       The bit mask of attributes to set for the memory region.\r
+\r
+  @retval EFI_SUCCESS           The attributes were set for the memory region.\r
+  @retval EFI_INVALID_PARAMETER Length is zero. \r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory\r
+                                resource range specified by BaseAddress and Length.\r
+  @retval EFI_UNSUPPORTED       The bit mask of attributes is not support for the memory resource\r
+                                range specified by BaseAddress and Length.\r
+  @retval EFI_ACCESS_DEFINED    The attributes for the memory resource range specified by\r
+                                BaseAddress and Length cannot be modified.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the attributes of\r
+                                the memory resource range.\r
 \r
 **/\r
 typedef\r
@@ -266,19 +377,21 @@ EFI_STATUS
   IN EFI_PHYSICAL_ADDRESS         BaseAddress,\r
   IN UINT64                       Length,\r
   IN UINT64                       Attributes\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Returns a map of the memory resources in the global coherency domain of the\r
   processor.\r
 \r
-  @param  NumberOfDescriptors Number of descriptors.\r
-  @param  MemorySpaceMap      Descriptor array\r
+  @param  NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.\r
+  @param  MemorySpaceMap      A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.\r
 \r
-  @retval EFI_INVALID_PARAMETER Invalid parameter\r
-  @retval EFI_OUT_OF_RESOURCES  No enough buffer to allocate\r
-  @retval EFI_SUCCESS           Successfully get memory space map.\r
+  @retval EFI_SUCCESS           The memory space map was returned in the MemorySpaceMap\r
+                                buffer, and the number of descriptors in MemorySpaceMap was\r
+                                returned in NumberOfDescriptors.\r
+  @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
+  @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to allocate MemorySpaceMap.\r
 \r
 **/\r
 typedef\r
@@ -286,17 +399,30 @@ EFI_STATUS
 (EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(\r
   OUT UINTN                            *NumberOfDescriptors,\r
   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  **MemorySpaceMap\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
 \r
-  @param  GcdIoType        IO type of the segment.\r
-  @param  BaseAddress      Base address of the segment.\r
-  @param  Length           Length of the segment.\r
-\r
-  @retval EFI_SUCCESS           Merged this segment into GCD map.\r
+  @param  GcdIoType        The type of I/O resource being added.\r
+  @param  BaseAddress      The physical address that is the start address of the I/O resource being added.\r
+  @param  Length           The size in bytes of the I/O resource that is being added.\r
+\r
+  @retval EFI_SUCCESS           The I/O resource was added to the global coherency domain of\r
+                                the processor.\r
+  @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to add the I/O resource to\r
+                                the global coherency domain of the processor.\r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O\r
+                                resource range specified by BaseAddress and Length.\r
+  @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by\r
+                                BaseAddress and Length conflicts with an I/O resource\r
+                                range that was previously added to the global coherency domain\r
+                                of the processor.\r
+  @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by\r
+                                BaseAddress and Length was allocated in a prior call to\r
+                                AllocateIoSpace().\r
 \r
 **/\r
 typedef\r
@@ -305,24 +431,30 @@ EFI_STATUS
   IN EFI_GCD_IO_TYPE       GcdIoType,\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
   domain of the processor.\r
 \r
-  @param  GcdAllocateType  The type of allocate operation\r
-  @param  GcdIoType        The desired IO type\r
-  @param  Alignment        Align with 2^Alignment\r
-  @param  Length           Length to allocate\r
-  @param  BaseAddress      Base address to allocate\r
-  @param  Imagehandle      The image handle consume the allocated space.\r
-  @param  DeviceHandle     The device handle consume the allocated space.\r
-\r
-  @retval EFI_INVALID_PARAMETER Invalid parameter.\r
-  @retval EFI_NOT_FOUND         No descriptor contains the desired space.\r
-  @retval EFI_SUCCESS           IO space successfully allocated.\r
+  @param  GcdAllocateType  The type of allocation to perform.\r
+  @param  GcdIoType        The type of I/O resource being allocated.\r
+  @param  Alignment        The log base 2 of the boundary that BaseAddress must be aligned on output.\r
+  @param  Length           The size in bytes of the I/O resource range that is being allocated.\r
+  @param  BaseAddress      A pointer to a physical address.\r
+  @param  Imagehandle      The image handle of the agent that is allocating the I/O resource.\r
+  @param  DeviceHandle     The device handle for which the I/O resource is being allocated.\r
+\r
+  @retval EFI_SUCCESS           The I/O resource was allocated from the global coherency domain\r
+                                of the processor.\r
+  @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r
+  @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.\r
+  @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r
+  @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to allocate the I/O\r
+                                resource from the global coherency domain of the processor.\r
+  @retval EFI_NOT_FOUND         The I/O resource request could not be satisfied.\r
 \r
 **/\r
 typedef\r
@@ -335,17 +467,24 @@ EFI_STATUS
   IN OUT EFI_PHYSICAL_ADDRESS                *BaseAddress,\r
   IN     EFI_HANDLE                          ImageHandle,\r
   IN     EFI_HANDLE                          DeviceHandle OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
   domain of the processor.\r
 \r
-  @param  BaseAddress      Base address of the segment.\r
-  @param  Length           Length of the segment.\r
+  @param  BaseAddress      The physical address that is the start address of the I/O resource being freed.\r
+  @param  Length           The size in bytes of the I/O resource range that is being freed.\r
 \r
-  @retval EFI_SUCCESS           Space successfully freed.\r
+  @retval EFI_SUCCESS           The I/O resource was freed from the global coherency domain of the\r
+                                processor.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.\r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O resource\r
+                                range specified by BaseAddress and Length.\r
+  @retval EFI_NOT_FOUND         The I/O resource range specified by BaseAddress and Length\r
+                                was not allocated with previous calls to AllocateIoSpace().\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to free the I/O resource from\r
+                                the global coherency domain of the processor.\r
 \r
 **/\r
 typedef\r
@@ -353,17 +492,29 @@ EFI_STATUS
 (EFIAPI *EFI_FREE_IO_SPACE)(\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Removes reserved I/O or I/O resources from the global coherency domain of the\r
   processor.\r
 \r
-  @param  BaseAddress      Base address of the segment.\r
-  @param Length Length of the segment.\r
-\r
-  @retval EFI_SUCCESS           Successfully removed a segment of IO space.\r
+  @param  BaseAddress      A pointer to a physical address that is the start address of the I/O resource being\r
+                           removed.\r
+  @param Length            The size in bytes of the I/O resource that is being removed.\r
+\r
+  @retval EFI_SUCCESS           The I/O resource was removed from the global coherency domain\r
+                                of the processor.\r
+  @retval EFI_INVALID_PARAMETER Length is zero.\r
+  @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the I/O\r
+                                resource range specified by BaseAddress and Length.\r
+  @retval EFI_NOT_FOUND         One or more bytes of the I/O resource range specified by\r
+                                BaseAddress and Length was not added with previous\r
+                                calls to AddIoSpace().\r
+  @retval EFI_ACCESS_DENIED     One or more bytes of the I/O resource range specified by\r
+                                BaseAddress and Length has been allocated with\r
+                                AllocateIoSpace().\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to remove the I/O\r
+                                resource from the global coherency domain of the processor.\r
 \r
 **/\r
 typedef\r
@@ -371,17 +522,18 @@ EFI_STATUS
 (EFIAPI *EFI_REMOVE_IO_SPACE)(\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Retrieves the descriptor for an I/O region containing a specified address.\r
 \r
-  @param  BaseAddress      Specified start address\r
-  @param  Descriptor       Specified length\r
+  @param  BaseAddress      The physical address that is the start address of an I/O region.\r
+  @param  Descriptor       A pointer to a caller allocated descriptor.\r
 \r
+  @retval EFI_SUCCESS           The descriptor for the I/O resource region containing\r
+                                BaseAddress was returned in Descriptor.\r
   @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
-  @retval EFI_SUCCESS           Successfully get the IO space descriptor.\r
+  @retval EFI_NOT_FOUND         An I/O resource range containing BaseAddress was not found.\r
 \r
 **/\r
 typedef\r
@@ -389,18 +541,21 @@ EFI_STATUS
 (EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(\r
   IN  EFI_PHYSICAL_ADDRESS         BaseAddress,\r
   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Returns a map of the I/O resources in the global coherency domain of the processor.\r
 \r
-  @param  NumberOfDescriptors Number of descriptors.\r
-  @param  MemorySpaceMap      Descriptor array\r
+  @param  NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.\r
+  @param  MemorySpaceMap      A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.\r
+\r
+  @retval EFI_SUCCESS           The I/O space map was returned in the IoSpaceMap buffer, and\r
+                                the number of descriptors in IoSpaceMap was returned in\r
+                                NumberOfDescriptors.\r
+  @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
+  @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to allocate IoSpaceMap.\r
 \r
-  @retval EFI_INVALID_PARAMETER Invalid parameter\r
-  @retval EFI_OUT_OF_RESOURCES  No enough buffer to allocate\r
-  @retval EFI_SUCCESS           Successfully get IO space map.\r
 \r
 **/\r
 typedef\r
@@ -408,40 +563,49 @@ EFI_STATUS
 (EFIAPI *EFI_GET_IO_SPACE_MAP)(\r
   OUT UINTN                        *NumberOfDescriptors,\r
   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap\r
-  )\r
-;\r
+  );\r
 \r
 \r
 \r
 /**\r
   Loads and executed DXE drivers from firmware volumes.\r
 \r
-  @return Status of dispatching and execution DXE drivers.\r
+  The Dispatch() function searches for DXE drivers in firmware volumes that have been \r
+  installed since the last time the Dispatch() service was called. It then evaluates \r
+  the dependency expressions of all the DXE drivers and loads and executes those DXE\r
+  drivers whose dependency expression evaluate to TRUE. This service must interact with\r
+  the Security Architectural Protocol to authenticate DXE drivers before they are executed.\r
+  This process is continued until no more DXE drivers can be executed.\r
+\r
+  @retval EFI_SUCCESS         One or more DXE driver were dispatched.\r
+  @retval EFI_NOT_FOUND       No DXE drivers were dispatched.\r
+  @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.\r
+                              Thus no action was taken.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_DISPATCH)(\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
 \r
   @param  FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
-  @param  DriverName           A pointer to the name of the file in a firmware volume.\r
+  @param  FileName             A pointer to the name of the file in a firmware volume.\r
 \r
-  @return Status of clearing SOR.\r
+  @retval EFI_SUCCESS         The DXE driver was found and its SOR bit was cleared.\r
+  @retval EFI_NOT_FOUND       The DXE driver does not exist, or the DXE driver exists and its SOR\r
+                              bit is not set.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_SCHEDULE)(\r
   IN EFI_HANDLE  FirmwareVolumeHandle,\r
-  IN EFI_GUID    *DriverName\r
-  )\r
-;\r
+  IN CONST EFI_GUID    *FileName\r
+  );\r
 \r
 /**\r
   Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
@@ -451,15 +615,15 @@ EFI_STATUS
 \r
   @return Status of promoting FFS from untrusted to trusted\r
           state.\r
+  @retval EFI_NOT_FOUND       The file was not found in the untrusted state.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_TRUST)(\r
   IN EFI_HANDLE  FirmwareVolumeHandle,\r
-  IN EFI_GUID    *DriverName\r
-  )\r
-;\r
+  IN CONST EFI_GUID    *FileName\r
+  );\r
 \r
 /**\r
   Creates a firmware volume handle for a firmware volume that is present in system memory.\r
@@ -468,17 +632,24 @@ EFI_STATUS
   @param  Size                 The size, in bytes, of the firmware volume.\r
   @param  FirmwareVolumeHandle On output, a pointer to the created handle.\r
 \r
-  @return Status of processing FV.\r
+  @retval EFI_SUCCESS          The EFI_FIRMWARE_VOLUME_PROTOCOL and\r
+                               EFI_DEVICE_PATH_PROTOCOL were installed onto\r
+                               FirmwareVolumeHandle for the firmware volume described\r
+                               by FirmwareVolumeHeader and Size.\r
+  @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader\r
+                               and Size is corrupted.\r
+  @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the\r
+                               EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL \r
+                               for the firmware volume described by FirmwareVolumeHeader and Size.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(\r
-  IN VOID                             *FvHeader,\r
+  IN CONST VOID                       *FirmwareVolumeHeader,\r
   IN UINTN                            Size,\r
   OUT EFI_HANDLE                      *FirmwareVolumeHandle\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // DXE Services Table\r
@@ -487,6 +658,10 @@ EFI_STATUS
 #define DXE_SERVICES_REVISION   ((1<<16) | (00))\r
 \r
 typedef struct {\r
+  ///\r
+  /// The table header for the DXE Services Table.\r
+  /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r
+  ///\r
   EFI_TABLE_HEADER                Hdr;\r
 \r
   //\r