]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/MemEncryptSevLib: clean up InternalMemEncryptSevSetMemoryEncrypted() decl
authorLaszlo Ersek <lersek@redhat.com>
Thu, 1 Mar 2018 14:15:39 +0000 (15:15 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 6 Mar 2018 12:30:09 +0000 (13:30 +0100)
The declaration and the definition(s) of the function should have
identical leading comments and/or identical parameter lists. Document the
"Cr3BaseAddress" parameter, and correct several parameter references.
Replace a "clear" reference to the C-bit with a "set" reference.

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/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h

index 3f7704801c9c2e886116f8894a1fa74e8622ebab..39b246048f1f2f37b745d6a60e1b82ca4c643d79 100644 (file)
@@ -863,16 +863,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
 \r
 /**\r
   This function sets memory encryption bit for the memory region specified by\r
-  PhysicalAddress and length from the current page table context.\r
+  PhysicalAddress and Length from the current page table context.\r
 \r
+  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use\r
+                                      current CR3)\r
   @param[in]  PhysicalAddress         The physical address that is the start\r
                                       address of a memory region.\r
   @param[in]  Length                  The length of memory region\r
   @param[in]  Flush                   Flush the caches before applying the\r
                                       encryption mask\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          Setting the memory encyrption attribute\r
                                       is not supported\r
index 646a9781d04af78da7da16d88589673b110933dd..67ff69122d73905209dbd57ffbc272d1252a352f 100644 (file)
@@ -215,16 +215,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
 \r
 /**\r
   This function sets memory encryption bit for the memory region specified by\r
-  PhysicalAddress and length from the current page table context.\r
+  PhysicalAddress and Length from the current page table context.\r
 \r
+  @param[in]  Cr3BaseAddress          Cr3 Base Address (if zero then use\r
+                                      current CR3)\r
   @param[in]  PhysicalAddress         The physical address that is the start\r
                                       address of a memory region.\r
   @param[in]  Length                  The length of memory region\r
   @param[in]  Flush                   Flush the caches before applying the\r
                                       encryption mask\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          Setting the memory encyrption attribute\r
                                       is not supported\r
@@ -232,10 +234,10 @@ InternalMemEncryptSevSetMemoryDecrypted (
 RETURN_STATUS\r
 EFIAPI\r
 InternalMemEncryptSevSetMemoryEncrypted (\r
-  IN  PHYSICAL_ADDRESS     Cr3BaseAddress,\r
-  IN  PHYSICAL_ADDRESS     PhysicalAddress,\r
-  IN  UINT64               Length,\r
-  IN  BOOLEAN              CacheFlush\r
+  IN  PHYSICAL_ADDRESS        Cr3BaseAddress,\r
+  IN  PHYSICAL_ADDRESS        PhysicalAddress,\r
+  IN  UINTN                   Length,\r
+  IN  BOOLEAN                 Flush\r
   );\r
 \r
 #endif\r