summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/BaseMemEncryptSevLib/X64
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-03-01 15:15:39 +0100
committerLaszlo Ersek <lersek@redhat.com>2018-03-06 13:30:09 +0100
commit68e60a388da60acac66d908eaa85615d66c52831 (patch)
tree70d540e8c6d531d8e3495254cbce8446ec3cecfc /OvmfPkg/Library/BaseMemEncryptSevLib/X64
parent1532e5d5ed393154abdd88fad41f99decae98cb4 (diff)
downloadedk2-68e60a388da60acac66d908eaa85615d66c52831.tar.gz
edk2-68e60a388da60acac66d908eaa85615d66c52831.tar.bz2
edk2-68e60a388da60acac66d908eaa85615d66c52831.zip
OvmfPkg/MemEncryptSevLib: clean up InternalMemEncryptSevSetMemoryEncrypted() 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 "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>
Diffstat (limited to 'OvmfPkg/Library/BaseMemEncryptSevLib/X64')
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c8
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h16
2 files changed, 14 insertions, 10 deletions
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
index 3f7704801c..39b246048f 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
@@ -863,16 +863,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
/**
This function sets 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
@param[in] Flush Flush the caches before applying the
encryption mask
- @retval RETURN_SUCCESS The attributes were cleared for the
- memory region.
+ @retval RETURN_SUCCESS The attributes were set for the memory
+ region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero.
@retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
is not supported
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
index 646a9781d0..67ff69122d 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
@@ -215,16 +215,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
/**
This function sets 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
@param[in] Flush Flush the caches before applying the
encryption mask
- @retval RETURN_SUCCESS The attributes were cleared for the
- memory region.
+ @retval RETURN_SUCCESS The attributes were set for the memory
+ region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero.
@retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
is not supported
@@ -232,10 +234,10 @@ InternalMemEncryptSevSetMemoryDecrypted (
RETURN_STATUS
EFIAPI
InternalMemEncryptSevSetMemoryEncrypted (
- 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
);
#endif