TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/CpuLib.h>
#include <Library/CpuPageTableLib.h>
#include <Library/DebugLib.h>
#include <Library/LocalApicLib.h>
#include <Library/MemEncryptSevLib.h>
#include <Library/BaseMemoryLib.h>
#include <Register/Amd/Ghcb.h>
#include <Register/Amd/Msr.h>
#include "AmdSev.h"
Go to the source code of this file.
Functions | |
VOID | SevEsProtocolFailure (IN UINT8 ReasonCode) |
BOOLEAN | SevSnpIsEnabled (VOID) |
STATIC VOID | SevSnpGhcbRegister (EFI_PHYSICAL_ADDRESS Address) |
STATIC BOOLEAN | HypervisorSnpFeatureCheck (VOID) |
VOID | SevEsProtocolCheck (VOID) |
BOOLEAN | IsSevGuest (VOID) |
BOOLEAN | SevEsIsEnabled (VOID) |
VOID | SecValidateSystemRam (VOID) |
VOID | SecMapApicBaseUnencrypted (VOID) |
File defines the Sec routines for the AMD SEV
Copyright (c) 2021, Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmdSev.c.
STATIC BOOLEAN HypervisorSnpFeatureCheck | ( | VOID | ) |
BOOLEAN IsSevGuest | ( | VOID | ) |
VOID SecMapApicBaseUnencrypted | ( | VOID | ) |
Map known MMIO regions unencrypted if SEV-ES is active.
During early booting, page table entries default to having the encryption bit set for SEV-ES/SEV-SNP guests. In cases where there is MMIO to an address, the encryption bit should be cleared. Clear it here for any known MMIO accesses during SEC, which is currently just the APIC base address.
VOID SecValidateSystemRam | ( | VOID | ) |
Validate System RAM used for decompressing the PEI and DXE firmware volumes when SEV-SNP is active. The PCDs SecValidatedStart and SecValidatedEnd are set in OvmfPkg/Include/Fdf/FvmainCompactScratchEnd.fdf.inc.
BOOLEAN SevEsIsEnabled | ( | VOID | ) |
VOID SevEsProtocolCheck | ( | VOID | ) |
VOID SevEsProtocolFailure | ( | IN UINT8 | ReasonCode | ) |
STATIC VOID SevSnpGhcbRegister | ( | EFI_PHYSICAL_ADDRESS | Address | ) |