]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/BaseMemEncryptSevLib/X64/MemEncryptSevLib.c
OvmfPkg/MemEncryptSevLib: clean up MemEncryptSevClearPageEncMask() decl
[mirror_edk2.git] / OvmfPkg / Library / BaseMemEncryptSevLib / X64 / MemEncryptSevLib.c
index 9ec76708bd7b697e63f4dcc38b3d113e805d7c0b..5b8bc737645c8f3fdfca51863e62f4b49e86d2e3 100644 (file)
@@ -4,10 +4,10 @@
 \r
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD\r
-  License which accompanies this distribution.  The full text of the license may\r
-  be found at http://opensource.org/licenses/bsd-license.php\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  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
 #include "VirtualMemory.h"\r
 \r
 /**\r
-\r
   This function clears memory encryption bit for the memory region specified by\r
-  BaseAddress and Number of pages from the current page table context.\r
+  BaseAddress and NumPages from the current page table context.\r
 \r
-  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use current CR3)\r
-  @param[in]  BaseAddress             The physical address that is the start address\r
-                                      of a memory region.\r
-  @param[in]  NumberOfPages           The number of pages from start memory region.\r
+  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use\r
+                                      current CR3)\r
+  @param[in]  BaseAddress             The physical address that is the start\r
+                                      address of a memory region.\r
+  @param[in]  NumPages                The number of pages from start memory\r
+                                      region.\r
   @param[in]  Flush                   Flush the caches before clearing the bit\r
                                       (mostly TRUE except MMIO addresses)\r
 \r
-  @retval RETURN_SUCCESS              The attributes were cleared for the memory\r
-                                      region.\r
+  @retval RETURN_SUCCESS              The attributes were cleared for the\r
+                                      memory region.\r
   @retval RETURN_INVALID_PARAMETER    Number of pages is zero.\r
-  @retval RETURN_UNSUPPORTED          Clearing the memory encryption attribute is\r
-                                      not supported\r
-  **/\r
+  @retval RETURN_UNSUPPORTED          Clearing the memory encryption attribute\r
+                                      is not supported\r
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 MemEncryptSevClearPageEncMask (\r
@@ -50,7 +51,12 @@ MemEncryptSevClearPageEncMask (
   IN BOOLEAN                  Flush\r
   )\r
 {\r
-  return InternalMemEncryptSevSetMemoryDecrypted (Cr3BaseAddress, BaseAddress, EFI_PAGES_TO_SIZE(NumPages), Flush);\r
+  return InternalMemEncryptSevSetMemoryDecrypted (\r
+           Cr3BaseAddress,\r
+           BaseAddress,\r
+           EFI_PAGES_TO_SIZE (NumPages),\r
+           Flush\r
+           );\r
 }\r
 \r
 /**\r
@@ -58,18 +64,20 @@ MemEncryptSevClearPageEncMask (
   This function clears memory encryption bit for the memory region specified by\r
   BaseAddress and Number of pages from the current page table context.\r
 \r
-  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use current CR3)\r
-  @param[in]  BaseAddress             The physical address that is the start address\r
-                                      of a memory region.\r
-  @param[in]  NumberOfPages           The number of pages from start memory region.\r
+  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use\r
+                                      current CR3)\r
+  @param[in]  BaseAddress             The physical address that is the start\r
+                                      address of a memory region.\r
+  @param[in]  NumberOfPages           The number of pages from start memory\r
+                                      region.\r
   @param[in]  Flush                   Flush the caches before clearing the bit\r
                                       (mostly TRUE except MMIO addresses)\r
 \r
-  @retval RETURN_SUCCESS              The attributes were cleared for the memory\r
-                                      region.\r
+  @retval RETURN_SUCCESS              The attributes were cleared for the\r
+                                      memory region.\r
   @retval RETURN_INVALID_PARAMETER    Number of pages is zero.\r
-  @retval RETURN_UNSUPPORTED          Clearing the memory encryption attribute is\r
-                                      not supported\r
+  @retval RETURN_UNSUPPORTED          Clearing the memory encryption attribute\r
+                                      is not supported\r
   **/\r
 RETURN_STATUS\r
 EFIAPI\r
@@ -80,5 +88,10 @@ MemEncryptSevSetPageEncMask (
   IN BOOLEAN                  Flush\r
   )\r
 {\r
-  return InternalMemEncryptSevSetMemoryEncrypted (Cr3BaseAddress, BaseAddress, EFI_PAGES_TO_SIZE(NumPages), Flush);\r
+  return InternalMemEncryptSevSetMemoryEncrypted (\r
+           Cr3BaseAddress,\r
+           BaseAddress,\r
+           EFI_PAGES_TO_SIZE (NumPages),\r
+           Flush\r
+           );\r
 }\r