TianoCore EDK2 master
Loading...
Searching...
No Matches
SnpPageStateChange.h File Reference

Go to the source code of this file.

Enumerations

enum  SEV_SNP_PAGE_STATE { SevSnpPagePrivate , SevSnpPageShared }
 

Functions

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)
 
VOID SnpPageStateFailureTerminate (VOID)
 

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 SnpPageStateChange.h.

Enumeration Type Documentation

◆ SEV_SNP_PAGE_STATE

enum SEV_SNP_PAGE_STATE

Definition at line 17 of file SnpPageStateChange.h.

Function Documentation

◆ InternalSetPageState()

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 
)

The function is used to set the page state when SEV-SNP is active. The page state transition consist of changing the page ownership in the RMP table, and using the PVALIDATE instruction to update the Validated bit in RMP table.

When the UseLargeEntry is set to TRUE, then function will try to use the large RMP entry (whevever possible).

Definition at line 225 of file SnpPageStateChangeInternal.c.

◆ SnpPageStateFailureTerminate()

VOID SnpPageStateFailureTerminate ( VOID  )

Definition at line 45 of file SnpPageStateChangeInternal.c.