OvmfPkg/MemEncryptSevLib: clean up InternalMemEncryptSevSetMemoryDecrypted() 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:07 +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 "set" reference to the C-bit with a "clear" 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 aed92127629f789542a1ab3afe6c9aa121154f55..3f7704801c9c2e886116f8894a1fa74e8622ebab 100644 (file)
@@ -826,8 +826,10 @@ Done:
 \r
 /**\r
   This function clears 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
@@ -837,7 +839,7 @@ Done:
   @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          Setting the memory encyrption attribute\r
+  @retval RETURN_UNSUPPORTED          Clearing the memory encyrption attribute\r
                                       is not supported\r
 **/\r
 RETURN_STATUS\r
index 7dd1bbe0eb2650d56bb883f6bc7a727dcd64547d..646a9781d04af78da7da16d88589673b110933dd 100644 (file)
@@ -188,8 +188,10 @@ typedef struct {
 \r
 /**\r
   This function clears 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
@@ -199,16 +201,16 @@ typedef struct {
   @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          Setting the memory encyrption attribute\r
+  @retval RETURN_UNSUPPORTED          Clearing the memory encyrption attribute\r
                                       is not supported\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 InternalMemEncryptSevSetMemoryDecrypted (\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
 /**\r