TianoCore EDK2 master
Loading...
Searching...
No Matches
MemEncryptSevLib.c
Go to the documentation of this file.
1
11#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
14#include <Register/Amd/Cpuid.h>
15#include <Register/Amd/Msr.h>
16#include <Register/Cpuid.h>
17
35RETURN_STATUS
36EFIAPI
38 IN PHYSICAL_ADDRESS Cr3BaseAddress,
39 IN PHYSICAL_ADDRESS BaseAddress,
40 IN UINTN NumPages
41 )
42{
43 //
44 // Memory encryption bit is not accessible in 32-bit mode
45 //
46 return RETURN_UNSUPPORTED;
47}
48
66RETURN_STATUS
67EFIAPI
69 IN PHYSICAL_ADDRESS Cr3BaseAddress,
70 IN PHYSICAL_ADDRESS BaseAddress,
71 IN UINTN NumPages
72 )
73{
74 //
75 // Memory encryption bit is not accessible in 32-bit mode
76 //
77 return RETURN_UNSUPPORTED;
78}
79
95MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE
96EFIAPI
98 IN PHYSICAL_ADDRESS Cr3BaseAddress,
99 IN PHYSICAL_ADDRESS BaseAddress,
100 IN UINTN Length
101 )
102{
103 //
104 // Memory is always encrypted in 32-bit mode
105 //
106 return MemEncryptSevAddressRangeEncrypted;
107}
108
126RETURN_STATUS
127EFIAPI
129 IN PHYSICAL_ADDRESS Cr3BaseAddress,
130 IN PHYSICAL_ADDRESS BaseAddress,
131 IN UINTN NumPages
132 )
133{
134 //
135 // Memory encryption bit is not accessible in 32-bit mode
136 //
137 return RETURN_UNSUPPORTED;
138}
139
147VOID
148EFIAPI
150 IN PHYSICAL_ADDRESS BaseAddress,
151 IN UINTN NumPages
152 )
153{
154 ASSERT (FALSE);
155}
UINT64 UINTN
RETURN_STATUS EFIAPI MemEncryptSevClearPageEncMask(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE EFIAPI MemEncryptSevGetAddressRangeState(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN Length)
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam(IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
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)
#define RETURN_UNSUPPORTED
Definition: Base.h:1081
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279