11#ifndef _MEM_ENCRYPT_SEV_LIB_H_
12#define _MEM_ENCRYPT_SEV_LIB_H_
24#define VMGEXIT_MAXIMUM_VC_COUNT 2
37 VOID *GhcbBackupPages;
44 MemEncryptSevAddressRangeUnencrypted,
45 MemEncryptSevAddressRangeEncrypted,
46 MemEncryptSevAddressRangeMixed,
47 MemEncryptSevAddressRangeError,
48} MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE;
106 IN PHYSICAL_ADDRESS Cr3BaseAddress,
107 IN PHYSICAL_ADDRESS BaseAddress,
131 IN PHYSICAL_ADDRESS Cr3BaseAddress,
132 IN PHYSICAL_ADDRESS BaseAddress,
196MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE
199 IN PHYSICAL_ADDRESS Cr3BaseAddress,
200 IN PHYSICAL_ADDRESS BaseAddress,
224 IN PHYSICAL_ADDRESS Cr3BaseAddress,
225 IN PHYSICAL_ADDRESS BaseAddress,
239 IN PHYSICAL_ADDRESS BaseAddress,
BOOLEAN EFIAPI MemEncryptSevEsDebugVirtualizationIsEnabled(VOID)
RETURN_STATUS EFIAPI MemEncryptSevClearPageEncMask(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
UINT64 EFIAPI MemEncryptSevGetEncryptionMask(VOID)
MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE EFIAPI MemEncryptSevGetAddressRangeState(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN Length)
BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled(VOID)
BOOLEAN EFIAPI MemEncryptSevIsEnabled(VOID)
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam(IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
RETURN_STATUS EFIAPI MemEncryptSevLocateInitialSmramSaveStateMapPages(OUT UINTN *BaseAddress, OUT UINTN *NumberOfPages)
RETURN_STATUS EFIAPI MemEncryptSevClearMmioPageEncMask(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
RETURN_STATUS EFIAPI MemEncryptSevSetPageEncMask(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
BOOLEAN EFIAPI MemEncryptSevEsIsEnabled(VOID)