Commit Graph

6 Commits

Author SHA1 Message Date
Ceping Sun d51baa02a6 OvmfPkg: Update with TdxMeasurementLib
Since the tdx measurement APIs are implemented by
TdxMeasurementLib, the duplicate code are removed.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2025-01-13 09:38:39 +00:00
Ceping Sun bdf3c917e3 OvmfPkg/TdTcg2Dxe: Update with TdxHelperLib
Since TdxHelperLib has the API(TdxHelperMapPcrToMrIndex)
to map PCR to MR index, the duplicate codes are removed.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Min M Xu efaf8931bb OvmfPkg/TdTcg2Dxe: Fix the SeparatorEvent issue in RTMRs
According to the TCG EFI platform specification, the firmware must
measure the EV_SEPARATOR event into PCRs 0-7. As PCR[1] and PCR[7]
map to RTMR[0], and PCRs [2-6] map to RTMR[1], it is necessary to
measure one EV_SEPARATOR event into RTMR[0] and another one into
RTMR[1].

An issue is found in TdTcg2Dxe that 2 EV_SEPARATOR events are measured
to RTMR[0] but no EV_SEPARATOR event is measured to RTMR[1]. This
patch fixes the above issue.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Qinkun Bao <qinkun@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
2024-08-27 12:50:51 +00:00
Mike Maslenkin be38c01da2 OvmfPkg: refine TdTcg2Dxe
This patch removes unused references to ResetNotification code.
ACPI table generation refined by removing excessive CopyMem() call.

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2024-06-21 06:43:23 +00:00
Dionna Glaze 17f333f2a4 OvmfPkg: Add sp800155Event3 support
The signatures for event2 or event3 are now valid TCG SP800155 event
types. Fixes uncrustify formatting.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2024-05-07 00:21:40 +00:00
Min M Xu c98fbda328 OvmfPkg/TdTcg2Dxe: Add TdTcg2Dxe
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752

This library is the one of SecurityPkg/Tcg/TdTcg2Dxe. It is
designed for Intel TDX enlightened OVMF. So moving it from SecurityPkg
to OvmfPkg. To prevent breaking the build, the moving is splitted into 2
patch. SecurityPkg/Tcg/TdTcg2Dxe will be deleted in the next patch.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2024-04-17 03:04:13 +00:00