Skip to content

Commit

Permalink
OvmfPkg: refine TdTcg2Dxe
Browse files Browse the repository at this point in the history
This patch removes unused references to ResetNotification code.
ACPI table generation refined by removing excessive CopyMem() call.

Signed-off-by: Mike Maslenkin <[email protected]>
  • Loading branch information
ghbaccount authored and mergify[bot] committed Jun 21, 2024
1 parent d512bd3 commit be38c01
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <Protocol/VariableWrite.h>
#include <Protocol/Tcg2Protocol.h>
#include <Protocol/TrEEProtocol.h>
#include <Protocol/ResetNotification.h>
#include <Protocol/AcpiTable.h>

#include <Library/DebugLib.h>
Expand Down Expand Up @@ -2355,7 +2354,6 @@ InstallAcpiTable (
UINTN TableKey;
EFI_STATUS Status;
EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
UINT64 OemTableId;

Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTable);
if (EFI_ERROR (Status)) {
Expand All @@ -2366,8 +2364,7 @@ InstallAcpiTable (
mTdxEventlogAcpiTemplate.Laml = (UINT64)PcdGet32 (PcdCcEventlogAcpiTableLaml);
mTdxEventlogAcpiTemplate.Lasa = PcdGet64 (PcdCcEventlogAcpiTableLasa);
CopyMem (mTdxEventlogAcpiTemplate.Header.OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (mTdxEventlogAcpiTemplate.Header.OemId));
OemTableId = PcdGet64 (PcdAcpiDefaultOemTableId);
CopyMem (&mTdxEventlogAcpiTemplate.Header.OemTableId, &OemTableId, sizeof (UINT64));
mTdxEventlogAcpiTemplate.Header.OemTableId = PcdGet64 (PcdAcpiDefaultOemTableId);
mTdxEventlogAcpiTemplate.Header.OemRevision = PcdGet32 (PcdAcpiDefaultOemRevision);
mTdxEventlogAcpiTemplate.Header.CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
mTdxEventlogAcpiTemplate.Header.CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
Expand Down
1 change: 0 additions & 1 deletion OvmfPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
gEfiCcMeasurementProtocolGuid ## PRODUCES
gEfiMpServiceProtocolGuid ## SOMETIMES_CONSUMES
gEfiVariableWriteArchProtocolGuid ## NOTIFY
gEfiResetNotificationProtocolGuid ## CONSUMES
gEfiAcpiTableProtocolGuid ## NOTIFY

[Pcd]
Expand Down

0 comments on commit be38c01

Please sign in to comment.