TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MemEncryptSevLib.h>
#include <Library/PcdLib.h>
#include <Register/Amd/Cpuid.h>
#include <Register/Amd/Msr.h>
#include <Register/Cpuid.h>
#include <Uefi/UefiBaseType.h>
#include <ConfidentialComputingGuestAttr.h>
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 |
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.
STATIC BOOLEAN AmdMemEncryptionAttrCheck | ( | IN UINT64 | CurrentAttr, |
IN CONFIDENTIAL_COMPUTING_GUEST_ATTR | Attr | ||
) |
The function check if the specified Attr is set.
[in] | CurrentAttr | The current attribute. |
[in] | Attr | The attribute to check. |
TRUE | The specified Attr is set. |
FALSE | The specified Attr is not set. |
Definition at line 38 of file DxeMemEncryptSevLibInternal.c.
Check if the specified confidential computing attribute is active.
[in] | Attr | The attribute to check. |
TRUE | The specified Attr is active. |
FALSE | The specified Attr is not active. |
Definition at line 79 of file DxeMemEncryptSevLibInternal.c.
BOOLEAN EFIAPI MemEncryptSevEsDebugVirtualizationIsEnabled | ( | VOID | ) |
Returns a boolean to indicate whether DebugVirtualization is enabled.
TRUE | DebugVirtualization is enabled |
FALSE | DebugVirtualization is not enabled |
Definition at line 177 of file DxeMemEncryptSevLibInternal.c.
BOOLEAN EFIAPI MemEncryptSevEsIsEnabled | ( | VOID | ) |
Returns a boolean to indicate whether SEV-ES is enabled.
TRUE | SEV-ES is enabled |
FALSE | SEV-ES is not enabled |
Definition at line 128 of file DxeMemEncryptSevLibInternal.c.
UINT64 EFIAPI MemEncryptSevGetEncryptionMask | ( | VOID | ) |
Returns the SEV encryption mask.
Definition at line 157 of file DxeMemEncryptSevLibInternal.c.
BOOLEAN EFIAPI MemEncryptSevIsEnabled | ( | VOID | ) |
Returns a boolean to indicate whether SEV is enabled.
TRUE | SEV is enabled |
FALSE | SEV is not enabled |
Definition at line 143 of file DxeMemEncryptSevLibInternal.c.
BOOLEAN EFIAPI MemEncryptSevSnpIsEnabled | ( | VOID | ) |
Returns a boolean to indicate whether SEV-SNP is enabled.
TRUE | SEV-SNP is enabled |
FALSE | SEV-SNP is not enabled |
Definition at line 113 of file DxeMemEncryptSevLibInternal.c.
STATIC UINT64 mCurrentAttr = 0 |
Definition at line 21 of file DxeMemEncryptSevLibInternal.c.
Definition at line 22 of file DxeMemEncryptSevLibInternal.c.
STATIC UINT64 mSevEncryptionMask = 0 |
Definition at line 23 of file DxeMemEncryptSevLibInternal.c.
Definition at line 24 of file DxeMemEncryptSevLibInternal.c.