]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / UefiRuntimeLib / RuntimeLib.c
index 1133a8808c5ce25855f4bc79da7285244f81d0a1..ffc4cf4d2af334b1714325748efe53d269a32fe7 100644 (file)
@@ -3,17 +3,11 @@
 \r
   This library hides the global variable for the EFI Runtime Services so the\r
   caller does not need to deal with the possibility of being called from an\r
-  OS virtual address space. All pointer values are different for a virtual \r
+  OS virtual address space. All pointer values are different for a virtual\r
   mapping than from the normal physical mapping at boot services time.\r
 \r
-Copyright (c) 2006 - 2010, 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
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -27,24 +21,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///\r
 /// Driver Lib Module Globals\r
 ///\r
-EFI_EVENT              mEfiVirtualNotifyEvent;\r
-EFI_EVENT              mEfiExitBootServicesEvent;\r
-BOOLEAN                mEfiGoneVirtual         = FALSE;\r
-BOOLEAN                mEfiAtRuntime           = FALSE;\r
-EFI_RUNTIME_SERVICES   *mInternalRT;\r
+EFI_EVENT             mEfiVirtualNotifyEvent;\r
+EFI_EVENT             mEfiExitBootServicesEvent;\r
+BOOLEAN               mEfiGoneVirtual = FALSE;\r
+BOOLEAN               mEfiAtRuntime   = FALSE;\r
+EFI_RUNTIME_SERVICES  *mInternalRT;\r
 \r
 /**\r
   Set AtRuntime flag as TRUE after ExitBootServices.\r
 \r
-  @param[in]  Event   The Event that is being processed\r
-  @param[in]  Context Event Context\r
+  @param[in]  Event   The Event that is being processed.\r
+  @param[in]  Context The Event Context.\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 RuntimeLibExitBootServicesEvent (\r
-  IN EFI_EVENT        Event,\r
-  IN VOID             *Context\r
+  IN EFI_EVENT  Event,\r
+  IN VOID       *Context\r
   )\r
 {\r
   mEfiAtRuntime = TRUE;\r
@@ -55,20 +49,20 @@ RuntimeLibExitBootServicesEvent (
   Call the passed in Child Notify event and convert any pointers in\r
   lib to virtual mode.\r
 \r
-  @param[in]    Event   The Event that is being processed\r
-  @param[in]    Context Event Context\r
+  @param[in]    Event   The Event that is being processed.\r
+  @param[in]    Context The Event Context.\r
 **/\r
 VOID\r
 EFIAPI\r
 RuntimeLibVirtualNotifyEvent (\r
-  IN EFI_EVENT        Event,\r
-  IN VOID             *Context\r
+  IN EFI_EVENT  Event,\r
+  IN VOID       *Context\r
   )\r
 {\r
   //\r
   // Update global for Runtime Services Table and IO\r
   //\r
-  EfiConvertPointer (0, (VOID **) &mInternalRT);\r
+  EfiConvertPointer (0, (VOID **)&mInternalRT);\r
 \r
   mEfiGoneVirtual = TRUE;\r
 }\r
@@ -86,8 +80,8 @@ RuntimeLibVirtualNotifyEvent (
 EFI_STATUS\r
 EFIAPI\r
 RuntimeDriverLibConstruct (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -99,23 +93,21 @@ RuntimeDriverLibConstruct (
   //\r
   // Register SetVirtualAddressMap () notify function\r
   //\r
-  Status = gBS->CreateEventEx (\r
-                  EVT_NOTIFY_SIGNAL,\r
+  Status = gBS->CreateEvent (\r
+                  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,\r
                   TPL_NOTIFY,\r
                   RuntimeLibVirtualNotifyEvent,\r
                   NULL,\r
-                  &gEfiEventVirtualAddressChangeGuid,\r
                   &mEfiVirtualNotifyEvent\r
                   );\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  Status = gBS->CreateEventEx (\r
-                  EVT_NOTIFY_SIGNAL,\r
+  Status = gBS->CreateEvent (\r
+                  EVT_SIGNAL_EXIT_BOOT_SERVICES,\r
                   TPL_NOTIFY,\r
                   RuntimeLibExitBootServicesEvent,\r
                   NULL,\r
-                  &gEfiEventExitBootServicesGuid,\r
                   &mEfiExitBootServicesEvent\r
                   );\r
 \r
@@ -125,7 +117,7 @@ RuntimeDriverLibConstruct (
 }\r
 \r
 /**\r
-  If a runtime driver exits with an error, it must call this routine \r
+  If a runtime driver exits with an error, it must call this routine\r
   to free the allocated resource before the exiting.\r
   It will ASSERT() if gBS is NULL.\r
   It will ASSERT() if that operation fails.\r
@@ -133,8 +125,8 @@ RuntimeDriverLibConstruct (
   @param[in]  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param[in]  SystemTable   A pointer to the EFI System Table.\r
 \r
-  @retval     EFI_SUCCESS       Shutdown the Runtime Driver Lib successfully\r
-  @retval     EFI_UNSUPPORTED   Runtime Driver lib was not initialized at all\r
+  @retval     EFI_SUCCESS       The Runtime Driver Lib shutdown successfully.\r
+  @retval     EFI_UNSUPPORTED   Runtime Driver lib was not initialized.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -180,7 +172,7 @@ EfiAtRuntime (
 }\r
 \r
 /**\r
-  This function allows the caller to determine if UEFI SetVirtualAddressMap() has been called. \r
+  This function allows the caller to determine if UEFI SetVirtualAddressMap() has been called.\r
 \r
   This function returns TRUE after all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE functions have\r
   executed as a result of the OS calling SetVirtualAddressMap(). Prior to this time FALSE\r
@@ -200,7 +192,6 @@ EfiGoneVirtual (
   return mEfiGoneVirtual;\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service ResetSystem().\r
 \r
@@ -233,16 +224,15 @@ EfiGoneVirtual (
 VOID\r
 EFIAPI\r
 EfiResetSystem (\r
-  IN EFI_RESET_TYPE               ResetType,\r
-  IN EFI_STATUS                   ResetStatus,\r
-  IN UINTN                        DataSize,\r
-  IN VOID                         *ResetData OPTIONAL\r
+  IN EFI_RESET_TYPE  ResetType,\r
+  IN EFI_STATUS      ResetStatus,\r
+  IN UINTN           DataSize,\r
+  IN VOID            *ResetData OPTIONAL\r
   )\r
 {\r
   mInternalRT->ResetSystem (ResetType, ResetStatus, DataSize, ResetData);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetTime().\r
 \r
@@ -267,14 +257,13 @@ EfiResetSystem (
 EFI_STATUS\r
 EFIAPI\r
 EfiGetTime (\r
-  OUT EFI_TIME                    *Time,\r
-  OUT EFI_TIME_CAPABILITIES       *Capabilities  OPTIONAL\r
+  OUT EFI_TIME               *Time,\r
+  OUT EFI_TIME_CAPABILITIES  *Capabilities  OPTIONAL\r
   )\r
 {\r
   return mInternalRT->GetTime (Time, Capabilities);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service SetTime().\r
 \r
@@ -300,13 +289,12 @@ EfiGetTime (
 EFI_STATUS\r
 EFIAPI\r
 EfiSetTime (\r
-  IN EFI_TIME                   *Time\r
+  IN EFI_TIME  *Time\r
   )\r
 {\r
   return mInternalRT->SetTime (Time);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetWakeupTime().\r
 \r
@@ -320,7 +308,7 @@ EfiSetTime (
   @param  Time     The current alarm setting. Type EFI_TIME is defined in the GetTime()\r
                    function description.\r
 \r
-  @retval  EFI_SUCCESS           The alarm settings were returned.\r
+  @retval  EFI_SUCCESS            The alarm settings were returned.\r
   @retval  EFI_INVALID_PARAMETER  Enabled is NULL.\r
   @retval  EFI_INVALID_PARAMETER  Pending is NULL.\r
   @retval  EFI_INVALID_PARAMETER  Time is NULL.\r
@@ -331,16 +319,14 @@ EfiSetTime (
 EFI_STATUS\r
 EFIAPI\r
 EfiGetWakeupTime (\r
-  OUT BOOLEAN                     *Enabled,\r
-  OUT BOOLEAN                     *Pending,\r
-  OUT EFI_TIME                    *Time\r
+  OUT BOOLEAN   *Enabled,\r
+  OUT BOOLEAN   *Pending,\r
+  OUT EFI_TIME  *Time\r
   )\r
 {\r
   return mInternalRT->GetWakeupTime (Enabled, Pending, Time);\r
 }\r
 \r
-\r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service SetWakeupTime()\r
 \r
@@ -366,14 +352,13 @@ EfiGetWakeupTime (
 EFI_STATUS\r
 EFIAPI\r
 EfiSetWakeupTime (\r
-  IN BOOLEAN                      Enable,\r
-  IN EFI_TIME                     *Time   OPTIONAL\r
+  IN BOOLEAN   Enable,\r
+  IN EFI_TIME  *Time   OPTIONAL\r
   )\r
 {\r
   return mInternalRT->SetWakeupTime (Enable, Time);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetVariable().\r
 \r
@@ -407,17 +392,16 @@ EfiSetWakeupTime (
 EFI_STATUS\r
 EFIAPI\r
 EfiGetVariable (\r
-  IN      CHAR16                   *VariableName,\r
-  IN      EFI_GUID                 *VendorGuid,\r
-  OUT     UINT32                   *Attributes OPTIONAL,\r
-  IN OUT  UINTN                    *DataSize,\r
-  OUT     VOID                     *Data\r
+  IN      CHAR16    *VariableName,\r
+  IN      EFI_GUID  *VendorGuid,\r
+  OUT     UINT32    *Attributes OPTIONAL,\r
+  IN OUT  UINTN     *DataSize,\r
+  OUT     VOID      *Data\r
   )\r
 {\r
   return mInternalRT->GetVariable (VariableName, VendorGuid, Attributes, DataSize, Data);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetNextVariableName().\r
 \r
@@ -451,28 +435,27 @@ EfiGetVariable (
 EFI_STATUS\r
 EFIAPI\r
 EfiGetNextVariableName (\r
-  IN OUT UINTN                    *VariableNameSize,\r
-  IN OUT CHAR16                   *VariableName,\r
-  IN OUT EFI_GUID                 *VendorGuid\r
+  IN OUT UINTN     *VariableNameSize,\r
+  IN OUT CHAR16    *VariableName,\r
+  IN OUT EFI_GUID  *VendorGuid\r
   )\r
 {\r
   return mInternalRT->GetNextVariableName (VariableNameSize, VariableName, VendorGuid);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetNextVariableName()\r
 \r
   Variables are stored by the firmware and may maintain their values across power cycles. Each vendor\r
   may create and manage its own variables without the risk of name conflicts by using a unique VendorGuid.\r
 \r
-  @param  VariableName the name of the vendor's variable, it's a\r
-                       Null-Terminated Unicode String\r
+  @param  VariableName The name of the vendor's variable; it's a Null-Terminated\r
+                       Unicode String\r
   @param  VendorGuid   Unify identifier for vendor.\r
-  @param  Attributes   Point to memory location to return the attributes of variable. If the point\r
+  @param  Attributes   Points to a memory location to return the attributes of variable. If the point\r
                        is NULL, the parameter would be ignored.\r
   @param  DataSize     The size in bytes of Data-Buffer.\r
-  @param  Data         Point to the content of the variable.\r
+  @param  Data         Points to the content of the variable.\r
 \r
   @retval  EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
                                   defined by the Attributes.\r
@@ -483,7 +466,7 @@ EfiGetNextVariableName (
   @retval  EFI_DEVICE_ERROR       The variable could not be saved due to a hardware failure.\r
   @retval  EFI_WRITE_PROTECTED    The variable in question is read-only.\r
   @retval  EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
-  @retval  EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
+  @retval  EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS\r
                                   set but the AuthInfo does NOT pass the validation check carried\r
                                   out by the firmware.\r
   @retval  EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
@@ -492,17 +475,16 @@ EfiGetNextVariableName (
 EFI_STATUS\r
 EFIAPI\r
 EfiSetVariable (\r
-  IN CHAR16                       *VariableName,\r
-  IN EFI_GUID                     *VendorGuid,\r
-  IN UINT32                       Attributes,\r
-  IN UINTN                        DataSize,\r
-  IN VOID                         *Data\r
+  IN CHAR16    *VariableName,\r
+  IN EFI_GUID  *VendorGuid,\r
+  IN UINT32    Attributes,\r
+  IN UINTN     DataSize,\r
+  IN VOID      *Data\r
   )\r
 {\r
   return mInternalRT->SetVariable (VariableName, VendorGuid, Attributes, DataSize, Data);\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service GetNextHighMonotonicCount().\r
 \r
@@ -512,7 +494,7 @@ EfiSetVariable (
   32-bit value is nonvolatile and is increased by 1 whenever the system resets or whenever the low\r
   32-bit count (returned by GetNextMonoticCount()) overflows.\r
 \r
-  @param  HighCount Pointer to returned value.\r
+  @param  HighCount The pointer to returned value.\r
 \r
   @retval  EFI_SUCCESS           The next high monotonic count was returned.\r
   @retval  EFI_DEVICE_ERROR      The device is not functioning properly.\r
@@ -522,15 +504,14 @@ EfiSetVariable (
 EFI_STATUS\r
 EFIAPI\r
 EfiGetNextHighMonotonicCount (\r
-  OUT UINT32                      *HighCount\r
+  OUT UINT32  *HighCount\r
   )\r
 {\r
   return mInternalRT->GetNextHighMonotonicCount (HighCount);\r
 }\r
 \r
-\r
 /**\r
-  This service is a wrapper for the UEFI Runtime Service ConvertPointer().  \r
+  This service is a wrapper for the UEFI Runtime Service ConvertPointer().\r
 \r
   The ConvertPointer() function is used by an EFI component during the SetVirtualAddressMap() operation.\r
   ConvertPointer()must be called using physical address pointers during the execution of SetVirtualAddressMap().\r
@@ -550,19 +531,18 @@ EfiGetNextHighMonotonicCount (
 EFI_STATUS\r
 EFIAPI\r
 EfiConvertPointer (\r
-  IN UINTN                  DebugDisposition,\r
-  IN OUT VOID               **Address\r
+  IN UINTN     DebugDisposition,\r
+  IN OUT VOID  **Address\r
   )\r
 {\r
   return gRT->ConvertPointer (DebugDisposition, Address);\r
 }\r
 \r
-\r
 /**\r
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
 \r
   For IA32, x64, and EBC, this service is a wrapper for the UEFI Runtime Service\r
-  ConvertPointer().  See the UEFI Specification for details. \r
+  ConvertPointer().  See the UEFI Specification for details.\r
   For IPF, this function interprets Address as a pointer to an EFI_PLABEL structure\r
   and both the EntryPoint and GP fields of an EFI_PLABEL are converted from physical\r
   to virtiual addressing.  Since IPF allows the GP to point to an address outside\r
@@ -583,14 +563,13 @@ EfiConvertPointer (
 EFI_STATUS\r
 EFIAPI\r
 EfiConvertFunctionPointer (\r
-  IN UINTN                DebugDisposition,\r
-  IN OUT VOID             **Address\r
+  IN UINTN     DebugDisposition,\r
+  IN OUT VOID  **Address\r
   )\r
 {\r
   return EfiConvertPointer (DebugDisposition, Address);\r
 }\r
 \r
-\r
 /**\r
   Convert the standard Lib double linked list to a virtual mapping.\r
 \r
@@ -608,13 +587,13 @@ EfiConvertFunctionPointer (
 EFI_STATUS\r
 EFIAPI\r
 EfiConvertList (\r
-  IN UINTN                DebugDisposition,\r
-  IN OUT LIST_ENTRY       *ListHead\r
+  IN UINTN           DebugDisposition,\r
+  IN OUT LIST_ENTRY  *ListHead\r
   )\r
 {\r
   LIST_ENTRY  *Link;\r
   LIST_ENTRY  *NextLink;\r
-  \r
+\r
   //\r
   // For NULL List, return EFI_SUCCESS\r
   //\r
@@ -631,20 +610,20 @@ EfiConvertList (
 \r
     EfiConvertPointer (\r
       Link->ForwardLink == ListHead ? DebugDisposition : 0,\r
-      (VOID **) &Link->ForwardLink\r
+      (VOID **)&Link->ForwardLink\r
       );\r
 \r
     EfiConvertPointer (\r
       Link->BackLink == ListHead ? DebugDisposition : 0,\r
-      (VOID **) &Link->BackLink\r
+      (VOID **)&Link->BackLink\r
       );\r
 \r
     Link = NextLink;\r
   } while (Link != ListHead);\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service SetVirtualAddressMap().\r
 \r
@@ -674,21 +653,20 @@ EfiConvertList (
 EFI_STATUS\r
 EFIAPI\r
 EfiSetVirtualAddressMap (\r
-  IN UINTN                          MemoryMapSize,\r
-  IN UINTN                          DescriptorSize,\r
-  IN UINT32                         DescriptorVersion,\r
-  IN CONST EFI_MEMORY_DESCRIPTOR    *VirtualMap\r
+  IN UINTN                        MemoryMapSize,\r
+  IN UINTN                        DescriptorSize,\r
+  IN UINT32                       DescriptorVersion,\r
+  IN CONST EFI_MEMORY_DESCRIPTOR  *VirtualMap\r
   )\r
 {\r
   return mInternalRT->SetVirtualAddressMap (\r
                         MemoryMapSize,\r
                         DescriptorSize,\r
                         DescriptorVersion,\r
-                        (EFI_MEMORY_DESCRIPTOR *) VirtualMap\r
+                        (EFI_MEMORY_DESCRIPTOR *)VirtualMap\r
                         );\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service UpdateCapsule().\r
 \r
@@ -703,7 +681,7 @@ EfiSetVirtualAddressMap (
                                 CapsuleHeaderArray must be the same capsules as the\r
                                 ScatterGatherList. The CapsuleHeaderArray must\r
                                 have the capsules in the same order as the ScatterGatherList.\r
-  @param  CapsuleCount          Number of pointers to EFI_CAPSULE_HEADER in\r
+  @param  CapsuleCount          The number of pointers to EFI_CAPSULE_HEADER in\r
                                 CaspuleHeaderArray.\r
   @param  ScatterGatherList     Physical pointer to a set of\r
                                 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the\r
@@ -726,9 +704,9 @@ EfiSetVirtualAddressMap (
 EFI_STATUS\r
 EFIAPI\r
 EfiUpdateCapsule (\r
-  IN EFI_CAPSULE_HEADER       **CapsuleHeaderArray,\r
-  IN UINTN                    CapsuleCount,\r
-  IN EFI_PHYSICAL_ADDRESS     ScatterGatherList OPTIONAL\r
+  IN EFI_CAPSULE_HEADER    **CapsuleHeaderArray,\r
+  IN UINTN                 CapsuleCount,\r
+  IN EFI_PHYSICAL_ADDRESS  ScatterGatherList OPTIONAL\r
   )\r
 {\r
   return mInternalRT->UpdateCapsule (\r
@@ -738,7 +716,6 @@ EfiUpdateCapsule (
                         );\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service QueryCapsuleCapabilities().\r
 \r
@@ -758,7 +735,7 @@ EfiUpdateCapsule (
   @param  CapsuleHeaderArray    Virtual pointer to an array of virtual pointers to the capsules\r
                                 being passed into update capsule. The capsules are assumed to\r
                                 stored in contiguous virtual memory.\r
-  @param  CapsuleCount          Number of pointers to EFI_CAPSULE_HEADER in\r
+  @param  CapsuleCount          The number of pointers to EFI_CAPSULE_HEADER in\r
                                 CaspuleHeaderArray.\r
   @param  MaximumCapsuleSize     On output the maximum size that UpdateCapsule() can\r
                                 support as an argument to UpdateCapsule() via\r
@@ -766,7 +743,7 @@ EfiUpdateCapsule (
                                 Undefined on input.\r
   @param  ResetType             Returns the type of reset required for the capsule update.\r
 \r
-  @retval EFI_SUCCESS           Valid answer returned.\r
+  @retval EFI_SUCCESS           A valid answer was returned.\r
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and\r
                                 MaximumCapsuleSize and ResetType are undefined.\r
@@ -776,10 +753,10 @@ EfiUpdateCapsule (
 EFI_STATUS\r
 EFIAPI\r
 EfiQueryCapsuleCapabilities (\r
-  IN  EFI_CAPSULE_HEADER       **CapsuleHeaderArray,\r
-  IN  UINTN                    CapsuleCount,\r
-  OUT UINT64                   *MaximumCapsuleSize,\r
-  OUT EFI_RESET_TYPE           *ResetType\r
+  IN  EFI_CAPSULE_HEADER  **CapsuleHeaderArray,\r
+  IN  UINTN               CapsuleCount,\r
+  OUT UINT64              *MaximumCapsuleSize,\r
+  OUT EFI_RESET_TYPE      *ResetType\r
   )\r
 {\r
   return mInternalRT->QueryCapsuleCapabilities (\r
@@ -790,7 +767,6 @@ EfiQueryCapsuleCapabilities (
                         );\r
 }\r
 \r
-\r
 /**\r
   This service is a wrapper for the UEFI Runtime Service QueryVariableInfo().\r
 \r
@@ -817,7 +793,7 @@ EfiQueryCapsuleCapabilities (
   @param  MaximumVariableSize   Returns the maximum size of the individual EFI\r
                                 variables associated with the attributes specified.\r
 \r
-  @retval EFI_SUCCESS           Valid answer returned.\r
+  @retval EFI_SUCCESS           A valid answer was returned.\r
   @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied.\r
   @retval EFI_UNSUPPORTED       EFI_UNSUPPORTED The attribute is not supported on this platform, and the\r
                                 MaximumVariableStorageSize,\r