]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/DxeMain.h
Clean up DEC files:
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / DxeMain.h
index ff43fac3b61640df88f4df71340c70c98c4a6e31..e7ec3c856175928f40380d40f68bd51ef2eae9be 100644 (file)
@@ -2,8 +2,8 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by DxeCore module.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -22,45 +22,46 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/GuidedSectionExtraction.h>\r
-#include <Guid/DebugImageInfoTable.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/Runtime.h>\r
 #include <Protocol/LoadFile.h>\r
+#include <Protocol/LoadFile2.h>\r
 #include <Protocol/DriverBinding.h>\r
 #include <Protocol/VariableWrite.h>\r
 #include <Protocol/PlatformDriverOverride.h>\r
 #include <Protocol/Variable.h>\r
-#include <Guid/MemoryTypeInformation.h>\r
-#include <Guid/FirmwareFileSystem2.h>\r
-#include <Guid/HobList.h>\r
 #include <Protocol/Timer.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
 #include <Protocol/Bds.h>\r
-#include <Guid/FileInfo.h>\r
 #include <Protocol/RealTimeClock.h>\r
-#include <Guid/Apriori.h>\r
 #include <Protocol/WatchdogTimer.h>\r
 #include <Protocol/FirmwareVolume2.h>\r
 #include <Protocol/MonotonicCounter.h>\r
-#include <Guid/DxeServices.h>\r
-#include <Guid/MemoryAllocationHob.h>\r
 #include <Protocol/StatusCode.h>\r
 #include <Protocol/Decompress.h>\r
 #include <Protocol/LoadPe32Image.h>\r
-#include <Protocol/FirmwareVolumeDispatch.h>\r
 #include <Protocol/Security.h>\r
 #include <Protocol/Ebc.h>\r
-#include <Guid/EventLegacyBios.h>\r
 #include <Protocol/Reset.h>\r
 #include <Protocol/Cpu.h>\r
-#include <Guid/EventGroup.h>\r
 #include <Protocol/Metronome.h>\r
 #include <Protocol/FirmwareVolumeBlock.h>\r
 #include <Protocol/Capsule.h>\r
 #include <Protocol/BusSpecificDriverOverride.h>\r
-#include <Protocol/Performance.h>\r
-#include <Uefi/UefiTcgPlatform.h>\r
-#include <Protocol/TcgPlatform.h>\r
+#include <Protocol/TcgService.h>\r
+#include <Protocol/HiiPackageList.h>\r
+#include <Protocol/SmmBase2.h>\r
+#include <Guid/MemoryTypeInformation.h>\r
+#include <Guid/FirmwareFileSystem2.h>\r
+#include <Guid/HobList.h>\r
+#include <Guid/DebugImageInfoTable.h>\r
+#include <Guid/FileInfo.h>\r
+#include <Guid/Apriori.h>\r
+#include <Guid/DxeServices.h>\r
+#include <Guid/MemoryAllocationHob.h>\r
+#include <Guid/EventLegacyBios.h>\r
+#include <Guid/EventGroup.h>\r
+#include <Guid/LoadModuleAtFixedAddress.h>\r
 \r
 #include <Library/DxeCoreEntryPoint.h>\r
 #include <Library/DebugLib.h>\r
@@ -73,24 +74,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/CacheMaintenanceLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/PeCoffLib.h>\r
+#include <Library/PeCoffGetEntryPointLib.h>\r
+#include <Library/PeCoffExtraActionLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/TimerLib.h>\r
+#include <Library/DxeServicesLib.h>\r
+#include <Library/DebugAgentLib.h>\r
 \r
-#include "DebugImageInfo.h"\r
-#include "Library.h"\r
-#include "FwVolBlock.h"\r
-#include "FwVolDriver.h"\r
-#include "Gcd.h"\r
-#include "Imem.h"\r
-#include "Image.h"\r
-#include "Exec.h"\r
-#include "Hand.h"\r
-\r
-\r
-//\r
-// Modifier for EFI DXE Services\r
-//\r
-#define EFI_DXESERVICE\r
 \r
 //\r
 // attributes for reserved memory before it is promoted to system memory\r
@@ -108,7 +102,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///\r
 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression\r
 ///                        to save time.  A EFI_DEP_PUSH is evauated one an\r
-///                        replaced with EFI_DEP_REPLACE_TRUE\r
+///                        replaced with EFI_DEP_REPLACE_TRUE. If PI spec's Vol 2\r
+///                        Driver Execution Environment Core Interface use 0xff\r
+///                        as new DEPEX opcode. EFI_DEP_REPLACE_TRUE should be\r
+///                        defined to a new value that is not conflicting with PI spec.\r
 ///\r
 #define EFI_DEP_REPLACE_TRUE  0xff\r
 \r
@@ -123,29 +120,21 @@ typedef struct {
   EFI_EVENT                   Event;\r
   VOID                        *Registration;\r
   BOOLEAN                     Present;\r
-} ARCHITECTURAL_PROTOCOL_ENTRY;\r
-\r
-typedef struct {\r
-  EFI_STATUS_CODE_DATA  DataHeader;\r
-  EFI_HANDLE            Handle;\r
-} EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA;\r
-\r
-#define EFI_STATUS_CODE_DXE_CORE_GUID \\r
-  { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }\r
+} EFI_CORE_PROTOCOL_NOTIFY_ENTRY;\r
 \r
 //\r
 // DXE Dispatcher Data structures\r
 //\r
 \r
-#define KNOWN_HANDLE_SIGNATURE  EFI_SIGNATURE_32('k','n','o','w')\r
+#define KNOWN_HANDLE_SIGNATURE  SIGNATURE_32('k','n','o','w')\r
 typedef struct {\r
   UINTN           Signature;\r
-  LIST_ENTRY      Link;         // mFvHandleList           \r
+  LIST_ENTRY      Link;         // mFvHandleList\r
   EFI_HANDLE      Handle;\r
 } KNOWN_HANDLE;\r
 \r
 \r
-#define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')\r
+#define EFI_CORE_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('d','r','v','r')\r
 typedef struct {\r
   UINTN                           Signature;\r
   LIST_ENTRY                      Link;             // mDriverList\r
@@ -178,7 +167,7 @@ typedef struct {
 //\r
 //The data structure of GCD memory map entry\r
 //\r
-#define EFI_GCD_MAP_SIGNATURE  EFI_SIGNATURE_32('g','c','d','m')\r
+#define EFI_GCD_MAP_SIGNATURE  SIGNATURE_32('g','c','d','m')\r
 typedef struct {\r
   UINTN                 Signature;\r
   LIST_ENTRY            Link;\r
@@ -196,7 +185,6 @@ typedef struct {
 // DXE Core Global Variables\r
 //\r
 extern EFI_SYSTEM_TABLE                         *gDxeCoreST;\r
-extern EFI_BOOT_SERVICES                        *gDxeCoreBS;\r
 extern EFI_RUNTIME_SERVICES                     *gDxeCoreRT;\r
 extern EFI_DXE_SERVICES                         *gDxeCoreDS;\r
 extern EFI_HANDLE                               gDxeCoreImageHandle;\r
@@ -210,7 +198,7 @@ extern EFI_METRONOME_ARCH_PROTOCOL              *gMetronome;
 extern EFI_TIMER_ARCH_PROTOCOL                  *gTimer;\r
 extern EFI_SECURITY_ARCH_PROTOCOL               *gSecurity;\r
 extern EFI_BDS_ARCH_PROTOCOL                    *gBds;\r
-extern EFI_STATUS_CODE_PROTOCOL                 *gStatusCode;\r
+extern EFI_SMM_BASE2_PROTOCOL                   *gSmmBase2;\r
 \r
 extern EFI_TPL                                  gEfiCurrentTpl;\r
 \r
@@ -222,6 +210,8 @@ extern EFI_MEMORY_TYPE_INFORMATION              gMemoryTypeInformation[EfiMaxMem
 extern BOOLEAN                                  gDispatcherRunning;\r
 extern EFI_RUNTIME_ARCH_PROTOCOL                gRuntimeTemplate;\r
 \r
+extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE    gLoadModuleAtFixAddressConfigurationTable;\r
+extern BOOLEAN                                       gLoadFixedAddressCodeMemoryReady;\r
 //\r
 // Service Initialization Functions\r
 //\r
@@ -244,11 +234,11 @@ CoreInitializePool (
   The first descriptor that is added must be general usable\r
   memory as the addition allocates heap.\r
 \r
-  @param  Type                   The type of memory to add \r
-  @param  Start                  The starting address in the memory range Must be \r
-                                 page aligned \r
-  @param  NumberOfPages          The number of pages in the range \r
-  @param  Attribute              Attributes of the memory to add \r
+  @param  Type                   The type of memory to add\r
+  @param  Start                  The starting address in the memory range Must be\r
+                                 page aligned\r
+  @param  NumberOfPages          The number of pages in the range\r
+  @param  Attribute              Attributes of the memory to add\r
 \r
   @return None.  The range is added to the memory map\r
 \r
@@ -283,17 +273,16 @@ CoreAcquireGcdMemoryLock (
 \r
 \r
 /**\r
-  External function. Initializes the GCD and memory services based on the memory\r
-  descriptor HOBs.  This function is responsible for priming the GCD map and the\r
-  memory map, so memory allocations and resource allocations can be made.  The first\r
-  part of this function can not depend on any memory services until at least one\r
-  memory descriptor is provided to the memory services.  Then the memory services\r
-  can be used to intialize the GCD map.\r
+  External function. Initializes memory services based on the memory\r
+  descriptor HOBs.  This function is responsible for priming the memory\r
+  map, so memory allocations and resource allocations can be made.\r
+  The first part of this function can not depend on any memory services\r
+  until at least one memory descriptor is provided to the memory services.\r
 \r
-  @param  HobStart               The start address of the HOB. \r
-  @param  MemoryBaseAddress      Start address of memory region found to init DXE \r
-                                 core. \r
-  @param  MemoryLength           Length of memory region found to init DXE core. \r
+  @param  HobStart               The start address of the HOB.\r
+  @param  MemoryBaseAddress      Start address of memory region found to init DXE\r
+                                 core.\r
+  @param  MemoryLength           Length of memory region found to init DXE core.\r
 \r
   @retval EFI_SUCCESS            Memory services successfully initialized.\r
 \r
@@ -310,31 +299,27 @@ CoreInitializeMemoryServices (
 /**\r
   External function. Initializes the GCD and memory services based on the memory\r
   descriptor HOBs.  This function is responsible for priming the GCD map and the\r
-  memory map, so memory allocations and resource allocations can be made.  The first\r
-  part of this function can not depend on any memory services until at least one\r
-  memory descriptor is provided to the memory services.  Then the memory services\r
-  can be used to intialize the GCD map. The HobStart will be relocated to a pool\r
-  buffer.\r
+  memory map, so memory allocations and resource allocations can be made. The\r
+  HobStart will be relocated to a pool buffer.\r
 \r
-  @param  HobStart               The start address of the HOB \r
-  @param  MemoryBaseAddress      Start address of memory region found to init DXE \r
-                                 core. \r
-  @param  MemoryLength           Length of memory region found to init DXE core. \r
+  @param  HobStart               The start address of the HOB\r
+  @param  MemoryBaseAddress      Start address of memory region found to init DXE\r
+                                 core.\r
+  @param  MemoryLength           Length of memory region found to init DXE core.\r
 \r
   @retval EFI_SUCCESS            GCD services successfully initialized.\r
 \r
 **/\r
 EFI_STATUS\r
 CoreInitializeGcdServices (\r
-  IN OUT VOID                  **HobStart,\r
+  IN OUT VOID              **HobStart,\r
   IN EFI_PHYSICAL_ADDRESS  MemoryBaseAddress,\r
   IN UINT64                MemoryLength\r
   );\r
 \r
 \r
 /**\r
-  Initializes "event" support and populates parts of the System and Runtime Table.\r
-\r
+  Initializes "event" support.\r
 \r
   @retval EFI_SUCCESS            Always return success\r
 \r
@@ -349,7 +334,7 @@ CoreInitializeEventServices (
   Add the Image Services to EFI Boot Services Table and install the protocol\r
   interfaces for this image.\r
 \r
-  @param  HobStart                The HOB to initialize \r
+  @param  HobStart                The HOB to initialize\r
 \r
   @return Status code.\r
 \r
@@ -365,7 +350,7 @@ CoreInitializeImageServices (
 \r
 **/\r
 VOID\r
-CoreNotifyOnArchProtocolInstallation (\r
+CoreNotifyOnProtocolInstallation (\r
   VOID\r
   );\r
 \r
@@ -373,8 +358,7 @@ CoreNotifyOnArchProtocolInstallation (
 /**\r
   Return TRUE if all AP services are availible.\r
 \r
-\r
-  @retval EFI_SUCCESS    All AP services are available \r
+  @retval EFI_SUCCESS    All AP services are available\r
   @retval EFI_NOT_FOUND  At least one AP service is not available\r
 \r
 **/\r
@@ -400,7 +384,7 @@ CalculateEfiHdrCrc (
 /**\r
   Called by the platform code to process a tick.\r
 \r
-  @param  Duration               The number of 100ns elasped since the last call \r
+  @param  Duration               The number of 100ns elasped since the last call\r
                                  to TimerTick\r
 \r
 **/\r
@@ -413,7 +397,7 @@ CoreTimerTick (
 \r
 /**\r
   Initialize the dispatcher. Initialize the notification function that runs when\r
-  a FV protocol is added to the system.\r
+  an FV2 protocol is added to the system.\r
 \r
 **/\r
 VOID\r
@@ -428,16 +412,16 @@ CoreInitializeDispatcher (
   routine in this case. The SOR is just ignored and is a nop in the grammer.\r
   POSTFIX means all the math is done on top of the stack.\r
 \r
-  @param  DriverEntry           DriverEntry element to update \r
+  @param  DriverEntry           DriverEntry element to update.\r
 \r
-  @retval TRUE                  If driver is ready to run. \r
-  @retval FALSE                 If driver is not ready to run or some fatal error \r
+  @retval TRUE                  If driver is ready to run.\r
+  @retval FALSE                 If driver is not ready to run or some fatal error\r
                                 was found.\r
 \r
 **/\r
 BOOLEAN\r
 CoreIsSchedulable (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
+  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry\r
   );\r
 \r
 \r
@@ -448,14 +432,14 @@ CoreIsSchedulable (
   it will be cleared by CoreSchedule(), and then the driver can be\r
   dispatched.\r
 \r
-  @param  DriverEntry           DriverEntry element to update \r
+  @param  DriverEntry           DriverEntry element to update .\r
 \r
   @retval EFI_SUCCESS           It always works.\r
 \r
 **/\r
 EFI_STATUS\r
 CorePreProcessDepex (\r
-  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry  \r
+  IN  EFI_CORE_DRIVER_ENTRY   *DriverEntry\r
   );\r
 \r
 \r
@@ -463,10 +447,10 @@ CorePreProcessDepex (
 /**\r
   Terminates all boot services.\r
 \r
-  @param  ImageHandle            Handle that identifies the exiting image. \r
+  @param  ImageHandle            Handle that identifies the exiting image.\r
   @param  MapKey                 Key to the latest memory map.\r
 \r
-  @retval EFI_SUCCESS            Boot Services terminated \r
+  @retval EFI_SUCCESS            Boot Services terminated\r
   @retval EFI_INVALID_PARAMETER  MapKey is incorrect.\r
 \r
 **/\r
@@ -482,10 +466,10 @@ CoreExitBootServices (
   Make sure the memory map is following all the construction rules,\r
   it is the last time to check memory map error before exit boot services.\r
 \r
-  @param  MapKey                 Memory map key \r
+  @param  MapKey                 Memory map key\r
 \r
-  @retval EFI_INVALID_PARAMETER  Memory map not consistent with construction \r
-                                 rules. \r
+  @retval EFI_INVALID_PARAMETER  Memory map not consistent with construction\r
+                                 rules.\r
   @retval EFI_SUCCESS            Valid memory map.\r
 \r
 **/\r
@@ -512,10 +496,10 @@ CoreNotifySignalList (
   Boot Service called to add, modify, or remove a system configuration table from\r
   the EFI System Table.\r
 \r
-  @param  Guid           Pointer to the GUID for the entry to add, update, or \r
-                         remove \r
-  @param  Table          Pointer to the configuration table for the entry to add, \r
-                         update, or remove, may be NULL. \r
+  @param  Guid           Pointer to the GUID for the entry to add, update, or\r
+                         remove\r
+  @param  Table          Pointer to the configuration table for the entry to add,\r
+                         update, or remove, may be NULL.\r
 \r
   @return EFI_SUCCESS               Guid, Table pair added, updated, or removed.\r
   @return EFI_INVALID_PARAMETER     Input GUID not valid.\r
@@ -536,7 +520,7 @@ CoreInstallConfigurationTable (
   Raise the task priority level to the new level.\r
   High level is implemented by disabling processor interrupts.\r
 \r
-  @param  NewTpl  New task priority level \r
+  @param  NewTpl  New task priority level\r
 \r
   @return The previous task priority level\r
 \r
@@ -569,8 +553,8 @@ CoreRestoreTpl (
 \r
   @param  Microseconds           The number of microseconds to stall execution.\r
 \r
-  @retval EFI_SUCCESS            Execution was stalled for at least the requested \r
-                                 amount of microseconds. \r
+  @retval EFI_SUCCESS            Execution was stalled for at least the requested\r
+                                 amount of microseconds.\r
   @retval EFI_NOT_AVAILABLE_YET  gMetronome is not available yet\r
 \r
 **/\r
@@ -619,12 +603,12 @@ CoreSetWatchdogTimer (
   Wrapper function to CoreInstallProtocolInterfaceNotify.  This is the public API which\r
   Calls the private one which contains a BOOLEAN parameter for notifications\r
 \r
-  @param  UserHandle             The handle to install the protocol handler on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  Protocol               The protocol to add to the handle \r
-  @param  InterfaceType          Indicates whether Interface is supplied in \r
-                                 native form. \r
-  @param  Interface              The interface for the protocol being added \r
+  @param  UserHandle             The handle to install the protocol handler on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  Protocol               The protocol to add to the handle\r
+  @param  InterfaceType          Indicates whether Interface is supplied in\r
+                                 native form.\r
+  @param  Interface              The interface for the protocol being added\r
 \r
   @return Status code\r
 \r
@@ -642,17 +626,17 @@ CoreInstallProtocolInterface (
 /**\r
   Installs a protocol interface into the boot services environment.\r
 \r
-  @param  UserHandle             The handle to install the protocol handler on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  Protocol               The protocol to add to the handle \r
-  @param  InterfaceType          Indicates whether Interface is supplied in \r
-                                 native form. \r
-  @param  Interface              The interface for the protocol being added \r
-  @param  Notify                 indicates whether notify the notification list  \r
-                                 for this protocol \r
-\r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \r
+  @param  UserHandle             The handle to install the protocol handler on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  Protocol               The protocol to add to the handle\r
+  @param  InterfaceType          Indicates whether Interface is supplied in\r
+                                 native form.\r
+  @param  Interface              The interface for the protocol being added\r
+  @param  Notify                 indicates whether notify the notification list\r
+                                 for this protocol\r
+\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate\r
   @retval EFI_SUCCESS            Protocol interface successfully installed\r
 \r
 **/\r
@@ -673,14 +657,14 @@ CoreInstallProtocolInterfaceNotify (
   occures all the protocols added by this function are removed. This is\r
   basically a lib function to save space.\r
 \r
-  @param  Handle                 The handle to install the protocol handlers on, \r
-                                 or NULL if a new handle is to be allocated \r
-  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
-                                 terminates the  list. The pairs are the \r
-                                 arguments to InstallProtocolInterface(). All the \r
-                                 protocols are added to Handle. \r
+  @param  Handle                 The handle to install the protocol handlers on,\r
+                                 or NULL if a new handle is to be allocated\r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL\r
+                                 terminates the  list. The pairs are the\r
+                                 arguments to InstallProtocolInterface(). All the\r
+                                 protocols are added to Handle.\r
 \r
-  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL.\r
   @retval EFI_SUCCESS            Protocol interfaces successfully installed.\r
 \r
 **/\r
@@ -698,11 +682,11 @@ CoreInstallMultipleProtocolInterfaces (
   This function calls UnisatllProtocolInterface() in a loop. This is\r
   basically a lib function to save space.\r
 \r
-  @param  Handle                 The handle to uninstall the protocol \r
-  @param  ...                    EFI_GUID followed by protocol instance. A NULL \r
-                                 terminates the  list. The pairs are the \r
-                                 arguments to UninstallProtocolInterface(). All \r
-                                 the protocols are added to Handle. \r
+  @param  Handle                 The handle to uninstall the protocol\r
+  @param  ...                    EFI_GUID followed by protocol instance. A NULL\r
+                                 terminates the  list. The pairs are the\r
+                                 arguments to UninstallProtocolInterface(). All\r
+                                 the protocols are added to Handle.\r
 \r
   @return Status code\r
 \r
@@ -719,11 +703,11 @@ CoreUninstallMultipleProtocolInterfaces (
 /**\r
   Reinstall a protocol interface on a device handle.  The OldInterface for Protocol is replaced by the NewInterface.\r
 \r
-  @param  UserHandle             Handle on which the interface is to be \r
-                                 reinstalled \r
-  @param  Protocol               The numeric ID of the interface \r
-  @param  OldInterface           A pointer to the old interface \r
-  @param  NewInterface           A pointer to the new interface \r
+  @param  UserHandle             Handle on which the interface is to be\r
+                                 reinstalled\r
+  @param  Protocol               The numeric ID of the interface\r
+  @param  OldInterface           A pointer to the old interface\r
+  @param  NewInterface           A pointer to the new interface\r
 \r
   @retval EFI_SUCCESS            The protocol interface was installed\r
   @retval EFI_NOT_FOUND          The OldInterface on the handle was not found\r
@@ -746,11 +730,11 @@ CoreReinstallProtocolInterface (
   If the last protocol interface is remove from the handle, the\r
   handle is freed.\r
 \r
-  @param  UserHandle             The handle to remove the protocol handler from \r
-  @param  Protocol               The protocol, of protocol:interface, to remove \r
-  @param  Interface              The interface, of protocol:interface, to remove \r
+  @param  UserHandle             The handle to remove the protocol handler from\r
+  @param  Protocol               The protocol, of protocol:interface, to remove\r
+  @param  Interface              The interface, of protocol:interface, to remove\r
 \r
-  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL.\r
   @retval EFI_SUCCESS            Protocol interface successfully uninstalled.\r
 \r
 **/\r
@@ -767,10 +751,10 @@ CoreUninstallProtocolInterface (
 /**\r
   Queries a handle to determine if it supports a specified protocol.\r
 \r
-  @param  UserHandle             The handle being queried. \r
-  @param  Protocol               The published unique identifier of the protocol. \r
-  @param  Interface              Supplies the address where a pointer to the \r
-                                 corresponding Protocol Interface is returned. \r
+  @param  UserHandle             The handle being queried.\r
+  @param  Protocol               The published unique identifier of the protocol.\r
+  @param  Interface              Supplies the address where a pointer to the\r
+                                 corresponding Protocol Interface is returned.\r
 \r
   @return The requested protocol interface for the handle\r
 \r
@@ -790,18 +774,18 @@ CoreHandleProtocol (
   invokes it to obtain the protocol interface. Usage information\r
   is registered in the protocol data base.\r
 \r
-  @param  UserHandle             The handle to obtain the protocol interface on \r
-  @param  Protocol               The ID of the protocol \r
-  @param  Interface              The location to return the protocol interface \r
-  @param  ImageHandle            The handle of the Image that is opening the \r
-                                 protocol interface specified by Protocol and \r
-                                 Interface. \r
-  @param  ControllerHandle       The controller handle that is requiring this \r
-                                 interface. \r
-  @param  Attributes             The open mode of the protocol interface \r
-                                 specified by Handle and Protocol. \r
-\r
-  @retval EFI_INVALID_PARAMETER  Protocol is NULL. \r
+  @param  UserHandle             The handle to obtain the protocol interface on\r
+  @param  Protocol               The ID of the protocol\r
+  @param  Interface              The location to return the protocol interface\r
+  @param  ImageHandle            The handle of the Image that is opening the\r
+                                 protocol interface specified by Protocol and\r
+                                 Interface.\r
+  @param  ControllerHandle       The controller handle that is requiring this\r
+                                 interface.\r
+  @param  Attributes             The open mode of the protocol interface\r
+                                 specified by Handle and Protocol.\r
+\r
+  @retval EFI_INVALID_PARAMETER  Protocol is NULL.\r
   @retval EFI_SUCCESS            Get the protocol interface.\r
 \r
 **/\r
@@ -821,11 +805,11 @@ CoreOpenProtocol (
 /**\r
   Return information about Opened protocols in the system\r
 \r
-  @param  UserHandle             The handle to close the protocol interface on \r
-  @param  Protocol               The ID of the protocol \r
-  @param  EntryBuffer            A pointer to a buffer of open protocol \r
-                                 information in the form of \r
-                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. \r
+  @param  UserHandle             The handle to close the protocol interface on\r
+  @param  Protocol               The ID of the protocol\r
+  @param  EntryBuffer            A pointer to a buffer of open protocol\r
+                                 information in the form of\r
+                                 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r
   @param  EntryCount             Number of EntryBuffer entries\r
 \r
 **/\r
@@ -843,25 +827,25 @@ CoreOpenProtocolInformation (
 /**\r
   Closes a protocol on a handle that was opened using OpenProtocol().\r
 \r
-  @param  UserHandle             The handle for the protocol interface that was \r
-                                 previously opened with OpenProtocol(), and is \r
-                                 now being closed. \r
-  @param  Protocol               The published unique identifier of the protocol. \r
-                                 It is the caller's responsibility to pass in a \r
-                                 valid GUID. \r
-  @param  AgentHandle            The handle of the agent that is closing the \r
-                                 protocol interface. \r
-  @param  ControllerHandle       If the agent that opened a protocol is a driver \r
-                                 that follows the EFI Driver Model, then this \r
-                                 parameter is the controller handle that required \r
-                                 the protocol interface. If the agent does not \r
-                                 follow the EFI Driver Model, then this parameter \r
-                                 is optional and may be NULL. \r
-\r
-  @retval EFI_SUCCESS            The protocol instance was closed. \r
-  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a \r
-                                 valid EFI_HANDLE. \r
-  @retval EFI_NOT_FOUND          Can not find the specified protocol or \r
+  @param  UserHandle             The handle for the protocol interface that was\r
+                                 previously opened with OpenProtocol(), and is\r
+                                 now being closed.\r
+  @param  Protocol               The published unique identifier of the protocol.\r
+                                 It is the caller's responsibility to pass in a\r
+                                 valid GUID.\r
+  @param  AgentHandle            The handle of the agent that is closing the\r
+                                 protocol interface.\r
+  @param  ControllerHandle       If the agent that opened a protocol is a driver\r
+                                 that follows the EFI Driver Model, then this\r
+                                 parameter is the controller handle that required\r
+                                 the protocol interface. If the agent does not\r
+                                 follow the EFI Driver Model, then this parameter\r
+                                 is optional and may be NULL.\r
+\r
+  @retval EFI_SUCCESS            The protocol instance was closed.\r
+  @retval EFI_INVALID_PARAMETER  Handle, AgentHandle or ControllerHandle is not a\r
+                                 valid EFI_HANDLE.\r
+  @retval EFI_NOT_FOUND          Can not find the specified protocol or\r
                                  AgentHandle.\r
 \r
 **/\r
@@ -871,7 +855,7 @@ CoreCloseProtocol (
   IN  EFI_HANDLE                UserHandle,\r
   IN  EFI_GUID                  *Protocol,\r
   IN  EFI_HANDLE                AgentHandle,\r
-  IN  EFI_HANDLE                ControllerHandle  \r
+  IN  EFI_HANDLE                ControllerHandle\r
   );\r
 \r
 \r
@@ -880,22 +864,22 @@ CoreCloseProtocol (
   Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r
   from pool.\r
 \r
-  @param  UserHandle             The handle from which to retrieve the list of \r
-                                 protocol interface GUIDs. \r
-  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID \r
-                                 pointers that are installed on Handle. \r
-  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present \r
-                                 in ProtocolBuffer. \r
-\r
-  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed \r
-                                 on Handle was returned in ProtocolBuffer. The \r
-                                 number of protocol interface GUIDs was returned \r
-                                 in ProtocolBufferCount. \r
-  @retval EFI_INVALID_PARAMETER  Handle is NULL. \r
-  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE. \r
-  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL. \r
-  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL. \r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
+  @param  UserHandle             The handle from which to retrieve the list of\r
+                                 protocol interface GUIDs.\r
+  @param  ProtocolBuffer         A pointer to the list of protocol interface GUID\r
+                                 pointers that are installed on Handle.\r
+  @param  ProtocolBufferCount    A pointer to the number of GUID pointers present\r
+                                 in ProtocolBuffer.\r
+\r
+  @retval EFI_SUCCESS            The list of protocol interface GUIDs installed\r
+                                 on Handle was returned in ProtocolBuffer. The\r
+                                 number of protocol interface GUIDs was returned\r
+                                 in ProtocolBufferCount.\r
+  @retval EFI_INVALID_PARAMETER  Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER  Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER  ProtocolBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER  ProtocolBufferCount is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the\r
                                  results.\r
 \r
 **/\r
@@ -912,13 +896,13 @@ CoreProtocolsPerHandle (
 /**\r
   Add a new protocol notification record for the request protocol.\r
 \r
-  @param  Protocol               The requested protocol to add the notify \r
-                                 registration \r
-  @param  Event                  The event to signal \r
-  @param  Registration           Returns the registration record \r
+  @param  Protocol               The requested protocol to add the notify\r
+                                 registration\r
+  @param  Event                  The event to signal\r
+  @param  Registration           Returns the registration record\r
 \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_SUCCESS            Successfully returned the registration record \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+  @retval EFI_SUCCESS            Successfully returned the registration record\r
                                  that has been added\r
 \r
 **/\r
@@ -927,26 +911,40 @@ EFIAPI
 CoreRegisterProtocolNotify (\r
   IN EFI_GUID       *Protocol,\r
   IN EFI_EVENT      Event,\r
-  OUT  VOID           **Registration\r
+  OUT  VOID         **Registration\r
+  );\r
+\r
+\r
+/**\r
+  Removes all the events in the protocol database that match Event.\r
+\r
+  @param  Event                  The event to search for in the protocol\r
+                                 database.\r
+\r
+  @return EFI_SUCCESS when done searching the entire database.\r
+\r
+**/\r
+EFI_STATUS\r
+CoreUnregisterProtocolNotify (\r
+  IN EFI_EVENT      Event\r
   );\r
-  \r
 \r
 \r
 /**\r
   Locates the requested handle(s) and returns them in Buffer.\r
 \r
-  @param  SearchType             The type of search to perform to locate the \r
-                                 handles \r
-  @param  Protocol               The protocol to search for \r
-  @param  SearchKey              Dependant on SearchType \r
-  @param  BufferSize             On input the size of Buffer.  On output the  \r
-                                 size of data returned. \r
-  @param  Buffer                 The buffer to return the results in \r
-\r
-  @retval EFI_BUFFER_TOO_SMALL   Buffer too small, required buffer size is \r
-                                 returned in BufferSize. \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_SUCCESS            Successfully found the requested handle(s) and \r
+  @param  SearchType             The type of search to perform to locate the\r
+                                 handles\r
+  @param  Protocol               The protocol to search for\r
+  @param  SearchKey              Dependant on SearchType\r
+  @param  BufferSize             On input the size of Buffer.  On output the\r
+                                 size of data returned.\r
+  @param  Buffer                 The buffer to return the results in\r
+\r
+  @retval EFI_BUFFER_TOO_SMALL   Buffer too small, required buffer size is\r
+                                 returned in BufferSize.\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+  @retval EFI_SUCCESS            Successfully found the requested handle(s) and\r
                                  returns them in Buffer.\r
 \r
 **/\r
@@ -959,21 +957,21 @@ CoreLocateHandle (
   IN OUT UINTN                *BufferSize,\r
   OUT EFI_HANDLE              *Buffer\r
   );\r
-  \r
+\r
 \r
 \r
 /**\r
   Locates the handle to a device on the device path that best matches the specified protocol.\r
 \r
-  @param  Protocol               The protocol to search for. \r
-  @param  DevicePath             On input, a pointer to a pointer to the device \r
-                                 path. On output, the device path pointer is \r
-                                 modified to point to the remaining part of the \r
-                                 devicepath. \r
-  @param  Device                 A pointer to the returned device handle. \r
+  @param  Protocol               The protocol to search for.\r
+  @param  DevicePath             On input, a pointer to a pointer to the device\r
+                                 path. On output, the device path pointer is\r
+                                 modified to point to the remaining part of the\r
+                                 devicepath.\r
+  @param  Device                 A pointer to the returned device handle.\r
 \r
-  @retval EFI_SUCCESS            The resulting handle was returned. \r
-  @retval EFI_NOT_FOUND          No handles matched the search. \r
+  @retval EFI_SUCCESS            The resulting handle was returned.\r
+  @retval EFI_NOT_FOUND          No handles matched the search.\r
   @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
 \r
 **/\r
@@ -985,28 +983,28 @@ CoreLocateDevicePath (
   OUT EFI_HANDLE                    *Device\r
   );\r
 \r
\r
+\r
 \r
 /**\r
   Function returns an array of handles that support the requested protocol\r
   in a buffer allocated from pool. This is a version of CoreLocateHandle()\r
   that allocates a buffer for the caller.\r
 \r
-  @param  SearchType             Specifies which handle(s) are to be returned. \r
-  @param  Protocol               Provides the protocol to search by.    This \r
-                                 parameter is only valid for SearchType \r
-                                 ByProtocol. \r
-  @param  SearchKey              Supplies the search key depending on the \r
-                                 SearchType. \r
-  @param  NumberHandles          The number of handles returned in Buffer. \r
-  @param  Buffer                 A pointer to the buffer to return the requested \r
-                                 array of  handles that support Protocol. \r
-\r
-  @retval EFI_SUCCESS            The result array of handles was returned. \r
-  @retval EFI_NOT_FOUND          No handles match the search. \r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the \r
-                                 matching results. \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
+  @param  SearchType             Specifies which handle(s) are to be returned.\r
+  @param  Protocol               Provides the protocol to search by.    This\r
+                                 parameter is only valid for SearchType\r
+                                 ByProtocol.\r
+  @param  SearchKey              Supplies the search key depending on the\r
+                                 SearchType.\r
+  @param  NumberHandles          The number of handles returned in Buffer.\r
+  @param  Buffer                 A pointer to the buffer to return the requested\r
+                                 array of  handles that support Protocol.\r
+\r
+  @retval EFI_SUCCESS            The result array of handles was returned.\r
+  @retval EFI_NOT_FOUND          No handles match the search.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough pool memory to store the\r
+                                 matching results.\r
+  @retval EFI_INVALID_PARAMETER  One or more paramters are not valid.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1019,21 +1017,21 @@ CoreLocateHandleBuffer (
   OUT EFI_HANDLE                  **Buffer\r
   );\r
 \r
\r
+\r
 \r
 /**\r
   Return the first Protocol Interface that matches the Protocol GUID. If\r
-  Registration is pasased in return a Protocol Instance that was just add\r
-  to the system. If Retistration is NULL return the first Protocol Interface\r
+  Registration is passed in, return a Protocol Instance that was just add\r
+  to the system. If Registration is NULL return the first Protocol Interface\r
   you find.\r
 \r
-  @param  Protocol               The protocol to search for \r
-  @param  Registration           Optional Registration Key returned from \r
-                                 RegisterProtocolNotify() \r
-  @param  Interface              Return the Protocol interface (instance). \r
+  @param  Protocol               The protocol to search for\r
+  @param  Registration           Optional Registration Key returned from\r
+                                 RegisterProtocolNotify()\r
+  @param  Interface              Return the Protocol interface (instance).\r
 \r
-  @retval EFI_SUCCESS            If a valid Interface is returned \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_SUCCESS            If a valid Interface is returned\r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_NOT_FOUND          Protocol interface not found\r
 \r
 **/\r
@@ -1062,7 +1060,7 @@ CoreGetHandleDatabaseKey (
 /**\r
   Go connect any handles that were created or modified while a image executed.\r
 \r
-  @param  Key                    The Key to show that the handle has been \r
+  @param  Key                    The Key to show that the handle has been\r
                                  created/modified\r
 \r
 **/\r
@@ -1076,22 +1074,22 @@ CoreConnectHandlesByKey (
 /**\r
   Connects one or more drivers to a controller.\r
 \r
-  @param  ControllerHandle                      Handle of the controller to be \r
-                                                connected. \r
-  @param  DriverImageHandle                     DriverImageHandle A pointer to an \r
-                                                ordered list of driver image \r
-                                                handles. \r
-  @param  RemainingDevicePath                   RemainingDevicePath A pointer to \r
-                                                the device path that specifies a \r
-                                                child of the controller specified \r
-                                                by ControllerHandle. \r
-  @param  Recursive                             Whether the function would be \r
-                                                called recursively or not. \r
+  @param  ControllerHandle                      Handle of the controller to be\r
+                                                connected.\r
+  @param  DriverImageHandle                     DriverImageHandle A pointer to an\r
+                                                ordered list of driver image\r
+                                                handles.\r
+  @param  RemainingDevicePath                   RemainingDevicePath A pointer to\r
+                                                the device path that specifies a\r
+                                                child of the controller specified\r
+                                                by ControllerHandle.\r
+  @param  Recursive                             Whether the function would be\r
+                                                called recursively or not.\r
 \r
   @return Status code.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 CoreConnectController (\r
   IN  EFI_HANDLE                ControllerHandle,\r
@@ -1105,37 +1103,37 @@ CoreConnectController (
 /**\r
   Disonnects a controller from a driver\r
 \r
-  @param  ControllerHandle                      ControllerHandle The handle of \r
-                                                the controller from which \r
-                                                driver(s)  are to be \r
-                                                disconnected. \r
-  @param  DriverImageHandle                     DriverImageHandle The driver to \r
-                                                disconnect from ControllerHandle. \r
-  @param  ChildHandle                           ChildHandle The handle of the \r
-                                                child to destroy. \r
-\r
-  @retval EFI_SUCCESS                           One or more drivers were \r
-                                                disconnected from the controller. \r
-  @retval EFI_SUCCESS                           On entry, no drivers are managing \r
-                                                ControllerHandle. \r
-  @retval EFI_SUCCESS                           DriverImageHandle is not NULL, \r
-                                                and on entry DriverImageHandle is \r
-                                                not managing ControllerHandle. \r
-  @retval EFI_INVALID_PARAMETER                 ControllerHandle is not a valid \r
-                                                EFI_HANDLE. \r
-  @retval EFI_INVALID_PARAMETER                 DriverImageHandle is not NULL, \r
-                                                and it is not a valid EFI_HANDLE. \r
-  @retval EFI_INVALID_PARAMETER                 ChildHandle is not NULL, and it \r
-                                                is not a valid EFI_HANDLE. \r
-  @retval EFI_OUT_OF_RESOURCES                  There are not enough resources \r
-                                                available to disconnect any \r
-                                                drivers from ControllerHandle. \r
-  @retval EFI_DEVICE_ERROR                      The controller could not be \r
-                                                disconnected because of a device \r
+  @param  ControllerHandle                      ControllerHandle The handle of\r
+                                                the controller from which\r
+                                                driver(s)  are to be\r
+                                                disconnected.\r
+  @param  DriverImageHandle                     DriverImageHandle The driver to\r
+                                                disconnect from ControllerHandle.\r
+  @param  ChildHandle                           ChildHandle The handle of the\r
+                                                child to destroy.\r
+\r
+  @retval EFI_SUCCESS                           One or more drivers were\r
+                                                disconnected from the controller.\r
+  @retval EFI_SUCCESS                           On entry, no drivers are managing\r
+                                                ControllerHandle.\r
+  @retval EFI_SUCCESS                           DriverImageHandle is not NULL,\r
+                                                and on entry DriverImageHandle is\r
+                                                not managing ControllerHandle.\r
+  @retval EFI_INVALID_PARAMETER                 ControllerHandle is not a valid\r
+                                                EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER                 DriverImageHandle is not NULL,\r
+                                                and it is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER                 ChildHandle is not NULL, and it\r
+                                                is not a valid EFI_HANDLE.\r
+  @retval EFI_OUT_OF_RESOURCES                  There are not enough resources\r
+                                                available to disconnect any\r
+                                                drivers from ControllerHandle.\r
+  @retval EFI_DEVICE_ERROR                      The controller could not be\r
+                                                disconnected because of a device\r
                                                 error.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 CoreDisconnectController (\r
   IN  EFI_HANDLE  ControllerHandle,\r
@@ -1148,18 +1146,18 @@ CoreDisconnectController (
 /**\r
   Allocates pages from the memory map.\r
 \r
-  @param  Type                   The type of allocation to perform \r
-  @param  MemoryType             The type of memory to turn the allocated pages \r
-                                 into \r
-  @param  NumberOfPages          The number of pages to allocate \r
-  @param  Memory                 A pointer to receive the base allocated memory \r
-                                 address \r
+  @param  Type                   The type of allocation to perform\r
+  @param  MemoryType             The type of memory to turn the allocated pages\r
+                                 into\r
+  @param  NumberOfPages          The number of pages to allocate\r
+  @param  Memory                 A pointer to receive the base allocated memory\r
+                                 address\r
 \r
   @return Status. On success, Memory is filled in with the base address allocated\r
-  @retval EFI_INVALID_PARAMETER  Parameters violate checking rules defined in \r
-                                 spec. \r
-  @retval EFI_NOT_FOUND          Could not allocate pages match the requirement. \r
-  @retval EFI_OUT_OF_RESOURCES   No enough pages to allocate. \r
+  @retval EFI_INVALID_PARAMETER  Parameters violate checking rules defined in\r
+                                 spec.\r
+  @retval EFI_NOT_FOUND          Could not allocate pages match the requirement.\r
+  @retval EFI_OUT_OF_RESOURCES   No enough pages to allocate.\r
   @retval EFI_SUCCESS            Pages successfully allocated.\r
 \r
 **/\r
@@ -1177,15 +1175,15 @@ CoreAllocatePages (
 /**\r
   Frees previous allocated pages.\r
 \r
-  @param  Memory                 Base address of memory being freed \r
-  @param  NumberOfPages          The number of pages to free \r
+  @param  Memory                 Base address of memory being freed\r
+  @param  NumberOfPages          The number of pages to free\r
 \r
-  @retval EFI_NOT_FOUND          Could not find the entry that covers the range \r
-  @retval EFI_INVALID_PARAMETER  Address not aligned \r
+  @retval EFI_NOT_FOUND          Could not find the entry that covers the range\r
+  @retval EFI_INVALID_PARAMETER  Address not aligned\r
   @return EFI_SUCCESS         -Pages successfully freed.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 EFIAPI\r
 CoreFreePages (\r
   IN EFI_PHYSICAL_ADDRESS   Memory,\r
@@ -1198,29 +1196,29 @@ CoreFreePages (
   This function returns a copy of the current memory map. The map is an array of\r
   memory descriptors, each of which describes a contiguous block of memory.\r
 \r
-  @param  MemoryMapSize          A pointer to the size, in bytes, of the \r
-                                 MemoryMap buffer. On input, this is the size of \r
-                                 the buffer allocated by the caller.  On output, \r
-                                 it is the size of the buffer returned by the \r
-                                 firmware  if the buffer was large enough, or the \r
-                                 size of the buffer needed  to contain the map if \r
-                                 the buffer was too small. \r
-  @param  MemoryMap              A pointer to the buffer in which firmware places \r
-                                 the current memory map. \r
-  @param  MapKey                 A pointer to the location in which firmware \r
-                                 returns the key for the current memory map. \r
-  @param  DescriptorSize         A pointer to the location in which firmware \r
-                                 returns the size, in bytes, of an individual \r
-                                 EFI_MEMORY_DESCRIPTOR. \r
-  @param  DescriptorVersion      A pointer to the location in which firmware \r
-                                 returns the version number associated with the \r
-                                 EFI_MEMORY_DESCRIPTOR. \r
-\r
-  @retval EFI_SUCCESS            The memory map was returned in the MemoryMap \r
-                                 buffer. \r
-  @retval EFI_BUFFER_TOO_SMALL   The MemoryMap buffer was too small. The current \r
-                                 buffer size needed to hold the memory map is \r
-                                 returned in MemoryMapSize. \r
+  @param  MemoryMapSize          A pointer to the size, in bytes, of the\r
+                                 MemoryMap buffer. On input, this is the size of\r
+                                 the buffer allocated by the caller.  On output,\r
+                                 it is the size of the buffer returned by the\r
+                                 firmware  if the buffer was large enough, or the\r
+                                 size of the buffer needed  to contain the map if\r
+                                 the buffer was too small.\r
+  @param  MemoryMap              A pointer to the buffer in which firmware places\r
+                                 the current memory map.\r
+  @param  MapKey                 A pointer to the location in which firmware\r
+                                 returns the key for the current memory map.\r
+  @param  DescriptorSize         A pointer to the location in which firmware\r
+                                 returns the size, in bytes, of an individual\r
+                                 EFI_MEMORY_DESCRIPTOR.\r
+  @param  DescriptorVersion      A pointer to the location in which firmware\r
+                                 returns the version number associated with the\r
+                                 EFI_MEMORY_DESCRIPTOR.\r
+\r
+  @retval EFI_SUCCESS            The memory map was returned in the MemoryMap\r
+                                 buffer.\r
+  @retval EFI_BUFFER_TOO_SMALL   The MemoryMap buffer was too small. The current\r
+                                 buffer size needed to hold the memory map is\r
+                                 returned in MemoryMapSize.\r
   @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
 \r
 **/\r
@@ -1239,13 +1237,13 @@ CoreGetMemoryMap (
 /**\r
   Allocate pool of a particular type.\r
 \r
-  @param  PoolType               Type of pool to allocate \r
-  @param  Size                   The amount of pool to allocate \r
-  @param  Buffer                 The address to return a pointer to the allocated \r
-                                 pool \r
+  @param  PoolType               Type of pool to allocate\r
+  @param  Size                   The amount of pool to allocate\r
+  @param  Buffer                 The address to return a pointer to the allocated\r
+                                 pool\r
 \r
-  @retval EFI_INVALID_PARAMETER  PoolType not valid \r
-  @retval EFI_OUT_OF_RESOURCES   Size exceeds max pool size or allocation failed. \r
+  @retval EFI_INVALID_PARAMETER  PoolType not valid\r
+  @retval EFI_OUT_OF_RESOURCES   Size exceeds max pool size or allocation failed.\r
   @retval EFI_SUCCESS            Pool successfully allocated.\r
 \r
 **/\r
@@ -1262,9 +1260,9 @@ CoreAllocatePool (
 /**\r
   Frees pool.\r
 \r
-  @param  Buffer                 The allocated pool entry to free \r
+  @param  Buffer                 The allocated pool entry to free\r
 \r
-  @retval EFI_INVALID_PARAMETER  Buffer is not a valid value. \r
+  @retval EFI_INVALID_PARAMETER  Buffer is not a valid value.\r
   @retval EFI_SUCCESS            Pool successfully freed.\r
 \r
 **/\r
@@ -1279,27 +1277,35 @@ CoreFreePool (
 /**\r
   Loads an EFI image into memory and returns a handle to the image.\r
 \r
-  @param  BootPolicy              If TRUE, indicates that the request originates \r
-                                  from the boot manager, and that the boot \r
-                                  manager is attempting to load FilePath as a \r
-                                  boot selection. \r
-  @param  ParentImageHandle       The caller's image handle. \r
-  @param  FilePath                The specific file path from which the image is \r
-                                  loaded. \r
-  @param  SourceBuffer            If not NULL, a pointer to the memory location \r
-                                  containing a copy of the image to be loaded. \r
-  @param  SourceSize              The size in bytes of SourceBuffer. \r
-  @param  ImageHandle             Pointer to the returned image handle that is \r
-                                  created when the image is successfully loaded. \r
-\r
-  @retval EFI_SUCCESS             The image was loaded into memory. \r
-  @retval EFI_NOT_FOUND           The FilePath was not found. \r
-  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value. \r
-  @retval EFI_UNSUPPORTED         The image type is not supported, or the device \r
-                                  path cannot be parsed to locate the proper \r
-                                  protocol for loading the file. \r
-  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient \r
+  @param  BootPolicy              If TRUE, indicates that the request originates\r
+                                  from the boot manager, and that the boot\r
+                                  manager is attempting to load FilePath as a\r
+                                  boot selection.\r
+  @param  ParentImageHandle       The caller's image handle.\r
+  @param  FilePath                The specific file path from which the image is\r
+                                  loaded.\r
+  @param  SourceBuffer            If not NULL, a pointer to the memory location\r
+                                  containing a copy of the image to be loaded.\r
+  @param  SourceSize              The size in bytes of SourceBuffer.\r
+  @param  ImageHandle             Pointer to the returned image handle that is\r
+                                  created when the image is successfully loaded.\r
+\r
+  @retval EFI_SUCCESS             The image was loaded into memory.\r
+  @retval EFI_NOT_FOUND           The FilePath was not found.\r
+  @retval EFI_INVALID_PARAMETER   One of the parameters has an invalid value.\r
+  @retval EFI_UNSUPPORTED         The image type is not supported, or the device\r
+                                  path cannot be parsed to locate the proper\r
+                                  protocol for loading the file.\r
+  @retval EFI_OUT_OF_RESOURCES    Image was not loaded due to insufficient\r
                                   resources.\r
+  @retval EFI_LOAD_ERROR          Image was not loaded because the image format was corrupt or not\r
+                                  understood.\r
+  @retval EFI_DEVICE_ERROR        Image was not loaded because the device returned a read error.\r
+  @retval EFI_ACCESS_DENIED       Image was not loaded because the platform policy prohibits the \r
+                                  image from being loaded. NULL is returned in *ImageHandle.\r
+  @retval EFI_SECURITY_VIOLATION  Image was loaded and an ImageHandle was created with a \r
+                                  valid EFI_LOADED_IMAGE_PROTOCOL. However, the current \r
+                                  platform policy specifies that the image should not be started.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1318,12 +1324,12 @@ CoreLoadImage (
 /**\r
   Unloads an image.\r
 \r
-  @param  ImageHandle             Handle that identifies the image to be \r
-                                  unloaded. \r
+  @param  ImageHandle             Handle that identifies the image to be\r
+                                  unloaded.\r
 \r
-  @retval EFI_SUCCESS             The image has been unloaded. \r
-  @retval EFI_UNSUPPORTED         The image has been sarted, and does not support \r
-                                  unload. \r
+  @retval EFI_SUCCESS             The image has been unloaded.\r
+  @retval EFI_UNSUPPORTED         The image has been sarted, and does not support\r
+                                  unload.\r
   @retval EFI_INVALID_PARAMPETER  ImageHandle is not a valid image handle.\r
 \r
 **/\r
@@ -1338,18 +1344,18 @@ CoreUnloadImage (
 /**\r
   Transfer control to a loaded image's entry point.\r
 \r
-  @param  ImageHandle             Handle of image to be started. \r
-  @param  ExitDataSize            Pointer of the size to ExitData \r
-  @param  ExitData                Pointer to a pointer to a data buffer that \r
-                                  includes a Null-terminated Unicode string, \r
-                                  optionally followed by additional binary data. \r
-                                  The string is a description that the caller may \r
-                                  use to further indicate the reason for the \r
-                                  image's exit. \r
-\r
-  @retval EFI_INVALID_PARAMETER   Invalid parameter \r
-  @retval EFI_OUT_OF_RESOURCES    No enough buffer to allocate \r
-  @retval EFI_SUCCESS             Successfully transfer control to the image's \r
+  @param  ImageHandle             Handle of image to be started.\r
+  @param  ExitDataSize            Pointer of the size to ExitData\r
+  @param  ExitData                Pointer to a pointer to a data buffer that\r
+                                  includes a Null-terminated string,\r
+                                  optionally followed by additional binary data.\r
+                                  The string is a description that the caller may\r
+                                  use to further indicate the reason for the\r
+                                  image's exit.\r
+\r
+  @retval EFI_INVALID_PARAMETER   Invalid parameter\r
+  @retval EFI_OUT_OF_RESOURCES    No enough buffer to allocate\r
+  @retval EFI_SUCCESS             Successfully transfer control to the image's\r
                                   entry point.\r
 \r
 **/\r
@@ -1366,23 +1372,23 @@ CoreStartImage (
 /**\r
   Terminates the currently loaded EFI image and returns control to boot services.\r
 \r
-  @param  ImageHandle             Handle that identifies the image. This \r
-                                  parameter is passed to the image on entry. \r
-  @param  Status                  The image's exit code. \r
-  @param  ExitDataSize            The size, in bytes, of ExitData. Ignored if \r
-                                  ExitStatus is EFI_SUCCESS. \r
-  @param  ExitData                Pointer to a data buffer that includes a \r
-                                  Null-terminated Unicode string, optionally \r
-                                  followed by additional binary data. The string \r
-                                  is a description that the caller may use to \r
-                                  further indicate the reason for the image's \r
-                                  exit. \r
-\r
-  @retval EFI_INVALID_PARAMETER   Image handle is NULL or it is not current \r
-                                  image. \r
-  @retval EFI_SUCCESS             Successfully terminates the currently loaded \r
-                                  EFI image. \r
-  @retval EFI_ACCESS_DENIED       Should never reach there. \r
+  @param  ImageHandle             Handle that identifies the image. This\r
+                                  parameter is passed to the image on entry.\r
+  @param  Status                  The image's exit code.\r
+  @param  ExitDataSize            The size, in bytes, of ExitData. Ignored if\r
+                                  ExitStatus is EFI_SUCCESS.\r
+  @param  ExitData                Pointer to a data buffer that includes a\r
+                                  Null-terminated Unicode string, optionally\r
+                                  followed by additional binary data. The string\r
+                                  is a description that the caller may use to\r
+                                  further indicate the reason for the image's\r
+                                  exit.\r
+\r
+  @retval EFI_INVALID_PARAMETER   Image handle is NULL or it is not current\r
+                                  image.\r
+  @retval EFI_SUCCESS             Successfully terminates the currently loaded\r
+                                  EFI image.\r
+  @retval EFI_ACCESS_DENIED       Should never reach there.\r
   @retval EFI_OUT_OF_RESOURCES    Could not allocate pool\r
 \r
 **/\r
@@ -1400,18 +1406,18 @@ CoreExit (
 /**\r
   Creates a general-purpose event structure.\r
 \r
-  @param  Type                   The type of event to create and its mode and \r
-                                 attributes \r
-  @param  NotifyTpl              The task priority level of event notifications \r
-  @param  NotifyFunction         Pointer to the events notification function \r
-  @param  NotifyContext          Pointer to the notification functions context; \r
-                                 corresponds to parameter "Context" in the \r
-                                 notification function \r
-  @param  Event                  Pointer to the newly created event if the call \r
-                                 succeeds; undefined otherwise \r
-\r
-  @retval EFI_SUCCESS            The event structure was created \r
-  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @param  Type                   The type of event to create and its mode and\r
+                                 attributes\r
+  @param  NotifyTpl              The task priority level of event notifications\r
+  @param  NotifyFunction         Pointer to the events notification function\r
+  @param  NotifyContext          Pointer to the notification functions context;\r
+                                 corresponds to parameter "Context" in the\r
+                                 notification function\r
+  @param  Event                  Pointer to the newly created event if the call\r
+                                 succeeds; undefined otherwise\r
+\r
+  @retval EFI_SUCCESS            The event structure was created\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
   @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
 \r
 **/\r
@@ -1430,20 +1436,20 @@ CoreCreateEvent (
 /**\r
   Creates a general-purpose event structure\r
 \r
-  @param  Type                   The type of event to create and its mode and \r
-                                 attributes \r
-  @param  NotifyTpl              The task priority level of event notifications \r
-  @param  NotifyFunction         Pointer to the events notification function \r
-  @param  NotifyContext          Pointer to the notification functions context; \r
-                                 corresponds to parameter "Context" in the \r
-                                 notification function \r
-  @param  EventGroup             GUID for EventGroup if NULL act the same as \r
-                                 gBS->CreateEvent(). \r
-  @param  Event                  Pointer to the newly created event if the call \r
-                                 succeeds; undefined otherwise \r
-\r
-  @retval EFI_SUCCESS            The event structure was created \r
-  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value \r
+  @param  Type                   The type of event to create and its mode and\r
+                                 attributes\r
+  @param  NotifyTpl              The task priority level of event notifications\r
+  @param  NotifyFunction         Pointer to the events notification function\r
+  @param  NotifyContext          Pointer to the notification functions context;\r
+                                 corresponds to parameter "Context" in the\r
+                                 notification function\r
+  @param  EventGroup             GUID for EventGroup if NULL act the same as\r
+                                 gBS->CreateEvent().\r
+  @param  Event                  Pointer to the newly created event if the call\r
+                                 succeeds; undefined otherwise\r
+\r
+  @retval EFI_SUCCESS            The event structure was created\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value\r
   @retval EFI_OUT_OF_RESOURCES   The event could not be allocated\r
 \r
 **/\r
@@ -1463,15 +1469,15 @@ CoreCreateEventEx (
 /**\r
   Sets the type of timer and the trigger time for a timer event.\r
 \r
-  @param  UserEvent              The timer event that is to be signaled at the \r
-                                 specified time \r
-  @param  Type                   The type of time that is specified in \r
-                                 TriggerTime \r
-  @param  TriggerTime            The number of 100ns units until the timer \r
-                                 expires \r
+  @param  UserEvent              The timer event that is to be signaled at the\r
+                                 specified time\r
+  @param  Type                   The type of time that is specified in\r
+                                 TriggerTime\r
+  @param  TriggerTime            The number of 100ns units until the timer\r
+                                 expires\r
 \r
-  @retval EFI_SUCCESS            The event has been set to be signaled at the \r
-                                 requested time \r
+  @retval EFI_SUCCESS            The event has been set to be signaled at the\r
+                                 requested time\r
   @retval EFI_INVALID_PARAMETER  Event or Type is not valid\r
 \r
 **/\r
@@ -1486,11 +1492,11 @@ CoreSetTimer (
 \r
 \r
 /**\r
-  Signals the event.  Queues the event to be notified if needed\r
+  Signals the event.  Queues the event to be notified if needed.\r
 \r
-  @param  UserEvent              The event to signal \r
+  @param  UserEvent              The event to signal .\r
 \r
-  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid.\r
   @retval EFI_SUCCESS            The event was signaled.\r
 \r
 **/\r
@@ -1505,14 +1511,14 @@ CoreSignalEvent (
 /**\r
   Stops execution until an event is signaled.\r
 \r
-  @param  NumberOfEvents         The number of events in the UserEvents array \r
-  @param  UserEvents             An array of EFI_EVENT \r
-  @param  UserIndex              Pointer to the index of the event which \r
-                                 satisfied the wait condition \r
+  @param  NumberOfEvents         The number of events in the UserEvents array\r
+  @param  UserEvents             An array of EFI_EVENT\r
+  @param  UserIndex              Pointer to the index of the event which\r
+                                 satisfied the wait condition\r
 \r
-  @retval EFI_SUCCESS            The event indicated by Index was signaled. \r
-  @retval EFI_INVALID_PARAMETER  The event indicated by Index has a notification \r
-                                 function or Event was not a valid type \r
+  @retval EFI_SUCCESS            The event indicated by Index was signaled.\r
+  @retval EFI_INVALID_PARAMETER  The event indicated by Index has a notification\r
+                                 function or Event was not a valid type\r
   @retval EFI_UNSUPPORTED        The current TPL is not TPL_APPLICATION\r
 \r
 **/\r
@@ -1529,9 +1535,9 @@ CoreWaitForEvent (
 /**\r
   Closes an event and frees the event structure.\r
 \r
-  @param  UserEvent              Event to close \r
+  @param  UserEvent              Event to close\r
 \r
-  @retval EFI_INVALID_PARAMETER  Parameters are not valid. \r
+  @retval EFI_INVALID_PARAMETER  Parameters are not valid.\r
   @retval EFI_SUCCESS            The event has been closed\r
 \r
 **/\r
@@ -1546,10 +1552,10 @@ CoreCloseEvent (
 /**\r
   Check the status of an event.\r
 \r
-  @param  UserEvent              The event to check \r
+  @param  UserEvent              The event to check\r
 \r
-  @retval EFI_SUCCESS            The event is in the signaled state \r
-  @retval EFI_NOT_READY          The event is not in the signaled state \r
+  @retval EFI_SUCCESS            The event is in the signaled state\r
+  @retval EFI_NOT_READY          The event is not in the signaled state\r
   @retval EFI_INVALID_PARAMETER  Event is of type EVT_NOTIFY_SIGNAL\r
 \r
 **/\r
@@ -1564,15 +1570,16 @@ CoreCheckEvent (
   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
+  @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
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreAddMemorySpace (\r
   IN EFI_GCD_MEMORY_TYPE   GcdMemoryType,\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
@@ -1585,20 +1592,21 @@ CoreAddMemorySpace (
   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 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
 \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter. \r
-  @retval EFI_NOT_FOUND          No descriptor contains the desired space. \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
 EFI_STATUS\r
+EFIAPI\r
 CoreAllocateMemorySpace (\r
   IN     EFI_GCD_ALLOCATE_TYPE  GcdAllocateType,\r
   IN     EFI_GCD_MEMORY_TYPE    GcdMemoryType,\r
@@ -1614,13 +1622,14 @@ CoreAllocateMemorySpace (
   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 memory space. \r
-  @param  Length                 Length of the memory space. \r
+  @param  BaseAddress            Base address of the memory space.\r
+  @param  Length                 Length of the memory space.\r
 \r
   @retval EFI_SUCCESS            Space successfully freed.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreFreeMemorySpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
@@ -1631,13 +1640,14 @@ CoreFreeMemorySpace (
   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
+  @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
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreRemoveMemorySpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
@@ -1647,14 +1657,15 @@ CoreRemoveMemorySpace (
 /**\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            Specified start address\r
+  @param  Descriptor             Specified length\r
 \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
+  @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCCESS            Successfully get memory space descriptor.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreGetMemorySpaceDescriptor (\r
   IN  EFI_PHYSICAL_ADDRESS             BaseAddress,\r
   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Descriptor\r
@@ -1665,15 +1676,16 @@ CoreGetMemorySpaceDescriptor (
   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
+  @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 \r
+  @retval EFI_SUCCESS            Successfully set attribute of a segment of\r
                                  memory space.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreSetMemorySpaceAttributes (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length,\r
@@ -1685,15 +1697,16 @@ CoreSetMemorySpaceAttributes (
   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    Number of descriptors.\r
+  @param  MemorySpaceMap         Descriptor array\r
 \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \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
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreGetMemorySpaceMap (\r
   OUT UINTN                            *NumberOfDescriptors,\r
   OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR  **MemorySpaceMap\r
@@ -1703,15 +1716,16 @@ CoreGetMemorySpaceMap (
 /**\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
+  @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
+  @retval EFI_SUCCESS            Merged this segment into GCD map.\r
   @retval EFI_INVALID_PARAMETER  Parameter not valid\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreAddIoSpace (\r
   IN EFI_GCD_IO_TYPE       GcdIoType,\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
@@ -1723,20 +1737,21 @@ CoreAddIoSpace (
   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
+  @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_INVALID_PARAMETER  Invalid parameter.\r
+  @retval EFI_NOT_FOUND          No descriptor contains the desired space.\r
   @retval EFI_SUCCESS            IO space successfully allocated.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreAllocateIoSpace (\r
   IN     EFI_GCD_ALLOCATE_TYPE  GcdAllocateType,\r
   IN     EFI_GCD_IO_TYPE        GcdIoType,\r
@@ -1752,13 +1767,14 @@ CoreAllocateIoSpace (
   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            Base address of the segment.\r
+  @param  Length                 Length of the segment.\r
 \r
   @retval EFI_SUCCESS            Space successfully freed.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreFreeIoSpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
@@ -1769,13 +1785,14 @@ CoreFreeIoSpace (
   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
+  @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
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreRemoveIoSpace (\r
   IN EFI_PHYSICAL_ADDRESS  BaseAddress,\r
   IN UINT64                Length\r
@@ -1785,14 +1802,15 @@ CoreRemoveIoSpace (
 /**\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            Specified start address\r
+  @param  Descriptor             Specified length\r
 \r
-  @retval EFI_INVALID_PARAMETER  Descriptor is NULL. \r
+  @retval EFI_INVALID_PARAMETER  Descriptor is NULL.\r
   @retval EFI_SUCCESS            Successfully get the IO space descriptor.\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreGetIoSpaceDescriptor (\r
   IN  EFI_PHYSICAL_ADDRESS         BaseAddress,\r
   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  *Descriptor\r
@@ -1802,15 +1820,16 @@ CoreGetIoSpaceDescriptor (
 /**\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  IoSpaceMap             Descriptor array \r
+  @param  NumberOfDescriptors    Number of descriptors.\r
+  @param  IoSpaceMap             Descriptor array\r
 \r
-  @retval EFI_INVALID_PARAMETER  Invalid parameter \r
-  @retval EFI_OUT_OF_RESOURCES   No enough buffer to allocate \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
 EFI_STATUS\r
+EFIAPI\r
 CoreGetIoSpaceMap (\r
   OUT UINTN                        *NumberOfDescriptors,\r
   OUT EFI_GCD_IO_SPACE_DESCRIPTOR  **IoSpaceMap\r
@@ -1826,9 +1845,9 @@ CoreGetIoSpaceMap (
   will be called, and when the Bds() exits the Dispatcher will be called\r
   again.\r
 \r
-  @retval EFI_ALREADY_STARTED    The DXE Dispatcher is already running \r
-  @retval EFI_NOT_FOUND          No DXE Drivers were dispatched \r
-  @retval EFI_SUCCESS            One or more DXE Drivers were dispatched \r
+  @retval EFI_ALREADY_STARTED   The DXE Dispatcher is already running\r
+  @retval EFI_NOT_FOUND         No DXE Drivers were dispatched\r
+  @retval EFI_SUCCESS           One or more DXE Drivers were dispatched\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1841,14 +1860,14 @@ CoreDispatcher (
   Check every driver and locate a matching one. If the driver is found, the Unrequested\r
   state flag is cleared.\r
 \r
-  @param  FirmwareVolumeHandle   The handle of the Firmware Volume that contains \r
-                                 the firmware  file specified by DriverName. \r
-  @param  DriverName             The Driver name to put in the Dependent state. \r
+  @param  FirmwareVolumeHandle  The handle of the Firmware Volume that contains\r
+                                the firmware  file specified by DriverName.\r
+  @param  DriverName            The Driver name to put in the Dependent state.\r
 \r
-  @retval EFI_SUCCESS            The DriverName was found and it's SOR bit was \r
-                                 cleared \r
-  @retval EFI_NOT_FOUND          The DriverName does not exist or it's SOR bit \r
-                                 was not set. \r
+  @retval EFI_SUCCESS           The DriverName was found and it's SOR bit was\r
+                                cleared\r
+  @retval EFI_NOT_FOUND         The DriverName does not exist or it's SOR bit was\r
+                                not set.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1860,15 +1879,15 @@ CoreSchedule (
 \r
 \r
 /**\r
-  Convert a driver from the Untrused back to the Scheduled state\r
+  Convert a driver from the Untrused back to the Scheduled state.\r
 \r
-  @param  FirmwareVolumeHandle   The handle of the Firmware Volume that contains \r
-                                 the firmware  file specified by DriverName. \r
-  @param  DriverName             The Driver name to put in the Scheduled state \r
+  @param  FirmwareVolumeHandle  The handle of the Firmware Volume that contains\r
+                                the firmware  file specified by DriverName.\r
+  @param  DriverName            The Driver name to put in the Scheduled state\r
 \r
-  @retval EFI_SUCCESS            The file was found in the untrusted state, and \r
-                                 it was promoted  to the trusted state. \r
-  @retval EFI_NOT_FOUND          The file was not found in the untrusted state. \r
+  @retval EFI_SUCCESS           The file was found in the untrusted state, and it\r
+                                was promoted  to the trusted state.\r
+  @retval EFI_NOT_FOUND         The file was not found in the untrusted state.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1879,36 +1898,13 @@ CoreTrust (
   );\r
 \r
 \r
-/**\r
-  Helper function called as part of the code needed\r
-  to allocate the proper sized buffer for various\r
-  EFI interfaces.\r
-\r
-  @param  Status                 Current status \r
-  @param  Buffer                 Current allocated buffer, or NULL \r
-  @param  BufferSize             Current buffer size needed \r
-\r
-  @retval TRUE                   if the buffer was reallocated and the caller \r
-                                 should try the API again. \r
-  @retval FALSE                  buffer could not be allocated and the caller \r
-                                 should not try the API again.\r
-\r
-**/\r
-BOOLEAN\r
-CoreGrowBuffer (\r
-  IN OUT EFI_STATUS   *Status,\r
-  IN OUT VOID         **Buffer,\r
-  IN UINTN            BufferSize\r
-  );\r
-\r
-\r
 /**\r
   This routine is the driver initialization entry point.  It initializes the\r
   libraries, and registers two notification functions.  These notification\r
   functions are responsible for building the FV stack dynamically.\r
 \r
-  @param  ImageHandle           The image handle. \r
-  @param  SystemTable           The system table. \r
+  @param  ImageHandle           The image handle.\r
+  @param  SystemTable           The system table.\r
 \r
   @retval EFI_SUCCESS           Function successfully returned.\r
 \r
@@ -1945,22 +1941,23 @@ InitializeSectionExtraction (
   particular, it can be called by BDS to process a single firmware\r
   volume found in a capsule.\r
 \r
-  @param  FvHeader               pointer to a firmware volume header \r
-  @param  Size                   the size of the buffer pointed to by FvHeader \r
-  @param  FVProtocolHandle       the handle on which a firmware volume protocol \r
-                                 was produced for the firmware volume passed in. \r
+  @param  FvHeader               pointer to a firmware volume header\r
+  @param  Size                   the size of the buffer pointed to by FvHeader\r
+  @param  FVProtocolHandle       the handle on which a firmware volume protocol\r
+                                 was produced for the firmware volume passed in.\r
 \r
-  @retval EFI_OUT_OF_RESOURCES   if an FVB could not be produced due to lack of  \r
-                                 system resources \r
-  @retval EFI_VOLUME_CORRUPTED   if the volume was corrupted \r
-  @retval EFI_SUCCESS            a firmware volume protocol was produced for the \r
+  @retval EFI_OUT_OF_RESOURCES   if an FVB could not be produced due to lack of\r
+                                 system resources\r
+  @retval EFI_VOLUME_CORRUPTED   if the volume was corrupted\r
+  @retval EFI_SUCCESS            a firmware volume protocol was produced for the\r
                                  firmware volume\r
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CoreProcessFirmwareVolume (\r
   IN VOID                             *FvHeader,\r
-  IN UINTN                            Size, \r
+  IN UINTN                            Size,\r
   OUT EFI_HANDLE                      *FVProtocolHandle\r
   );\r
 \r
@@ -1977,7 +1974,7 @@ VOID
 CoreDisplayMissingArchProtocols (\r
   VOID\r
   );\r
-  \r
+\r
 \r
 /**\r
   Traverse the discovered list for any drivers that were discovered but not loaded\r
@@ -2008,7 +2005,7 @@ CoreEfiNotAvailableYetArg0 (
   Place holder function until all the Boot Services and Runtime Services are\r
   available.\r
 \r
-  @param  Arg1                   Undefined \r
+  @param  Arg1                   Undefined\r
 \r
   @return EFI_NOT_AVAILABLE_YET\r
 \r
@@ -2023,8 +2020,8 @@ CoreEfiNotAvailableYetArg1 (
 /**\r
   Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  @param  Arg1                   Undefined \r
-  @param  Arg2                   Undefined \r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
 \r
   @return EFI_NOT_AVAILABLE_YET\r
 \r
@@ -2040,9 +2037,9 @@ CoreEfiNotAvailableYetArg2 (
 /**\r
   Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  @param  Arg1                   Undefined \r
-  @param  Arg2                   Undefined \r
-  @param  Arg3                   Undefined \r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
 \r
   @return EFI_NOT_AVAILABLE_YET\r
 \r
@@ -2059,10 +2056,10 @@ CoreEfiNotAvailableYetArg3 (
 /**\r
   Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  @param  Arg1                   Undefined \r
-  @param  Arg2                   Undefined \r
-  @param  Arg3                   Undefined \r
-  @param  Arg4                   Undefined \r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
+  @param  Arg4                   Undefined\r
 \r
   @return EFI_NOT_AVAILABLE_YET\r
 \r
@@ -2080,11 +2077,11 @@ CoreEfiNotAvailableYetArg4 (
 /**\r
   Place holder function until all the Boot Services and Runtime Services are available.\r
 \r
-  @param  Arg1                   Undefined \r
-  @param  Arg2                   Undefined \r
-  @param  Arg3                   Undefined \r
-  @param  Arg4                   Undefined \r
-  @param  Arg5                   Undefined \r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
+  @param  Arg4                   Undefined\r
+  @param  Arg5                   Undefined\r
 \r
   @return EFI_NOT_AVAILABLE_YET\r
 \r
@@ -2100,24 +2097,6 @@ CoreEfiNotAvailableYetArg5 (
   );\r
 \r
 \r
-/**\r
-  Searches for a Protocol Interface passed from PEI through a HOB.\r
-\r
-  @param  ProtocolGuid           The Protocol GUID to search for in the HOB List \r
-  @param  Interface              A pointer to the interface for the Protocol GUID \r
-\r
-  @retval EFI_SUCCESS            The Protocol GUID was found and its interface is \r
-                                 returned in Interface \r
-  @retval EFI_NOT_FOUND          The Protocol GUID was not found in the HOB List\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetPeiProtocol (\r
-  IN EFI_GUID  *ProtocolGuid,\r
-  IN VOID      **Interface\r
-  );\r
-\r
-\r
 /**\r
   Given a compressed source buffer, this function retrieves the size of the\r
   uncompressed buffer and the size of the scratch buffer required to decompress\r
@@ -2147,7 +2126,7 @@ CoreGetPeiProtocol (
                              buffer that is required to decompress the\r
                              compressed buffer specified by Source and\r
                              SourceSize.\r
-   \r
+\r
   @retval EFI_SUCCESS        The size of the uncompressed data was returned in\r
                              DestinationSize and the size of the scratch buffer\r
                              was returned in ScratchSize.\r
@@ -2194,7 +2173,7 @@ DxeMainUefiDecompressGetInfo (
                               the decompression.\r
   @param  ScratchSize         The size of scratch buffer. The size of the\r
                               scratch buffer needed is obtained from GetInfo().\r
-  \r
+\r
   @retval EFI_SUCCESS         Decompression completed successfully, and the\r
                               uncompressed buffer is returned in Destination.\r
   @retval EFI_INVALID_PARAMETER  The source buffer specified by Source and\r
@@ -2205,7 +2184,7 @@ DxeMainUefiDecompressGetInfo (
 EFI_STATUS\r
 EFIAPI\r
 DxeMainUefiDecompress (\r
-  IN EFI_DECOMPRESS_PROTOCOL              *This,\r
+  IN     EFI_DECOMPRESS_PROTOCOL          *This,\r
   IN     VOID                             *Source,\r
   IN     UINT32                           SourceSize,\r
   IN OUT VOID                             *Destination,\r
@@ -2218,14 +2197,14 @@ DxeMainUefiDecompress (
   SEP member function.  This function creates and returns a new section stream\r
   handle to represent the new section stream.\r
 \r
-  @param  SectionStreamLength    Size in bytes of the section stream. \r
-  @param  SectionStream          Buffer containing the new section stream. \r
-  @param  SectionStreamHandle    A pointer to a caller allocated UINTN that on \r
-                                 output contains the new section stream handle. \r
+  @param  SectionStreamLength    Size in bytes of the section stream.\r
+  @param  SectionStream          Buffer containing the new section stream.\r
+  @param  SectionStreamHandle    A pointer to a caller allocated UINTN that on\r
+                                 output contains the new section stream handle.\r
 \r
   @retval EFI_SUCCESS            The section stream is created successfully.\r
-  @retval EFI_OUT_OF_RESOURCES   memory allocation failed. \r
-  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+  @retval EFI_OUT_OF_RESOURCES   memory allocation failed.\r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end\r
                                  of last section.\r
 \r
 **/\r
@@ -2312,11 +2291,11 @@ GetSection (
 /**\r
   SEP member function.  Deletes an existing section stream\r
 \r
-  @param  StreamHandleToClose    Indicates the stream to close \r
+  @param  StreamHandleToClose    Indicates the stream to close\r
 \r
   @retval EFI_SUCCESS            The section stream is closed sucessfully.\r
-  @retval EFI_OUT_OF_RESOURCES   Memory allocation failed. \r
-  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end \r
+  @retval EFI_OUT_OF_RESOURCES   Memory allocation failed.\r
+  @retval EFI_INVALID_PARAMETER  Section stream does not end concident with end\r
                                  of last section.\r
 \r
 **/\r
@@ -2326,4 +2305,157 @@ CloseSectionStream (
   IN  UINTN                                     StreamHandleToClose\r
   );\r
 \r
+/**\r
+  Creates and initializes the DebugImageInfo Table.  Also creates the configuration\r
+  table and registers it into the system table.\r
+\r
+  Note:\r
+    This function allocates memory, frees it, and then allocates memory at an\r
+    address within the initial allocation. Since this function is called early\r
+    in DXE core initialization (before drivers are dispatched), this should not\r
+    be a problem.\r
+\r
+**/\r
+VOID\r
+CoreInitializeDebugImageInfoTable (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Update the CRC32 in the Debug Table.\r
+  Since the CRC32 service is made available by the Runtime driver, we have to\r
+  wait for the Runtime Driver to be installed before the CRC32 can be computed.\r
+  This function is called elsewhere by the core when the runtime architectural\r
+  protocol is produced.\r
+\r
+**/\r
+VOID\r
+CoreUpdateDebugTableCrc32 (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Adds a new DebugImageInfo structure to the DebugImageInfo Table.  Re-Allocates\r
+  the table if it's not large enough to accomidate another entry.\r
+\r
+  @param  ImageInfoType  type of debug image information\r
+  @param  LoadedImage    pointer to the loaded image protocol for the image being\r
+                         loaded\r
+  @param  ImageHandle    image handle for the image being loaded\r
+\r
+**/\r
+VOID\r
+CoreNewDebugImageInfoEntry (\r
+  IN  UINT32                      ImageInfoType,\r
+  IN  EFI_LOADED_IMAGE_PROTOCOL   *LoadedImage,\r
+  IN  EFI_HANDLE                  ImageHandle\r
+  );\r
+\r
+\r
+/**\r
+  Removes and frees an entry from the DebugImageInfo Table.\r
+\r
+  @param  ImageHandle    image handle for the image being unloaded\r
+\r
+**/\r
+VOID\r
+CoreRemoveDebugImageInfoEntry (\r
+  EFI_HANDLE ImageHandle\r
+  );\r
+\r
+\r
+/**\r
+  This routine consumes FV hobs and produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
+\r
+  @param  ImageHandle            The image handle.\r
+  @param  SystemTable            The system table.\r
+\r
+  @retval EFI_SUCCESS            Successfully initialized firmware volume block\r
+                                 driver.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FwVolBlockDriverInit (\r
+  IN EFI_HANDLE                 ImageHandle,\r
+  IN EFI_SYSTEM_TABLE           *SystemTable\r
+  );\r
+\r
+\r
+/**\r
+  This routine produces a firmware volume block protocol on a given\r
+  buffer.\r
+\r
+  @param  BaseAddress            base address of the firmware volume image\r
+  @param  Length                 length of the firmware volume image\r
+  @param  ParentHandle           handle of parent firmware volume, if this image\r
+                                 came from an FV image file in another firmware\r
+                                 volume (ala capsules)\r
+  @param  FvProtocol             Firmware volume block protocol produced.\r
+\r
+  @retval EFI_VOLUME_CORRUPTED   Volume corrupted.\r
+  @retval EFI_OUT_OF_RESOURCES   No enough buffer to be allocated.\r
+  @retval EFI_SUCCESS            Successfully produced a FVB protocol on given\r
+                                 buffer.\r
+\r
+**/\r
+EFI_STATUS\r
+ProduceFVBProtocolOnBuffer (\r
+  IN EFI_PHYSICAL_ADDRESS   BaseAddress,\r
+  IN UINT64                 Length,\r
+  IN EFI_HANDLE             ParentHandle,\r
+  OUT EFI_HANDLE            *FvProtocol  OPTIONAL\r
+  );\r
+\r
+\r
+/**\r
+  Raising to the task priority level of the mutual exclusion\r
+  lock, and then acquires ownership of the lock.\r
+\r
+  @param  Lock               The lock to acquire\r
+\r
+  @return Lock owned\r
+\r
+**/\r
+VOID\r
+CoreAcquireLock (\r
+  IN EFI_LOCK  *Lock\r
+  );\r
+\r
+\r
+/**\r
+  Initialize a basic mutual exclusion lock.   Each lock\r
+  provides mutual exclusion access at it's task priority\r
+  level.  Since there is no-premption (at any TPL) or\r
+  multiprocessor support, acquiring the lock only consists\r
+  of raising to the locks TPL.\r
+\r
+  @param  Lock               The EFI_LOCK structure to initialize\r
+\r
+  @retval EFI_SUCCESS        Lock Owned.\r
+  @retval EFI_ACCESS_DENIED  Reentrant Lock Acquisition, Lock not Owned.\r
+\r
+**/\r
+EFI_STATUS\r
+CoreAcquireLockOrFail (\r
+  IN EFI_LOCK  *Lock\r
+  );\r
+\r
+\r
+/**\r
+  Releases ownership of the mutual exclusion lock, and\r
+  restores the previous task priority level.\r
+\r
+  @param  Lock               The lock to release\r
+\r
+  @return Lock unowned\r
+\r
+**/\r
+VOID\r
+CoreReleaseLock (\r
+  IN EFI_LOCK  *Lock\r
+  );\r
+\r
 #endif\r