TianoCore EDK2 master
Loading...
Searching...
No Matches
IntelTdx.c File Reference
#include <Base.h>
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <IndustryStandard/Tdx.h>
#include <IndustryStandard/IntelTdx.h>
#include <Library/PeiServicesLib.h>
#include <Pi/PiHob.h>
#include <WorkArea.h>
#include <ConfidentialComputingGuestAttr.h>

Go to the source code of this file.

Functions

VOID BuildResourceDescriptorHobForUnacceptedMemory (IN EFI_HOB_RESOURCE_DESCRIPTOR *Hob)
 
VOID EFIAPI TransferTdxHobList (VOID)
 
VOID EFIAPI PlatformTdxPublishRamRegions (VOID)
 

Detailed Description

Initialize Intel TDX support.

Copyright (c) 2021, Intel Corporation. All rights reserved.

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

Definition in file IntelTdx.c.

Function Documentation

◆ BuildResourceDescriptorHobForUnacceptedMemory()

VOID BuildResourceDescriptorHobForUnacceptedMemory ( IN EFI_HOB_RESOURCE_DESCRIPTOR Hob)

Build ResourceDescriptorHob for the unaccepted memory region. This memory region may be splitted into 2 parts because of lazy accept.

Parameters
HobPoint to the EFI_HOB_RESOURCE_DESCRIPTOR
Returns
VOID

Definition at line 32 of file IntelTdx.c.

◆ PlatformTdxPublishRamRegions()

VOID EFIAPI PlatformTdxPublishRamRegions ( VOID  )

In Tdx guest, the system memory is passed in TdHob by host VMM. So the major task of PlatformTdxPublishRamRegions is to walk thru the TdHob list and transfer the ResourceDescriptorHob and MemoryAllocationHob to the hobs in DXE phase.

MemoryAllocationHob should also be created for Mailbox and Ovmf work area.

Definition at line 146 of file IntelTdx.c.

◆ TransferTdxHobList()

VOID EFIAPI TransferTdxHobList ( VOID  )

Transfer the incoming HobList for the TD to the final HobList for Dxe. The Hobs transferred in this function are ResourceDescriptor hob and MemoryAllocation hob.

Parameters
[in]VmmHobListThe Hoblist pass the firmware

Definition at line 88 of file IntelTdx.c.