X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FLibrary%2FPeiTcg2PhysicalPresenceLib%2FPeiTcg2PhysicalPresenceLib.c;h=b80129bf7ff41c93b650a5d2290179cf25386de3;hp=a4c3cb8aeb7c3940cb50f0e3c11aa78520fec7e1;hb=HEAD;hpb=b3548d32ddb553a9e95503457c66d11462622d16 diff --git a/SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.c index a4c3cb8aeb..7977382f75 100644 --- a/SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.c +++ b/SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.c @@ -3,14 +3,8 @@ This library will get TPM 2.0 physical presence information. -Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -40,20 +34,21 @@ Tcg2PhysicalPresenceLibGetManagementFlags ( EFI_TCG2_PHYSICAL_PRESENCE_FLAGS PpiFlags; UINTN DataSize; - Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi); + Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **)&VariablePpi); ASSERT_EFI_ERROR (Status); DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE_FLAGS); - Status = VariablePpi->GetVariable ( - VariablePpi, - TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE, - &gEfiTcg2PhysicalPresenceGuid, - NULL, - &DataSize, - &PpiFlags - ); + Status = VariablePpi->GetVariable ( + VariablePpi, + TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE, + &gEfiTcg2PhysicalPresenceGuid, + NULL, + &DataSize, + &PpiFlags + ); if (EFI_ERROR (Status)) { - PpiFlags.PPFlags = TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT | TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT; + PpiFlags.PPFlags = PcdGet32 (PcdTcg2PhysicalPresenceFlags); } + return PpiFlags.PPFlags; }