TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/UefiLib.h>
#include <Library/HobLib.h>
#include <Protocol/Cpu.h>
#include <Protocol/MpInitLibDepProtocols.h>
#include <Protocol/MemoryAccept.h>
#include <Library/UefiBootServicesTableLib.h>
#include <ConfidentialComputingGuestAttr.h>
#include <IndustryStandard/Tdx.h>
#include <Library/PlatformInitLib.h>
#include <Library/TdxLib.h>
#include <TdxAcpiTable.h>
#include <Library/MemEncryptTdxLib.h>
Go to the source code of this file.
Macros | |
#define | ALIGNED_2MB_MASK 0x1fffff |
#define | INIT_PCDSET(NAME, RES) |
Functions | |
EFI_STATUS EFIAPI | TdxMemoryAccept (IN EDKII_MEMORY_ACCEPT_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS StartAddress, IN UINTN Size) |
VOID | SetPcdSettings (EFI_HOB_PLATFORM_INFO *PlatformInfoHob) |
STATIC EFI_HOB_RESOURCE_DESCRIPTOR * | GetResourceDescriptor (EFI_RESOURCE_TYPE Type, EFI_PHYSICAL_ADDRESS Start, EFI_PHYSICAL_ADDRESS End) |
STATIC EFI_HOB_RESOURCE_DESCRIPTOR * | GetHighestResourceDescriptor (EFI_RESOURCE_TYPE Type, EFI_PHYSICAL_ADDRESS End) |
EFI_STATUS | SetMmioSharedBit (VOID) |
EFI_STATUS EFIAPI | TdxDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EFI_HANDLE | mTdxDxeHandle = NULL |
EDKII_MEMORY_ACCEPT_PROTOCOL | mMemoryAcceptProtocol |
TDX Dxe driver. This driver is dispatched early in DXE, due to being list in APRIORI.
This module is responsible for:
Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TdxDxe.c.
#define INIT_PCDSET | ( | NAME, | |
RES | |||
) |
STATIC EFI_HOB_RESOURCE_DESCRIPTOR * GetHighestResourceDescriptor | ( | EFI_RESOURCE_TYPE | Type, |
EFI_PHYSICAL_ADDRESS | End | ||
) |
Location of resource hob matching type and highest address below end
[in] | Type | The type of resource hob to locate. |
[in] | End | The resource hob return is the closest to the End address |
pointer | to resource Return pointer to a resource hob that matches or NULL. |
STATIC EFI_HOB_RESOURCE_DESCRIPTOR * GetResourceDescriptor | ( | EFI_RESOURCE_TYPE | Type, |
EFI_PHYSICAL_ADDRESS | Start, | ||
EFI_PHYSICAL_ADDRESS | End | ||
) |
Location of resource hob matching type and starting address
[in] | Type | The type of resource hob to locate. |
[in] | Start | The resource hob must at least begin at address. |
pointer | to resource Return pointer to a resource hob that matches or NULL. |
EFI_STATUS SetMmioSharedBit | ( | VOID | ) |
Set the shared bit for mmio region in Tdx guest.
In Tdx guest there are 2 ways to access mmio, TdVmcall or direct access. For direct access, the shared bit of the PageTableEntry should be set. The mmio region information is retrieved from hob list.
EFI_SUCCESS | The shared bit is set successfully. |
EFI_UNSUPPORTED | Setting the shared bit of memory region is not supported |
VOID SetPcdSettings | ( | EFI_HOB_PLATFORM_INFO * | PlatformInfoHob | ) |
EFI_STATUS EFIAPI TdxDxeEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
EFI_STATUS EFIAPI TdxMemoryAccept | ( | IN EDKII_MEMORY_ACCEPT_PROTOCOL * | This, |
IN EFI_PHYSICAL_ADDRESS | StartAddress, | ||
IN UINTN | Size | ||
) |
EDKII_MEMORY_ACCEPT_PROTOCOL mMemoryAcceptProtocol |
EFI_HANDLE mTdxDxeHandle = NULL |