OvmfPkg/Tcg2ConfigPei: trivial coding style updates
- the @file comment block should match between INF and main C file - rewrap / refill columns to 79 characters - insert space before opening paren - prefix and suffix //-style comment block with empty // lines - fix indentation of arguments in multi-line function call - general tab spacing (indent step) is 2 in edk2, unlike QEMU's 4 No functional changes. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
		@@ -1,20 +1,20 @@
 | 
				
			|||||||
## @file
 | 
					## @file
 | 
				
			||||||
# Set TPM device type
 | 
					# Set TPM device type
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#  In SecurityPkg, this module initializes the TPM device type based on
 | 
					# In SecurityPkg, this module initializes the TPM device type based on a UEFI
 | 
				
			||||||
#  a UEFI variable and/or hardware detection. In OvmfPkg, the module
 | 
					# variable and/or hardware detection. In OvmfPkg, the module only performs TPM2
 | 
				
			||||||
#  only performs TPM2 hardware detection.
 | 
					# hardware detection.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
 | 
					# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
 | 
				
			||||||
# Copyright (C) 2018, Red Hat, Inc.
 | 
					# Copyright (C) 2018, Red Hat, Inc.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This program and the accompanying materials
 | 
					# This program and the accompanying materials are licensed and made available
 | 
				
			||||||
# are licensed and made available under the terms and conditions of the BSD License
 | 
					# under the terms and conditions of the BSD License which accompanies this
 | 
				
			||||||
# which accompanies this distribution. The full text of the license may be found at
 | 
					# distribution. The full text of the license may be found at
 | 
				
			||||||
# http://opensource.org/licenses/bsd-license.php
 | 
					# 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.
 | 
					 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
 | 
				
			||||||
 | 
					# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
				
			||||||
##
 | 
					##
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Defines]
 | 
					[Defines]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,17 +1,20 @@
 | 
				
			|||||||
/** @file
 | 
					/** @file
 | 
				
			||||||
  The module entry point for Tcg2 configuration module.
 | 
					  Set TPM device type
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Copyright (c) 2018, Red Hat, Inc.
 | 
					  In SecurityPkg, this module initializes the TPM device type based on a UEFI
 | 
				
			||||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
 | 
					  variable and/or hardware detection. In OvmfPkg, the module only performs TPM2
 | 
				
			||||||
 | 
					  hardware detection.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This program and the accompanying materials
 | 
					  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
 | 
				
			||||||
are licensed and made available under the terms and conditions of the BSD License
 | 
					  Copyright (C) 2018, Red Hat, Inc.
 | 
				
			||||||
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,
 | 
					  This program and the accompanying materials are licensed and made available
 | 
				
			||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
					  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.
 | 
				
			||||||
**/
 | 
					**/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,7 +59,7 @@ Tcg2ConfigPeimEntryPoint (
 | 
				
			|||||||
  Status = Tpm2RequestUseTpm ();
 | 
					  Status = Tpm2RequestUseTpm ();
 | 
				
			||||||
  if (!EFI_ERROR (Status)) {
 | 
					  if (!EFI_ERROR (Status)) {
 | 
				
			||||||
    DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__));
 | 
					    DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__));
 | 
				
			||||||
      Size = sizeof(gEfiTpmDeviceInstanceTpm20DtpmGuid);
 | 
					    Size = sizeof (gEfiTpmDeviceInstanceTpm20DtpmGuid);
 | 
				
			||||||
    Status = PcdSetPtrS (
 | 
					    Status = PcdSetPtrS (
 | 
				
			||||||
               PcdTpmInstanceGuid,
 | 
					               PcdTpmInstanceGuid,
 | 
				
			||||||
               &Size,
 | 
					               &Size,
 | 
				
			||||||
@@ -65,11 +68,13 @@ Tcg2ConfigPeimEntryPoint (
 | 
				
			|||||||
    ASSERT_EFI_ERROR (Status);
 | 
					    ASSERT_EFI_ERROR (Status);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__));
 | 
					    DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__));
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
    // If no TPM2 was detected, we still need to install
 | 
					    // If no TPM2 was detected, we still need to install
 | 
				
			||||||
      // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon
 | 
					    // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon seeing
 | 
				
			||||||
      // seeing the default (all-bits-zero) contents of
 | 
					    // the default (all-bits-zero) contents of PcdTpmInstanceGuid, thus we have
 | 
				
			||||||
      // PcdTpmInstanceGuid, thus we have to install the PPI in its place,
 | 
					    // to install the PPI in its place, in order to unblock any dependent
 | 
				
			||||||
      // in order to unblock any dependent PEIMs.
 | 
					    // PEIMs.
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
    Status = PeiServicesInstallPpi (&mTpmInitializationDonePpiList);
 | 
					    Status = PeiServicesInstallPpi (&mTpmInitializationDonePpiList);
 | 
				
			||||||
    ASSERT_EFI_ERROR (Status);
 | 
					    ASSERT_EFI_ERROR (Status);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user