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>
This commit is contained in:
Laszlo Ersek 2018-03-01 15:15:39 +01:00
parent 1532e5d5ed
commit 68e60a388d
2 changed files with 14 additions and 10 deletions

View File

@ -863,16 +863,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
/** /**
This function sets memory encryption bit for the memory region specified by 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 @param[in] PhysicalAddress The physical address that is the start
address of a memory region. address of a memory region.
@param[in] Length The length of memory region @param[in] Length The length of memory region
@param[in] Flush Flush the caches before applying the @param[in] Flush Flush the caches before applying the
encryption mask encryption mask
@retval RETURN_SUCCESS The attributes were cleared for the @retval RETURN_SUCCESS The attributes were set for the memory
memory region. region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero. @retval RETURN_INVALID_PARAMETER Number of pages is zero.
@retval RETURN_UNSUPPORTED Setting the memory encyrption attribute @retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
is not supported is not supported

View File

@ -215,16 +215,18 @@ InternalMemEncryptSevSetMemoryDecrypted (
/** /**
This function sets memory encryption bit for the memory region specified by 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 @param[in] PhysicalAddress The physical address that is the start
address of a memory region. address of a memory region.
@param[in] Length The length of memory region @param[in] Length The length of memory region
@param[in] Flush Flush the caches before applying the @param[in] Flush Flush the caches before applying the
encryption mask encryption mask
@retval RETURN_SUCCESS The attributes were cleared for the @retval RETURN_SUCCESS The attributes were set for the memory
memory region. region.
@retval RETURN_INVALID_PARAMETER Number of pages is zero. @retval RETURN_INVALID_PARAMETER Number of pages is zero.
@retval RETURN_UNSUPPORTED Setting the memory encyrption attribute @retval RETURN_UNSUPPORTED Setting the memory encyrption attribute
is not supported is not supported
@ -232,10 +234,10 @@ InternalMemEncryptSevSetMemoryDecrypted (
RETURN_STATUS RETURN_STATUS
EFIAPI EFIAPI
InternalMemEncryptSevSetMemoryEncrypted ( InternalMemEncryptSevSetMemoryEncrypted (
IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS Cr3BaseAddress,
IN PHYSICAL_ADDRESS PhysicalAddress, IN PHYSICAL_ADDRESS PhysicalAddress,
IN UINT64 Length, IN UINTN Length,
IN BOOLEAN CacheFlush IN BOOLEAN Flush
); );
#endif #endif