Skip to content

Commit

Permalink
WT
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Dmytruk <[email protected]>
  • Loading branch information
SergiiDmytruk committed Jul 4, 2024
1 parent 0444e65 commit 9af3e30
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions DasharoPayloadPkg/DasharoPayloadPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,10 @@
NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
}
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
# SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf {
# <LibraryClasses>
# MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
# }
SecurityPkg/Tcg/TcgDxe/TcgDxe.inf {
<LibraryClasses>
Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
Expand Down
1 change: 1 addition & 0 deletions DasharoPayloadPkg/DasharoPayloadPkg.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
INF SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
#INF SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf
!if $(OPAL_PASSWORD_ENABLE) == TRUE
INF SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
!endif
Expand Down
11 changes: 6 additions & 5 deletions MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2861,10 +2861,10 @@ BmEnumeratePreInstalledBootOptions (
FreePool(DevPathStr);

/* Skip non-ESP */
if (!IsEfiSysPartition(Handles[Index])) {
DEBUG ((EFI_D_INFO, "%a: Skipping, not an ESP\n", __FUNCTION__));
continue;
}
/* if (!IsEfiSysPartition(Handles[Index])) { */
/* DEBUG ((EFI_D_INFO, "%a: Skipping, not an ESP\n", __FUNCTION__)); */
/* continue; */
/* } */

//
// Skip the removable media, except if DTS.
Expand All @@ -2884,9 +2884,10 @@ BmEnumeratePreInstalledBootOptions (
&gEfiBlockIoProtocolGuid,
(VOID **) &BlkIo
);

if (!EFI_ERROR (Status) && BlkIo->Media->RemovableMedia) {
DEBUG ((EFI_D_INFO, "%a: Skipping, media removable\n", __FUNCTION__));
continue;
/* continue; */
}

// Custom boot managers first
Expand Down
6 changes: 4 additions & 2 deletions SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ PublishTpm2 (
);

mTpm2AcpiTemplate.Header.Revision = PcdGet8 (PcdTpm2AcpiTableRev);
DEBUG ((DEBUG_INFO, "Tpm2 ACPI table revision is %d\n", mTpm2AcpiTemplate.Header.Revision));
DEBUG ((DEBUG_ERROR, "Tpm2 ACPI table revision is %d\n", mTpm2AcpiTemplate.Header.Revision));

//
// PlatformClass is only valid for version 4 and above
Expand All @@ -810,7 +810,7 @@ PublishTpm2 (
//
if (mTpm2AcpiTemplate.Header.Revision >= EFI_TPM2_ACPI_TABLE_REVISION_4) {
mTpm2AcpiTemplate.Flags = (mTpm2AcpiTemplate.Flags & 0xFFFF0000) | PcdGet8 (PcdTpmPlatformClass);
DEBUG ((DEBUG_INFO, "Tpm2 ACPI table PlatformClass is %d\n", (mTpm2AcpiTemplate.Flags & 0x0000FFFF)));
DEBUG ((DEBUG_ERROR, "Tpm2 ACPI table PlatformClass is %d\n", (mTpm2AcpiTemplate.Flags & 0x0000FFFF)));
}

mTpm2AcpiTemplate.Laml = PcdGet32 (PcdTpm2AcpiTableLaml);
Expand Down Expand Up @@ -863,6 +863,7 @@ PublishTpm2 (
&TableKey
);
ASSERT_EFI_ERROR (Status);
DEBUG ((DEBUG_ERROR, "Tpm2 ACPI table installed: %r\n", Status));

return Status;
}
Expand Down Expand Up @@ -894,6 +895,7 @@ InitializeTcgAcpi (
return EFI_UNSUPPORTED;
}

DEBUG ((DEBUG_ERROR, "TPM2 DTPM instance required!\n"));
Status = PublishAcpiTable ();
ASSERT_EFI_ERROR (Status);

Expand Down

0 comments on commit 9af3e30

Please sign in to comment.