TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiSnpSystemRamValidate.c File Reference

Go to the source code of this file.

Data Structures

struct  SNP_PRE_VALIDATED_RANGE
 

Functions

STATIC BOOLEAN DetectPreValidatedOverLap (IN PHYSICAL_ADDRESS StartAddress, IN PHYSICAL_ADDRESS EndAddress, OUT SNP_PRE_VALIDATED_RANGE *OverlapRange)
 
VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam (IN PHYSICAL_ADDRESS BaseAddress, IN UINTN NumPages)
 

Variables

STATIC UINT8 mPscBufferPage [EFI_PAGE_SIZE]
 
STATIC SNP_PRE_VALIDATED_RANGE mPreValidatedRange []
 

Detailed Description

SEV-SNP Page Validation functions.

Copyright (c) 2021 - 2024, AMD Incorporated. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PeiSnpSystemRamValidate.c.

Function Documentation

◆ DetectPreValidatedOverLap()

STATIC BOOLEAN DetectPreValidatedOverLap ( IN PHYSICAL_ADDRESS  StartAddress,
IN PHYSICAL_ADDRESS  EndAddress,
OUT SNP_PRE_VALIDATED_RANGE OverlapRange 
)

Definition at line 43 of file PeiSnpSystemRamValidate.c.

◆ MemEncryptSevSnpPreValidateSystemRam()

VOID EFIAPI MemEncryptSevSnpPreValidateSystemRam ( IN PHYSICAL_ADDRESS  BaseAddress,
IN UINTN  NumPages 
)

Pre-validate the system RAM when SEV-SNP is enabled in the guest VM.

Parameters
[in]BaseAddressBase address
[in]NumPagesNumber of pages starting from the base address

Definition at line 76 of file PeiSnpSystemRamValidate.c.

Variable Documentation

◆ mPreValidatedRange

STATIC SNP_PRE_VALIDATED_RANGE mPreValidatedRange[]
Initial value:
= {
{
FixedPcdGet32 (PcdOvmfSecPageTablesBase),
FixedPcdGet32 (PcdOvmfPeiMemFvBase),
},
{
FixedPcdGet32 (PcdOvmfSecValidatedStart),
FixedPcdGet32 (PcdOvmfSecValidatedEnd)
},
}
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92

Definition at line 27 of file PeiSnpSystemRamValidate.c.

◆ mPscBufferPage

STATIC UINT8 mPscBufferPage[EFI_PAGE_SIZE]

Definition at line 20 of file PeiSnpSystemRamValidate.c.