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

Go to the source code of this file.

Functions

STATIC BOOLEAN AmdMemEncryptionAttrCheck (IN UINT64 CurrentAttr, IN CONFIDENTIAL_COMPUTING_GUEST_ATTR Attr)
 
STATIC BOOLEAN EFIAPI ConfidentialComputingGuestHas (IN CONFIDENTIAL_COMPUTING_GUEST_ATTR Attr)
 
BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled (VOID)
 
BOOLEAN EFIAPI MemEncryptSevEsIsEnabled (VOID)
 
BOOLEAN EFIAPI MemEncryptSevIsEnabled (VOID)
 
UINT64 EFIAPI MemEncryptSevGetEncryptionMask (VOID)
 
BOOLEAN EFIAPI MemEncryptSevEsDebugVirtualizationIsEnabled (VOID)
 

Variables

STATIC UINT64 mCurrentAttr = 0
 
STATIC BOOLEAN mCurrentAttrRead = FALSE
 
STATIC UINT64 mSevEncryptionMask = 0
 
STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE
 

Detailed Description

Secure Encrypted Virtualization (SEV) library helper function

Copyright (c) 2017 - 2020, AMD Incorporated. All rights reserved.

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

Definition in file DxeMemEncryptSevLibInternal.c.

Function Documentation

◆ AmdMemEncryptionAttrCheck()

STATIC BOOLEAN AmdMemEncryptionAttrCheck ( IN UINT64  CurrentAttr,
IN CONFIDENTIAL_COMPUTING_GUEST_ATTR  Attr 
)

The function check if the specified Attr is set.

Parameters
[in]CurrentAttrThe current attribute.
[in]AttrThe attribute to check.
Return values
TRUEThe specified Attr is set.
FALSEThe specified Attr is not set.

Definition at line 38 of file DxeMemEncryptSevLibInternal.c.

◆ ConfidentialComputingGuestHas()

STATIC BOOLEAN EFIAPI ConfidentialComputingGuestHas ( IN CONFIDENTIAL_COMPUTING_GUEST_ATTR  Attr)

Check if the specified confidential computing attribute is active.

Parameters
[in]AttrThe attribute to check.
Return values
TRUEThe specified Attr is active.
FALSEThe specified Attr is not active.

Definition at line 79 of file DxeMemEncryptSevLibInternal.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 177 of file DxeMemEncryptSevLibInternal.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 128 of file DxeMemEncryptSevLibInternal.c.

◆ MemEncryptSevGetEncryptionMask()

UINT64 EFIAPI MemEncryptSevGetEncryptionMask ( VOID  )

Returns the SEV encryption mask.

Returns
The SEV pagtable encryption mask

Definition at line 157 of file DxeMemEncryptSevLibInternal.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 143 of file DxeMemEncryptSevLibInternal.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 113 of file DxeMemEncryptSevLibInternal.c.

Variable Documentation

◆ mCurrentAttr

STATIC UINT64 mCurrentAttr = 0

Definition at line 21 of file DxeMemEncryptSevLibInternal.c.

◆ mCurrentAttrRead

STATIC BOOLEAN mCurrentAttrRead = FALSE

Definition at line 22 of file DxeMemEncryptSevLibInternal.c.

◆ mSevEncryptionMask

STATIC UINT64 mSevEncryptionMask = 0

Definition at line 23 of file DxeMemEncryptSevLibInternal.c.

◆ mSevEncryptionMaskSaved

STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE

Definition at line 24 of file DxeMemEncryptSevLibInternal.c.