diff options
author | Laszlo Ersek <lersek@redhat.com> | 2018-03-01 15:15:39 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2018-03-06 13:30:07 +0100 |
commit | 1532e5d5ed393154abdd88fad41f99decae98cb4 (patch) | |
tree | f832673ec0b54b838531b9e46201f881c486b12b /OvmfPkg | |
parent | cde8c56809176269419f02a7884d31eb177d99a1 (diff) | |
download | edk2-1532e5d5ed393154abdd88fad41f99decae98cb4.tar.gz edk2-1532e5d5ed393154abdd88fad41f99decae98cb4.tar.bz2 edk2-1532e5d5ed393154abdd88fad41f99decae98cb4.zip |
OvmfPkg/MemEncryptSevLib: clean up InternalMemEncryptSevSetMemoryDecrypted() decl
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c | 6 | ||||
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c index aed9212762..3f7704801c 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c @@ -826,8 +826,10 @@ Done: /**
This function clears memory encryption bit for the memory region specified by
- PhysicalAddress and length from the current page table context.
+ PhysicalAddress and Length from the current page table context.
+ @param[in] Cr3BaseAddress Cr3 Base Address (if zero then use
+ current CR3)
@param[in] PhysicalAddress The physical address that is the start
address of a memory region.
@param[in] Length The length of memory region
@@ -837,7 +839,7 @@ Done: @retval RETURN_SUCCESS The attributes were cleared for the
memory region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero.
- @retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
+ @retval RETURN_UNSUPPORTED Clearing the memory encyrption attribute
is not supported
**/
RETURN_STATUS
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h index 7dd1bbe0eb..646a9781d0 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h @@ -188,8 +188,10 @@ typedef struct { /**
This function clears memory encryption bit for the memory region specified by
- PhysicalAddress and length from the current page table context.
+ PhysicalAddress and Length from the current page table context.
+ @param[in] Cr3BaseAddress Cr3 Base Address (if zero then use
+ current CR3)
@param[in] PhysicalAddress The physical address that is the start
address of a memory region.
@param[in] Length The length of memory region
@@ -199,16 +201,16 @@ typedef struct { @retval RETURN_SUCCESS The attributes were cleared for the
memory region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero.
- @retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
+ @retval RETURN_UNSUPPORTED Clearing the memory encyrption attribute
is not supported
**/
RETURN_STATUS
EFIAPI
InternalMemEncryptSevSetMemoryDecrypted (
- IN PHYSICAL_ADDRESS Cr3BaseAddress,
- IN PHYSICAL_ADDRESS PhysicalAddress,
- IN UINT64 Length,
- IN BOOLEAN CacheFlush
+ IN PHYSICAL_ADDRESS Cr3BaseAddress,
+ IN PHYSICAL_ADDRESS PhysicalAddress,
+ IN UINTN Length,
+ IN BOOLEAN Flush
);
/**
|