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