Skip to content

Commit

Permalink
OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement
Browse files Browse the repository at this point in the history
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243

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

Cc: Erdem Aktas <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: Michael Roth <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Signed-off-by: Min Xu <[email protected]>
  • Loading branch information
mxu9 authored and mergify[bot] committed Feb 4, 2023
1 parent 6ea5051 commit 1f9bd93
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
5 changes: 4 additions & 1 deletion OvmfPkg/AmdSev/AmdSevX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion OvmfPkg/CloudHv/CloudHvX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion OvmfPkg/Microvm/MicrovmX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion OvmfPkg/OvmfPkgX64.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions OvmfPkg/PlatformPei/IntelTdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -39,6 +40,8 @@ IntelTdxInitialize (
return;
}

TdxHelperBuildGuidHobForTdxMeasurement ();

PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrIntelTdx);
ASSERT_RETURN_ERROR (PcdStatus);

Expand Down

0 comments on commit 1f9bd93

Please sign in to comment.