20STATIC UINT8 mPscBufferPage[EFI_PAGE_SIZE];
43DetectPreValidatedOverLap (
44 IN PHYSICAL_ADDRESS StartAddress,
45 IN PHYSICAL_ADDRESS EndAddress,
54 for (i = 0; i <
ARRAY_SIZE (mPreValidatedRange); i++) {
55 if ((mPreValidatedRange[i].StartAddress < EndAddress) &&
56 (StartAddress < mPreValidatedRange[i].EndAddress))
58 OverlapRange->StartAddress = mPreValidatedRange[i].StartAddress;
59 OverlapRange->EndAddress = mPreValidatedRange[i].EndAddress;
77 IN PHYSICAL_ADDRESS BaseAddress,
81 PHYSICAL_ADDRESS EndAddress;
97 if (BaseAddress >= SIZE_4GB) {
103 if (EFI_ERROR (Status)) {
109 while (BaseAddress < EndAddress) {
113 if (DetectPreValidatedOverLap (BaseAddress, EndAddress, &OverlapRange)) {
115 if (BaseAddress < OverlapRange.StartAddress) {
124 sizeof (mPscBufferPage)
128 BaseAddress = OverlapRange.EndAddress;
140 sizeof (mPscBufferPage)
142 BaseAddress = EndAddress;
VOID EFIAPI CpuDeadLoop(VOID)
#define ARRAY_SIZE(Array)
BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled(VOID)
#define FixedPcdGet32(TokenName)
RETURN_STATUS EFIAPI InternalMemEncryptSevCreateIdentityMap1G(IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, IN UINTN Length)
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam(IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
VOID InternalSetPageState(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages, IN SEV_SNP_PAGE_STATE State, IN BOOLEAN UseLargeEntry, IN VOID *PscBuffer, IN UINTN PscBufferSize)
#define EFI_PAGES_TO_SIZE(Pages)
#define EFI_SIZE_TO_PAGES(Size)