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
18#include "VirtualMemory.h"
19
37RETURN_STATUS
38EFIAPI
40 IN PHYSICAL_ADDRESS Cr3BaseAddress,
41 IN PHYSICAL_ADDRESS BaseAddress,
42 IN UINTN NumPages
43 )
44{
46 Cr3BaseAddress,
47 BaseAddress,
48 EFI_PAGES_TO_SIZE (NumPages)
49 );
50}
51
69RETURN_STATUS
70EFIAPI
72 IN PHYSICAL_ADDRESS Cr3BaseAddress,
73 IN PHYSICAL_ADDRESS BaseAddress,
74 IN UINTN NumPages
75 )
76{
78 Cr3BaseAddress,
79 BaseAddress,
80 EFI_PAGES_TO_SIZE (NumPages)
81 );
82}
83
99MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE
100EFIAPI
102 IN PHYSICAL_ADDRESS Cr3BaseAddress,
103 IN PHYSICAL_ADDRESS BaseAddress,
104 IN UINTN Length
105 )
106{
108 Cr3BaseAddress,
109 BaseAddress,
110 Length
111 );
112}
113
131RETURN_STATUS
132EFIAPI
134 IN PHYSICAL_ADDRESS Cr3BaseAddress,
135 IN PHYSICAL_ADDRESS BaseAddress,
136 IN UINTN NumPages
137 )
138{
140 Cr3BaseAddress,
141 BaseAddress,
142 EFI_PAGES_TO_SIZE (NumPages)
143 );
144}
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)
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 IN
Definition: Base.h:279
MEM_ENCRYPT_SEV_ADDRESS_RANGE_STATE EFIAPI InternalMemEncryptSevGetAddressRangeState(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS BaseAddress, IN UINTN Length)
Definition: VirtualMemory.c:77
RETURN_STATUS EFIAPI InternalMemEncryptSevSetMemoryDecrypted(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, IN UINTN Length)
RETURN_STATUS EFIAPI InternalMemEncryptSevClearMmioPageEncMask(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, IN UINTN Length)
RETURN_STATUS EFIAPI InternalMemEncryptSevSetMemoryEncrypted(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, IN UINTN Length)
#define EFI_PAGES_TO_SIZE(Pages)
Definition: UefiBaseType.h:213