TianoCore EDK2 master
AmdSev.c File Reference
#include "MpLib.h"
#include <Library/VmgExitLib.h>
#include <Register/Amd/Fam17Msr.h>
#include <Register/Amd/Ghcb.h>

Go to the source code of this file.

Functions

VOID SevSnpCreateSaveArea (IN CPU_MP_DATA *CpuMpData, IN CPU_AP_DATA *CpuData, UINT32 ApicId)
 
VOID SevSnpCreateAP (IN CPU_MP_DATA *CpuMpData, IN INTN ProcessorNumber)
 
UINT32 SevSnpRmpAdjust (IN EFI_PHYSICAL_ADDRESS PageAddress, IN BOOLEAN VmsaPage)
 

Detailed Description

AMD SEV helper function.

Copyright (c) 2021, AMD Incorporated. All rights reserved.

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

Definition in file AmdSev.c.

Function Documentation

◆ SevSnpCreateAP()

VOID SevSnpCreateAP ( IN CPU_MP_DATA CpuMpData,
IN INTN  ProcessorNumber 
)

Create SEV-SNP APs.

Parameters
[in]CpuMpDataPointer to CPU MP Data
[in]ProcessorNumberThe handle number of specified processor (-1 for all APs)

Definition at line 202 of file AmdSev.c.

◆ SevSnpCreateSaveArea()

VOID SevSnpCreateSaveArea ( IN CPU_MP_DATA CpuMpData,
IN CPU_AP_DATA CpuData,
UINT32  ApicId 
)

Create an SEV-SNP AP save area (VMSA) for use in running the vCPU.

Parameters
[in]CpuMpDataPointer to CPU MP Data
[in]CpuDataPointer to CPU AP Data
[in]ApicIdAPIC ID of the vCPU

Definition at line 24 of file AmdSev.c.

◆ SevSnpRmpAdjust()

UINT32 SevSnpRmpAdjust ( IN EFI_PHYSICAL_ADDRESS  PageAddress,
IN BOOLEAN  VmsaPage 
)

Issue RMPADJUST to adjust the VMSA attribute of an SEV-SNP page.

Parameters
[in]PageAddress
[in]VmsaPage
Returns
RMPADJUST return value

Definition at line 241 of file AmdSev.c.