From 57162cb62dc0f5d9aca31a035b96c5ac203b78ee Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 15 Dec 2022 23:10:03 +0800 Subject: [PATCH] OvmfPkg/PlatformInitLib: Transfer GUID Extension HOB This is required for passing the ACPI tables from the VMM up to the guest OS. They are transferred through this GUID extension. Signed-off-by: Jiaqi Gao Signed-off-by: Sebastien Boeuf Reviewed-by: Min Xu Reviewed-by: Jiewen Yao --- OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c index acd114e38e..55ca3ecaa1 100644 --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c @@ -547,6 +547,7 @@ TransferTdxHobList ( EFI_PEI_HOB_POINTERS Hob; EFI_RESOURCE_TYPE ResourceType; EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; + VOID *GuidedData; // // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx guest. @@ -577,6 +578,10 @@ TransferTdxHobList ( Hob.MemoryAllocation->AllocDescriptor.MemoryType ); break; + case EFI_HOB_TYPE_GUID_EXTENSION: + GuidedData = (VOID *)(&Hob.Guid->Name + 1); + BuildGuidDataHob (&Hob.Guid->Name, GuidedData, Hob.Guid->Header.HobLength - sizeof (EFI_HOB_GUID_TYPE)); + break; } Hob.Raw = GET_NEXT_HOB (Hob);