OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243

TdxHelperBuildGuidHobForTdxMeasurement is called in PlatformPei to build
GuidHob for Tdx measurement.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
This commit is contained in:
Min M Xu 2023-02-03 11:31:46 +08:00 committed by mergify[bot]
parent 6ea50514c1
commit 1f9bd937b3
5 changed files with 19 additions and 4 deletions

View File

@ -570,7 +570,10 @@
}
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
OvmfPkg/PlatformPei/PlatformPei.inf
OvmfPkg/PlatformPei/PlatformPei.inf {
<LibraryClasses>
NULL|OvmfPkg/IntelTdx/TdxHelperLib/TdxHelperLibNull.inf
}
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
UefiCpuPkg/CpuMpPei/CpuMpPei.inf
OvmfPkg/AmdSev/SecretPei/SecretPei.inf

View File

@ -678,7 +678,10 @@
}
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
OvmfPkg/PlatformPei/PlatformPei.inf
OvmfPkg/PlatformPei/PlatformPei.inf {
<LibraryClasses>
NULL|OvmfPkg/IntelTdx/TdxHelperLib/TdxHelperLibNull.inf
}
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
<LibraryClasses>
!if $(SMM_REQUIRE) == TRUE

View File

@ -679,7 +679,10 @@
}
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
OvmfPkg/PlatformPei/PlatformPei.inf
OvmfPkg/PlatformPei/PlatformPei.inf {
<LibraryClasses>
NULL|OvmfPkg/IntelTdx/TdxHelperLib/TdxHelperLibNull.inf
}
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
UefiCpuPkg/CpuMpPei/CpuMpPei.inf

View File

@ -746,7 +746,10 @@
}
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
OvmfPkg/PlatformPei/PlatformPei.inf
OvmfPkg/PlatformPei/PlatformPei.inf {
<LibraryClasses>
NULL|OvmfPkg/IntelTdx/TdxHelperLib/PeiTdxHelperLib.inf
}
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
<LibraryClasses>
!if $(SMM_REQUIRE) == TRUE

View File

@ -18,6 +18,7 @@
#include <Library/QemuFwCfgLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/TdxLib.h>
#include <Library/TdxHelperLib.h>
#include <Library/PlatformInitLib.h>
#include <WorkArea.h>
#include <ConfidentialComputingGuestAttr.h>
@ -39,6 +40,8 @@ IntelTdxInitialize (
return;
}
TdxHelperBuildGuidHobForTdxMeasurement ();
PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrIntelTdx);
ASSERT_RETURN_ERROR (PcdStatus);