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

Go to the source code of this file.

Functions

STATIC UINT64 GetHypervisorFeature (VOID)
 
STATIC VOID AmdSevSnpGetApicIds (VOID)
 
STATIC VOID AmdSevSnpInitialize (VOID)
 
STATIC VOID SevEsProtocolFailure (IN UINT8 ReasonCode)
 
STATIC VOID GhcbRegister (IN EFI_PHYSICAL_ADDRESS Address)
 
STATIC VOID AmdSevEsInitialize (IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
 
VOID AmdSevInitialize (IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
 
VOID SevInitializeRam (VOID)
 

Detailed Description

Initialize Secure Encrypted Virtualization (SEV) support

Copyright (c) 2017 - 2024, Advanced Micro Devices. All rights reserved.

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

Definition in file AmdSev.c.

Function Documentation

◆ AmdSevEsInitialize()

STATIC VOID AmdSevEsInitialize ( IN EFI_HOB_PLATFORM_INFO PlatformInfoHob)

Initialize SEV-ES support if running as an SEV-ES guest.

Definition at line 299 of file AmdSev.c.

◆ AmdSevInitialize()

VOID AmdSevInitialize ( IN OUT EFI_HOB_PLATFORM_INFO PlatformInfoHob)

Function checks if SEV support is available, if present then it sets the dynamic PcdPteMemoryEncryptionAddressOrMask with memory encryption mask.

Definition at line 432 of file AmdSev.c.

◆ AmdSevSnpGetApicIds()

STATIC VOID AmdSevSnpGetApicIds ( VOID  )

Retrieve APIC IDs from the hypervisor.

Definition at line 41 of file AmdSev.c.

◆ AmdSevSnpInitialize()

STATIC VOID AmdSevSnpInitialize ( VOID  )

Initialize SEV-SNP support if running as an SEV-SNP guest.

Definition at line 122 of file AmdSev.c.

◆ GetHypervisorFeature()

STATIC UINT64 GetHypervisorFeature ( VOID  )

Get the hypervisor features bitmap

Definition at line 212 of file AmdSev.c.

◆ GhcbRegister()

STATIC VOID GhcbRegister ( IN EFI_PHYSICAL_ADDRESS  Address)

This function can be used to register the GHCB GPA.

Parameters
[in]AddressThe physical address to be registered.

Definition at line 254 of file AmdSev.c.

◆ SevEsProtocolFailure()

STATIC VOID SevEsProtocolFailure ( IN UINT8  ReasonCode)

Handle an SEV-SNP/GHCB protocol check failure.

Notify the hypervisor using the VMGEXIT instruction that the SEV-SNP guest wishes to be terminated.

Parameters
[in]ReasonCodeReason code to provide to the hypervisor for the termination request.

Definition at line 185 of file AmdSev.c.

◆ SevInitializeRam()

VOID SevInitializeRam ( VOID  )

The function performs SEV specific region initialization.

Definition at line 542 of file AmdSev.c.