]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/MemEncryptSevLib: clean up MemEncryptSevSetPageEncMask() decl
authorLaszlo Ersek <lersek@redhat.com>
Thu, 1 Mar 2018 13:41:01 +0000 (14:41 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 6 Mar 2018 12:30:03 +0000 (13:30 +0100)
The declaration and the definition(s) of the function should have
identical leading comments and/or identical parameter lists. Replace any
leftover "clear" references to the C-bit with "set" references. Also
remove any excess space in the comment block, and unindent the trailing
"**/" if necessary. Correct several parameter references.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
OvmfPkg/Include/Library/MemEncryptSevLib.h
OvmfPkg/Library/BaseMemEncryptSevLib/Ia32/MemEncryptSevLib.c
OvmfPkg/Library/BaseMemEncryptSevLib/X64/MemEncryptSevLib.c

index 2d574dd30676de0142b42b21e8b27a6b53aef74a..e5ebb4401818a5d1b824f783065c18be427a30c1 100644 (file)
@@ -61,27 +61,29 @@ MemEncryptSevClearPageEncMask (
 \r
 /**\r
   This function sets 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]  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
+  @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 setting the bit\r
+                                      (mostly TRUE except MMIO addresses)\r
 \r
-  @retval RETURN_SUCCESS            The attributes were set for the memory\r
-                                    region.\r
-  @retval RETURN_INVALID_PARAMETER  Number of pages is zero.\r
-  @retval RETURN_UNSUPPORTED        Clearing memory encryption attribute is not\r
-                                    supported\r
-  **/\r
+  @retval RETURN_SUCCESS              The attributes were set for the memory\r
+                                      region.\r
+  @retval RETURN_INVALID_PARAMETER    Number of pages is zero.\r
+  @retval RETURN_UNSUPPORTED          Setting the memory encryption attribute\r
+                                      is not supported\r
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 MemEncryptSevSetPageEncMask (\r
   IN PHYSICAL_ADDRESS         Cr3BaseAddress,\r
   IN PHYSICAL_ADDRESS         BaseAddress,\r
-  IN UINTN                    NumberOfPages,\r
-  IN BOOLEAN                  CacheFlush\r
+  IN UINTN                    NumPages,\r
+  IN BOOLEAN                  Flush\r
   );\r
 #endif // _MEM_ENCRYPT_SEV_LIB_H_\r
index d6067c52aacdd4225699744065b4211e5806efa8..614c97b23bb69722db19f5c9967692dd3dacac9f 100644 (file)
@@ -57,29 +57,29 @@ MemEncryptSevClearPageEncMask (
 \r
 /**\r
   This function sets 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\r
-                                    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
+  @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 setting the bit\r
+                                      (mostly TRUE except MMIO addresses)\r
 \r
-  @retval RETURN_SUCCESS            The attributes were set for the memory\r
-                                    region.\r
-  @retval RETURN_INVALID_PARAMETER  Number of pages is zero.\r
-  @retval RETURN_UNSUPPORTED        Clearing memory encryption attribute is not\r
-                                    supported\r
-  **/\r
+  @retval RETURN_SUCCESS              The attributes were set for the memory\r
+                                      region.\r
+  @retval RETURN_INVALID_PARAMETER    Number of pages is zero.\r
+  @retval RETURN_UNSUPPORTED          Setting the memory encryption attribute\r
+                                      is not supported\r
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 MemEncryptSevSetPageEncMask (\r
   IN PHYSICAL_ADDRESS         Cr3BaseAddress,\r
   IN PHYSICAL_ADDRESS         BaseAddress,\r
-  IN UINTN                    NumberOfPages,\r
+  IN UINTN                    NumPages,\r
   IN BOOLEAN                  Flush\r
   )\r
 {\r
index 5b8bc737645c8f3fdfca51863e62f4b49e86d2e3..f165722ae550d7e8c505617b159db15583c11a93 100644 (file)
@@ -60,25 +60,24 @@ MemEncryptSevClearPageEncMask (
 }\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
+  This function sets memory encryption bit for the memory region specified by\r
+  BaseAddress and NumPages from the current page table context.\r
 \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
+  @param[in]  NumPages                The number of pages from start memory\r
                                       region.\r
-  @param[in]  Flush                   Flush the caches before clearing the bit\r
+  @param[in]  Flush                   Flush the caches before setting the bit\r
                                       (mostly TRUE except MMIO addresses)\r
 \r
-  @retval RETURN_SUCCESS              The attributes were cleared for the\r
-                                      memory region.\r
+  @retval RETURN_SUCCESS              The attributes were set for the memory\r
+                                      region.\r
   @retval RETURN_INVALID_PARAMETER    Number of pages is zero.\r
-  @retval RETURN_UNSUPPORTED          Clearing the memory encryption attribute\r
+  @retval RETURN_UNSUPPORTED          Setting the memory encryption attribute\r
                                       is not supported\r
-  **/\r
+**/\r
 RETURN_STATUS\r
 EFIAPI\r
 MemEncryptSevSetPageEncMask (\r