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

Go to the source code of this file.

Functions

STATIC SEC_SEV_ES_WORK_AREA *EFIAPI GetSevEsWorkArea (VOID)
 
STATIC UINT32 EFIAPI InternalMemEncryptSevStatus (VOID)
 
BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled (VOID)
 
BOOLEAN EFIAPI MemEncryptSevEsIsEnabled (VOID)
 
BOOLEAN EFIAPI MemEncryptSevIsEnabled (VOID)
 
UINT64 EFIAPI MemEncryptSevGetEncryptionMask (VOID)
 
BOOLEAN EFIAPI MemEncryptSevEsDebugVirtualizationIsEnabled (VOID)
 
RETURN_STATUS EFIAPI MemEncryptSevLocateInitialSmramSaveStateMapPages (OUT UINTN *BaseAddress, OUT UINTN *NumberOfPages)
 

Detailed Description

Secure Encrypted Virtualization (SEV) library helper function

Copyright (c) 2020, Advanced Micro Devices, Inc. All rights reserved.

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

Definition in file SecMemEncryptSevLibInternal.c.

Function Documentation

◆ GetSevEsWorkArea()

STATIC SEC_SEV_ES_WORK_AREA *EFIAPI GetSevEsWorkArea ( VOID  )

Read the workarea to determine whether SEV is enabled. If enabled, then return the SevEsWorkArea pointer.

Definition at line 28 of file SecMemEncryptSevLibInternal.c.

◆ InternalMemEncryptSevStatus()

STATIC UINT32 EFIAPI InternalMemEncryptSevStatus ( VOID  )

Read the SEV Status MSR value from the workarea

Definition at line 53 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevEsDebugVirtualizationIsEnabled()

BOOLEAN EFIAPI MemEncryptSevEsDebugVirtualizationIsEnabled ( VOID  )

Returns a boolean to indicate whether DebugVirtualization is enabled.

Return values
TRUEDebugVirtualization is enabled
FALSEDebugVirtualization is not enabled

Definition at line 153 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevEsIsEnabled()

BOOLEAN EFIAPI MemEncryptSevEsIsEnabled ( VOID  )

Returns a boolean to indicate whether SEV-ES is enabled.

Return values
TRUESEV-ES is enabled
FALSESEV-ES is not enabled

Definition at line 94 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevGetEncryptionMask()

UINT64 EFIAPI MemEncryptSevGetEncryptionMask ( VOID  )

Returns the SEV encryption mask.

Returns
The SEV pagtable encryption mask

Definition at line 131 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevIsEnabled()

BOOLEAN EFIAPI MemEncryptSevIsEnabled ( VOID  )

Returns a boolean to indicate whether SEV is enabled.

Return values
TRUESEV is enabled
FALSESEV is not enabled

Definition at line 113 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevLocateInitialSmramSaveStateMapPages()

RETURN_STATUS EFIAPI MemEncryptSevLocateInitialSmramSaveStateMapPages ( OUT UINTN BaseAddress,
OUT UINTN NumberOfPages 
)

Locate the page range that covers the initial (pre-SMBASE-relocation) SMRAM Save State Map.

Parameters
[out]BaseAddressThe base address of the lowest-address page that covers the initial SMRAM Save State Map.
[out]NumberOfPagesThe number of pages in the page range that covers the initial SMRAM Save State Map.
Return values
RETURN_SUCCESSBaseAddress and NumberOfPages have been set on output.
RETURN_UNSUPPORTEDSMM is unavailable.

Definition at line 181 of file SecMemEncryptSevLibInternal.c.

◆ MemEncryptSevSnpIsEnabled()

BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled ( VOID  )

Returns a boolean to indicate whether SEV-SNP is enabled.

Return values
TRUESEV-SNP is enabled
FALSESEV-SNP is not enabled

Definition at line 75 of file SecMemEncryptSevLibInternal.c.