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>
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) |
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.
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.
STATIC UINT32 EFIAPI InternalMemEncryptSevStatus | ( | VOID | ) |
Read the SEV Status MSR value from the workarea
Definition at line 53 of file SecMemEncryptSevLibInternal.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 153 of file SecMemEncryptSevLibInternal.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 94 of file SecMemEncryptSevLibInternal.c.
UINT64 EFIAPI MemEncryptSevGetEncryptionMask | ( | VOID | ) |
Returns the SEV encryption mask.
Definition at line 131 of file SecMemEncryptSevLibInternal.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 113 of file SecMemEncryptSevLibInternal.c.
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.
[out] | BaseAddress | The base address of the lowest-address page that covers the initial SMRAM Save State Map. |
[out] | NumberOfPages | The number of pages in the page range that covers the initial SMRAM Save State Map. |
RETURN_SUCCESS | BaseAddress and NumberOfPages have been set on output. |
RETURN_UNSUPPORTED | SMM is unavailable. |
Definition at line 181 of file SecMemEncryptSevLibInternal.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 75 of file SecMemEncryptSevLibInternal.c.