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

Go to the source code of this file.

Macros

#define EFI_MEMORY_INTERNAL_MASK   0x0700000000000000ULL
 

Functions

STATIC EFI_STATUS AllocateConfidentialComputingBlob (OUT CONFIDENTIAL_COMPUTING_SNP_BLOB_LOCATION **CcBlobPtr)
 
STATIC EFI_STATUS EFIAPI AmdSevMemoryAccept (IN EDKII_MEMORY_ACCEPT_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS StartAddress, IN UINTN Size)
 
STATIC EFI_STATUS AcceptAllMemory (VOID)
 
VOID EFIAPI ResolveUnacceptedMemory (IN EFI_EVENT Event, IN VOID *Context)
 
STATIC EFI_STATUS EFIAPI AllowUnacceptedMemory (IN OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL *This)
 
EFI_STATUS EFIAPI AmdSevDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC EFI_HANDLE mAmdSevDxeHandle = NULL
 
STATIC BOOLEAN mAcceptAllMemoryAtEBS = TRUE
 
STATIC EFI_EVENT mAcceptAllMemoryEvent = NULL
 
STATIC OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL mMemoryAcceptanceProtocol = { AllowUnacceptedMemory }
 
STATIC EDKII_MEMORY_ACCEPT_PROTOCOL mMemoryAcceptProtocol
 

Detailed Description

AMD Sev Dxe driver. This driver is dispatched early in DXE, due to being list in APRIORI. It clears C-bit from MMIO and NonExistent Memory space when SEV is enabled.

Copyright (c) 2017 - 2020, AMD Inc. All rights reserved.

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

Definition in file AmdSevDxe.c.

Macro Definition Documentation

◆ EFI_MEMORY_INTERNAL_MASK

#define EFI_MEMORY_INTERNAL_MASK   0x0700000000000000ULL

Definition at line 29 of file AmdSevDxe.c.

Function Documentation

◆ AcceptAllMemory()

STATIC EFI_STATUS AcceptAllMemory ( VOID  )

Definition at line 98 of file AmdSevDxe.c.

◆ AllocateConfidentialComputingBlob()

STATIC EFI_STATUS AllocateConfidentialComputingBlob ( OUT CONFIDENTIAL_COMPUTING_SNP_BLOB_LOCATION **  CcBlobPtr)

Definition at line 33 of file AmdSevDxe.c.

◆ AllowUnacceptedMemory()

STATIC EFI_STATUS EFIAPI AllowUnacceptedMemory ( IN OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL This)

Definition at line 178 of file AmdSevDxe.c.

◆ AmdSevDxeEntryPoint()

EFI_STATUS EFIAPI AmdSevDxeEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Definition at line 196 of file AmdSevDxe.c.

◆ AmdSevMemoryAccept()

STATIC EFI_STATUS EFIAPI AmdSevMemoryAccept ( IN EDKII_MEMORY_ACCEPT_PROTOCOL This,
IN EFI_PHYSICAL_ADDRESS  StartAddress,
IN UINTN  Size 
)

Definition at line 73 of file AmdSevDxe.c.

◆ ResolveUnacceptedMemory()

VOID EFIAPI ResolveUnacceptedMemory ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Definition at line 160 of file AmdSevDxe.c.

Variable Documentation

◆ mAcceptAllMemoryAtEBS

STATIC BOOLEAN mAcceptAllMemoryAtEBS = TRUE

Definition at line 66 of file AmdSevDxe.c.

◆ mAcceptAllMemoryEvent

STATIC EFI_EVENT mAcceptAllMemoryEvent = NULL

Definition at line 68 of file AmdSevDxe.c.

◆ mAmdSevDxeHandle

STATIC EFI_HANDLE mAmdSevDxeHandle = NULL

Definition at line 64 of file AmdSevDxe.c.

◆ mMemoryAcceptanceProtocol

STATIC OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL mMemoryAcceptanceProtocol = { AllowUnacceptedMemory }

Definition at line 188 of file AmdSevDxe.c.

◆ mMemoryAcceptProtocol

STATIC EDKII_MEMORY_ACCEPT_PROTOCOL mMemoryAcceptProtocol
Initial value:
= {
AmdSevMemoryAccept
}

Definition at line 190 of file AmdSevDxe.c.