]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiDxeCis.h
Update PI Service Table Versions per PI 1.2 Errata C.
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
index d98c71a89e563a09eb2f5f72ee265966e4c48f4c..17543fa72bc6741b97b4f5f986d747d0de7a112e 100644 (file)
 /** @file\r
   Include file matches things in PI.\r
 \r
-  Copyright (c) 2006 - 2007, 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
-  http://opensource.org/licenses/bsd-license.php                                            \r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution.  \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.                                            \r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \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.2\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\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
 \r
-\r
+///\r
+/// 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
 \r
-\r
+///\r
+/// 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
 \r
-\r
+///\r
+/// EFI_GCD_MEMORY_SPACE_DESCRIPTOR.\r
+/// \r
 typedef struct {\r
+  ///\r
+  /// The physical address of the first byte in the memory region. Type\r
+  /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r
+  /// description in the UEFI 2.0 specification.\r
+  /// \r
   EFI_PHYSICAL_ADDRESS  BaseAddress;\r
+\r
+  ///\r
+  /// The number of bytes in the memory region.\r
+  /// \r
   UINT64                Length;\r
+\r
+  ///\r
+  /// The bit mask of attributes that the memory region is capable of supporting. The bit\r
+  /// mask of available attributes is defined in the GetMemoryMap() function description\r
+  /// in the UEFI 2.0 specification.\r
+  /// \r
   UINT64                Capabilities;\r
+  ///\r
+  /// The bit mask of attributes that the memory region is currently using. The bit mask of\r
+  /// available attributes is defined in GetMemoryMap().\r
+  /// \r
   UINT64                Attributes;\r
+  ///\r
+  /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the\r
+  /// AddMemorySpace() function description.\r
+  /// \r
   EFI_GCD_MEMORY_TYPE   GcdMemoryType;\r
+\r
+  ///\r
+  /// The image handle of the agent that allocated the memory resource described by\r
+  /// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory\r
+  /// resource is not currently allocated. Type EFI_HANDLE is defined in\r
+  /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
+  /// \r
   EFI_HANDLE            ImageHandle;\r
+\r
+  ///\r
+  /// The device handle for which the memory resource has been allocated. If\r
+  /// ImageHandle is NULL, then the memory resource is not currently allocated. If this\r
+  /// field is NULL, then the memory resource is not associated with a device that is\r
+  /// described by a device handle. Type EFI_HANDLE is defined in\r
+  /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
+  /// \r
   EFI_HANDLE            DeviceHandle;\r
 } EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r
 \r
-\r
+///\r
+/// EFI_GCD_IO_SPACE_DESCRIPTOR.\r
+/// \r
 typedef struct {\r
+  ///\r
+  /// Physical address of the first byte in the I/O region. Type\r
+  /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r
+  /// description in the UEFI 2.0 specification.\r
+  /// \r
   EFI_PHYSICAL_ADDRESS  BaseAddress;\r
+\r
+  ///\r
+  /// Number of bytes in the I/O region.\r
+  ///\r
   UINT64                Length;\r
+\r
+  /// \r
+  /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the\r
+  /// AddIoSpace() function description.\r
+  /// \r
   EFI_GCD_IO_TYPE       GcdIoType;\r
+\r
+  /// \r
+  /// The image handle of the agent that allocated the I/O resource described by\r
+  /// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O\r
+  /// resource is not currently allocated. Type EFI_HANDLE is defined in\r
+  /// InstallProtocolInterface() in the UEFI 2.0 specification.\r
+  /// \r
   EFI_HANDLE            ImageHandle;\r
+\r
+  ///\r
+  /// The device handle for which the I/O resource has been allocated. If ImageHandle\r
+  /// is NULL, then the I/O resource is not currently allocated. If this field is NULL, then\r
+  /// the I/O resource is not associated with a device that is described by a device handle.\r
+  /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI\r
+  /// 2.0 specification.\r
+  /// \r
   EFI_HANDLE            DeviceHandle;\r
 } EFI_GCD_IO_SPACE_DESCRIPTOR;\r
 \r
@@ -74,44 +201,75 @@ 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
 EFI_STATUS\r
-(EFIAPI *EFI_ADD_MEMORY_SPACE) (\r
+(EFIAPI *EFI_ADD_MEMORY_SPACE)(\r
   IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,\r
   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
 EFI_STATUS\r
-(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (\r
+(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE)(\r
   IN     EFI_GCD_ALLOCATE_TYPE               GcdAllocateType,\r
   IN     EFI_GCD_MEMORY_TYPE                 GcdMemoryType,\r
   IN     UINTN                               Alignment,\r
@@ -119,142 +277,189 @@ 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
 EFI_STATUS\r
-(EFIAPI *EFI_FREE_MEMORY_SPACE) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (\r
+(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(\r
   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
 EFI_STATUS\r
-(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_ADD_IO_SPACE) (\r
+(EFIAPI *EFI_ADD_IO_SPACE)(\r
   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
 EFI_STATUS\r
-(EFIAPI *EFI_ALLOCATE_IO_SPACE) (\r
+(EFIAPI *EFI_ALLOCATE_IO_SPACE)(\r
   IN     EFI_GCD_ALLOCATE_TYPE               GcdAllocateType,\r
   IN     EFI_GCD_IO_TYPE                     GcdIoType,\r
   IN     UINTN                               Alignment,\r
@@ -262,113 +467,145 @@ 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
 EFI_STATUS\r
-(EFIAPI *EFI_FREE_IO_SPACE) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_REMOVE_IO_SPACE) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (\r
+(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
 EFI_STATUS\r
-(EFIAPI *EFI_GET_IO_SPACE_MAP) (\r
+(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 code\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
+(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 code\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
+(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
@@ -376,16 +613,17 @@ EFI_STATUS
   @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
 \r
-  @return Status code\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
+(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
@@ -394,25 +632,38 @@ 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 code\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
+(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(\r
+  IN CONST VOID                       *FirmwareVolumeHeader,\r
   IN UINTN                            Size,\r
   OUT EFI_HANDLE                      *FirmwareVolumeHandle\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // DXE Services Table\r
 //\r
-#define DXE_SERVICES_SIGNATURE  0x565245535f455844\r
-#define DXE_SERVICES_REVISION   ((1<<16) | (00)\r
+#define DXE_SERVICES_SIGNATURE            0x565245535f455844ULL\r
+#define DXE_SPECIFICATION_MAJOR_REVISION  1\r
+#define DXE_SPECIFICATION_MINOR_REVISION  20\r
+#define DXE_SERVICES_REVISION             ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))\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
@@ -446,4 +697,19 @@ typedef struct {
 \r
 typedef DXE_SERVICES EFI_DXE_SERVICES;\r
 \r
+\r
+/**\r
+  The function prototype for invoking a function on an Application Processor.\r
+\r
+  This definition is used by the UEFI MP Serices Protocol, and the\r
+  PI SMM System Table.\r
+\r
+  @param[in,out] Buffer  The pointer to private data buffer.\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_AP_PROCEDURE)(\r
+  IN OUT VOID  *Buffer\r
+  );\r
+\r
 #endif\r