]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Clean up source files
authorLiming Gao <liming.gao@intel.com>
Wed, 27 Jun 2018 13:13:09 +0000 (21:13 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 28 Jun 2018 03:19:50 +0000 (11:19 +0800)
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
224 files changed:
SecurityPkg/Hash2DxeCrypto/Driver.c
SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.c
SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf
SecurityPkg/Include/Guid/MeasuredFvHob.h
SecurityPkg/Include/Guid/PhysicalPresenceData.h
SecurityPkg/Include/Guid/PwdCredentialProviderHii.h
SecurityPkg/Include/Guid/SecureBootConfigHii.h
SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h
SecurityPkg/Include/Guid/Tcg2ConfigHii.h
SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h
SecurityPkg/Include/Guid/TcgConfigHii.h
SecurityPkg/Include/Guid/TcgEventHob.h
SecurityPkg/Include/Guid/UsbCredentialProviderHii.h
SecurityPkg/Include/Guid/UserIdentifyManagerHii.h
SecurityPkg/Include/Guid/UserProfileManagerHii.h
SecurityPkg/Include/Library/PlatformSecureLib.h
SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
SecurityPkg/Include/Library/Tcg2PpVendorLib.h
SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h
SecurityPkg/Include/Library/TcgPpVendorLib.h
SecurityPkg/Include/Library/TcgStorageCoreLib.h
SecurityPkg/Include/Library/Tpm12CommandLib.h
SecurityPkg/Include/Library/Tpm12DeviceLib.h
SecurityPkg/Include/Library/Tpm2CommandLib.h
SecurityPkg/Include/Library/Tpm2DeviceLib.h
SecurityPkg/Include/Library/TpmCommLib.h
SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h
SecurityPkg/Include/Ppi/LockPhysicalPresence.h
SecurityPkg/Include/Ppi/TpmInitialized.h
SecurityPkg/Library/AuthVariableLib/AuthService.c
SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h
SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.c
SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.h
SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.inf
SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.c
SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf
SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.uni
SecurityPkg/Library/DxeImageVerificationLib/Measurement.c
SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.c
SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf
SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.uni
SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c
SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf
SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.uni
SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/PhysicalPresenceStrings.uni
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.uni
SecurityPkg/Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni
SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf
SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.uni
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.c
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf
SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.uni
SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.c
SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.c
SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.c
SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.c
SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.c
SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c
SecurityPkg/Library/HashLibTpm2/HashLibTpm2.inf
SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.c
SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.inf
SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.uni
SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.c
SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.inf
SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.uni
SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf
SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.uni
SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c
SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf
SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.c
SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf
SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c
SecurityPkg/Library/Tpm12CommandLib/Tpm12Ownership.c
SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c
SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.c
SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Context.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2EnhancedAuthorization.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c
SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf
SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf
SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c
SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf
SecurityPkg/Library/TpmCommLib/CommonHeader.h
SecurityPkg/Library/TpmCommLib/TisPc.c
SecurityPkg/Library/TpmCommLib/TpmComm.c
SecurityPkg/Library/TpmCommLib/TpmCommLib.inf
SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.uni
SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxeExtra.uni
SecurityPkg/RandomNumberGenerator/RngDxe/AesCore.c
SecurityPkg/RandomNumberGenerator/RngDxe/RdRand.c
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.uni
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeExtra.uni
SecurityPkg/SecurityPkg.dec
SecurityPkg/SecurityPkg.uni
SecurityPkg/SecurityPkgExtra.uni
SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.c
SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.h
SecurityPkg/Tcg/MemoryOverwriteControl/TcgMorExtra.uni
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.h
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockExtra.uni
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.c
SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf
SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePeiExtra.uni
SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxeExtra.uni
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeiExtra.uni
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni
SecurityPkg/Tcg/Tcg2Config/TpmDetection.c
SecurityPkg/Tcg/Tcg2Dxe/MeasureBootPeCoff.c
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.uni
SecurityPkg/Tcg/Tcg2Dxe/Tcg2DxeExtra.uni
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
SecurityPkg/Tcg/Tcg2Pei/Tcg2PeiExtra.uni
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.uni
SecurityPkg/Tcg/Tcg2Smm/Tcg2SmmExtra.uni
SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxeExtra.uni
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.h
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigNvData.h
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigStrings.uni
SecurityPkg/Tcg/TcgDxe/TcgDxe.c
SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
SecurityPkg/Tcg/TcgDxe/TcgDxeExtra.uni
SecurityPkg/Tcg/TcgPei/TcgPei.c
SecurityPkg/Tcg/TcgPei/TcgPei.inf
SecurityPkg/Tcg/TcgPei/TcgPeiExtra.uni
SecurityPkg/Tcg/TcgSmm/TcgSmm.c
SecurityPkg/Tcg/TcgSmm/TcgSmm.h
SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
SecurityPkg/Tcg/TcgSmm/TcgSmm.uni
SecurityPkg/Tcg/TcgSmm/TcgSmmExtra.uni
SecurityPkg/Tcg/TcgSmm/Tpm.asl
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.c
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProvider.h
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderData.h
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderDxe.inf
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderExtra.uni
SecurityPkg/UserIdentification/PwdCredentialProviderDxe/PwdCredentialProviderStrings.uni
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.c
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProvider.h
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderDxe.inf
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderExtra.uni
SecurityPkg/UserIdentification/UsbCredentialProviderDxe/UsbCredentialProviderStrings.uni
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/LoadDeferredImage.c
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.h
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerExtra.uni
SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerStrings.uni
SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyAccessPolicy.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyIdentityPolicy.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileAdd.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileDelete.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.h
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerData.h
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerDxe.inf
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerExtra.uni
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManagerStrings.uni
SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileModify.c
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/AuthService.c
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/AuthService.h
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSal.inf
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/EsalVariableDxeSalExtra.uni
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/InitVariable.c
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Reclaim.c
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.c
SecurityPkg/VariableAuthenticated/EsalVariableDxeSal/Variable.h
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxeExtra.uni
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigMisc.c
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigStrings.uni

index d63ca2c2091a2c3443b0dc05c7cdc176d661802f..ed44d7f23d7276f000d134b11cc7d1719d4ee9f7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This is service binding for Hash driver.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -239,4 +239,4 @@ Hash2DriverEntryPoint (
   }\r
 \r
   return Status;\r
-}
\ No newline at end of file
+}\r
index 93e32739164d1165d3112b21a3b774211b93f51c..476cc3f9649374cdebf115e05572ccc2fc2fed74 100644 (file)
@@ -2,7 +2,7 @@
   This module implements Hash2 Protocol.\r
 \r
 (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -374,7 +374,7 @@ BaseCrypto2Hash (
   if (HashInfo == NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   Instance = HASH2_INSTANCE_DATA_FROM_THIS(This);\r
   if (Instance->HashContext != NULL) {\r
     FreePool (Instance->HashContext);\r
index 557dedbbeadfc673013fdc3ab358c3d1dcf42708..ffc0efc4d84d1f2c84f668c21c1e1ce643080fa5 100644 (file)
@@ -4,7 +4,7 @@
 #  This module will use EDKII crypto libary to HASH2 protocol.\r
 #\r
 #  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
-#  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution. The full text of the license may be found at\r
@@ -61,4 +61,4 @@
   gEfiHash2ServiceBindingProtocolGuid   ## PRODUCES\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
-  Hash2DxeCryptoExtra.uni
\ No newline at end of file
+  Hash2DxeCryptoExtra.uni\r
index a2e69223353ef9f525f0ccd3e91b732d0e3ba6e1..4e43c75feeef65d29a1d53d7a0acb9a0b3e81c65 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  Defines the HOB GUID used to pass all PEI measured FV info to \r
+  Defines the HOB GUID used to pass all PEI measured FV info to\r
   DXE Driver.\r
-    \r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 165b4647c0e4c1bb8737cbb62fad7964f3b3760c..3190da3982e52d23493b93d6cd2ec96a3eb26c7f 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
   Define the variable data structures used for TCG physical presence.\r
   The TPM request from firmware or OS is saved to variable. And it is\r
-  cleared after it is processed in the next boot cycle. The TPM response \r
+  cleared after it is processed in the next boot cycle. The TPM response\r
   is saved to variable.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -38,7 +38,7 @@ typedef struct {
 #define PHYSICAL_PRESENCE_ENABLE                                  1\r
 #define PHYSICAL_PRESENCE_DISABLE                                 2\r
 #define PHYSICAL_PRESENCE_ACTIVATE                                3\r
-#define PHYSICAL_PRESENCE_DEACTIVATE                              4 \r
+#define PHYSICAL_PRESENCE_DEACTIVATE                              4\r
 #define PHYSICAL_PRESENCE_CLEAR                                   5\r
 #define PHYSICAL_PRESENCE_ENABLE_ACTIVATE                         6\r
 #define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE                      7\r
@@ -60,7 +60,7 @@ typedef struct {
 \r
 //\r
 // This variable is used to save TPM Management Flags and corresponding operations.\r
-// It should be protected from malicious software (e.g. Set it as read-only variable). \r
+// It should be protected from malicious software (e.g. Set it as read-only variable).\r
 //\r
 #define PHYSICAL_PRESENCE_FLAGS_VARIABLE  L"PhysicalPresenceFlags"\r
 typedef struct {\r
index 007144abfd1590bbf32235068fb8d6a1b1a8593f..0b203e536fd754050083d43ed0b58a3dd68d9eea 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUID used as HII FormSet and HII Package list GUID in PwdCredentialProviderDxe driver.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 5f162486f43e7f15b688acb4a15342e258028417..70c2f471addbbb29a68185fd43d2c7d4755767d8 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
-  GUIDs used as HII FormSet and HII Package list GUID in SecureBootConfigDxe driver. \r
-  \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+  GUIDs used as HII FormSet and HII Package list GUID in SecureBootConfigDxe driver.\r
+\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index b1b7666f18815c5f4579a258723e7a7c70840b45..f8fd905ef0563498a8be93eb64d85f424234ffd8 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUID for SecurityPkg PCD Token Space.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 28e31e3475bc6ad10aeeff91e7abc0fd7ea2cc85..67b770b334286319a64012447c35c7ece0bf6766 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
-  GUIDs used as HII FormSet and HII Package list GUID in Tcg2Config driver. \r
-  \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+  GUIDs used as HII FormSet and HII Package list GUID in Tcg2Config driver.\r
+\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index df43fd9c80ba12a551b273b93a4d6d5c1f851bf1..5215983928b04d71c43843569953f870c608a9a7 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
   Define the variable data structures used for TCG2 physical presence.\r
   The TPM2 request from firmware or OS is saved to variable. And it is\r
-  cleared after it is processed in the next boot cycle. The TPM2 response \r
+  cleared after it is processed in the next boot cycle. The TPM2 response\r
   is saved to variable.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -34,7 +34,7 @@ typedef struct {
 \r
 //\r
 // This variable is used to save TCG2 Management Flags and corresponding operations.\r
-// It should be protected from malicious software (e.g. Set it as read-only variable). \r
+// It should be protected from malicious software (e.g. Set it as read-only variable).\r
 //\r
 #define TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE  L"Tcg2PhysicalPresenceFlags"\r
 typedef struct {\r
index d316299f8fb3ba6618dc41991e86677b0558aed1..c56dc169a193928ecf45067a58ca13d636994905 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
-  GUIDs used as HII FormSet and HII Package list GUID in TcgConfig driver. \r
-  \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+  GUIDs used as HII FormSet and HII Package list GUID in TcgConfig driver.\r
+\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
+http://opensource.org/licenses/bsd-license.php.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 943a7c601c32ac9c02bcfc22947c90a7b51e5355..2f79d94b6b89e00e66001f65ccdcbc07ee8912c4 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  Defines the HOB GUID used to pass a TCG_PCR_EVENT or TCG_PCR_EVENT2 from a TPM PEIM to \r
-  a TPM DXE Driver. A GUIDed HOB is generated for each measurement \r
+  Defines the HOB GUID used to pass a TCG_PCR_EVENT or TCG_PCR_EVENT2 from a TPM PEIM to\r
+  a TPM DXE Driver. A GUIDed HOB is generated for each measurement\r
   made in the PEI Phase.\r
-    \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 217aef656727198fb2e65b03ac98676d58ea356d..059d68f32e106647cfdbaa566f0dff3cd2502148 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUID used as HII Package list GUID in UsbCredentialProviderDxe driver.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 11d215c5dd9e5c1cad786ef01048e7472f29e305..323c51f0f69bb4a3e0f609464a1bb406c41ac5bf 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUID used as HII FormSet and HII Package list GUID in UserIdentifyManagerDxe driver.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index e53e5a13e62aece6e7b19234329dfa8cc22c7d53..105059350c6526cf49b212c282ee3471dc4ec315 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   GUID used as HII FormSet and HII Package list GUID in UserProfileManagerDxe driver.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -22,4 +22,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 extern EFI_GUID gUserProfileManagerGuid;\r
 \r
-#endif
\ No newline at end of file
+#endif\r
index 6a4cb147a6bce836016dd26022e48790b05dbc55..d645376917cbdc6986b7f4a904b08827d79abde9 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Provides a secure platform-specific method to detect physically present user.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
 \r
   This function provides a platform-specific method to detect whether the platform\r
-  is operating by a physically present user. \r
+  is operating by a physically present user.\r
 \r
   Programmatic changing of platform security policy (such as disable Secure Boot,\r
   or switch between Standard/Custom Secure Boot mode) MUST NOT be possible during\r
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   NOTE THAT: This function cannot depend on any EFI Variable Service since they are\r
   not available when this function is called in AuthenticateVariable driver.\r
-  \r
+\r
   @retval  TRUE       The platform is operated by a physically present user.\r
   @retval  FALSE      The platform is NOT operated by a physically present user.\r
 \r
index 3e446acab2213c881230404f3303fb25869d6c79..e08719003deaf6c7027540f565dec42b41cc7f16 100644 (file)
@@ -2,13 +2,13 @@
   This library is intended to be used by BDS modules.\r
   This library will execute TPM2 request.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -62,13 +62,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Check and execute the pending TPM request.\r
 \r
-  The TPM request may come from OS or BIOS. This API will display request information and wait \r
+  The TPM request may come from OS or BIOS. This API will display request information and wait\r
   for user confirmation if TPM request exists. The TPM request will be sent to TPM device after\r
-  the TPM request is confirmed, and one or more reset may be required to make TPM request to \r
+  the TPM request is confirmed, and one or more reset may be required to make TPM request to\r
   take effect.\r
-  \r
+\r
   This API should be invoked after console in and console out are all ready as they are required\r
-  to display request information and get user input to confirm the request.  \r
+  to display request information and get user input to confirm the request.\r
 \r
   @param  PlatformAuth                   platform auth value. NULL means no platform auth change.\r
 **/\r
@@ -83,7 +83,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
 \r
   The TPM request may come from OS. This API will check if TPM request exists and need user\r
   input to confirmation.\r
-  \r
+\r
   @retval    TRUE        TPM needs input to confirm user physical presence.\r
   @retval    FALSE       TPM doesn't need input to confirm user physical presence.\r
 \r
@@ -173,7 +173,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   @param[in]      OperationRequest TPM physical presence operation request.\r
 \r
   @return Return Code for Get User Confirmation Status for Operation.\r
index 5ae7413273a0957b68ecbb0f630667e160777739..6bc5beda3ad67a892be02d7fe7138b4a5bdd9fc7 100644 (file)
@@ -4,16 +4,16 @@
 \r
   The Vendor Specific PPI operation may change TPM state, BIOS TPM management\r
   flags, and may need additional boot cycle.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -29,9 +29,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Check and execute the requested physical presence command.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      PlatformAuth     platform auth value. NULL means no platform auth change.\r
@@ -56,7 +56,7 @@ Tcg2PpVendorLibExecutePendingRequest (
   Check if there is a valid physical presence command request.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
   If OperationRequest < 128, then ASSERT().\r
@@ -86,7 +86,7 @@ Tcg2PpVendorLibHasValidRequest (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -111,7 +111,7 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
index b451823bdf98c0a730bdc15e5802c401b6630d65..f6f1d50f806ce4639838600c1af05d193527434c 100644 (file)
@@ -2,13 +2,13 @@
   This library is intended to be used by BDS modules.\r
   This library will lock TPM after executing TPM request.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,15 +19,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Check and execute the pending TPM request and Lock TPM.\r
 \r
-  The TPM request may come from OS or BIOS. This API will display request information and wait \r
+  The TPM request may come from OS or BIOS. This API will display request information and wait\r
   for user confirmation if TPM request exists. The TPM request will be sent to TPM device after\r
-  the TPM request is confirmed, and one or more reset may be required to make TPM request to \r
+  the TPM request is confirmed, and one or more reset may be required to make TPM request to\r
   take effect. At last, it will lock TPM to prevent TPM state change by malware.\r
-  \r
+\r
   This API should be invoked after console in and console out are all ready as they are required\r
-  to display request information and get user input to confirm the request. This API should also \r
+  to display request information and get user input to confirm the request. This API should also\r
   be invoked as early as possible as TPM is locked in this function.\r
-  \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -40,7 +40,7 @@ TcgPhysicalPresenceLibProcessRequest (
 \r
   The TPM request may come from OS. This API will check if TPM request exists and need user\r
   input to confirmation.\r
-  \r
+\r
   @retval    TRUE        TPM needs input to confirm user physical presence.\r
   @retval    FALSE       TPM doesn't need input to confirm user physical presence.\r
 \r
index 284aa9ed722d1771c8905a75090906879f715c63..26c7ef90244bf4b2ef7f57654a6b6728c5c7de29 100644 (file)
@@ -4,16 +4,16 @@
 \r
   The Vendor Specific PPI operation may change TPM state, BIOS TPM management\r
   flags, and may need additional boot cycle.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -63,9 +63,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Check and execute the requested physical presence command.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -88,7 +88,7 @@ TcgPpVendorLibExecutePendingRequest (
   Check if there is a valid physical presence command request.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
   If OperationRequest < 128, then ASSERT().\r
@@ -118,7 +118,7 @@ TcgPpVendorLibHasValidRequest (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -141,7 +141,7 @@ TcgPpVendorLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
index 6e178c968f608735b5ba7096d66f5bc26ac73edb..b2a0ef8f0ce09997121e872ca032fc930d644088 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
   Public API for the Tcg Core library to perform the lowest level TCG Data encoding.\r
-  \r
+\r
   (TCG Storage Architecture Core Specification, Version 2.01, Revision 1.00,\r
   https://trustedcomputinggroup.org/tcg-storage-architecture-core-specification/)\r
 \r
index f7c098f28341f6d52aaa7d0fb6c54076dbf0ebd7..6695a0c94bfc698641aee6a3db8a0ec85e3dbe80 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is used by other modules to send TPM12 command.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -84,7 +84,7 @@ typedef struct {
 \r
 /**\r
   Send NV DefineSpace command to TPM1.2.\r
-  \r
+\r
   @param PubInfo           The public parameters of the NV area.\r
   @param EncAuth           The encrypted AuthData, only valid if the attributes require subsequent authorization.\r
 \r
@@ -100,7 +100,7 @@ Tpm12NvDefineSpace (
 \r
 /**\r
   Send NV ReadValue command to TPM1.2.\r
-  \r
+\r
   @param NvIndex           The index of the area to set.\r
   @param Offset            The offset into the area.\r
   @param DataSize          The size of the data area.\r
@@ -120,7 +120,7 @@ Tpm12NvReadValue (
 \r
 /**\r
   Send NV WriteValue command to TPM1.2.\r
-  \r
+\r
   @param NvIndex           The index of the area to set.\r
   @param Offset            The offset into the NV Area.\r
   @param DataSize          The size of the data parameter.\r
index ab1f522ad057a3aa75cae31baca79066a0d09b55..8c39764e4e221ec230c6aed883505bc3ca485637 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library abstract how to access TPM12 hardware device.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 80ada7397b0d48e6968c855038f77a5c64530b91..32096b175b4f0c269fea4f38169d07c435f76d77 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is used by other modules to send TPM2 command.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -25,7 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param[in]  HashAlg           The hash algorithm to use for the hash sequence\r
                                 An Event sequence starts if this is TPM_ALG_NULL.\r
   @param[out] SequenceHandle    A handle to reference the sequence\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -43,7 +43,7 @@ Tpm2HashSequenceStart (
 \r
   @param[in] SequenceHandle    Handle for the sequence object\r
   @param[in] Buffer            Data to be added to hash\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -64,7 +64,7 @@ Tpm2SequenceUpdate (
   @param[in]  SequenceHandle    Authorization for the sequence\r
   @param[in]  Buffer            Data to be added to the Event\r
   @param[out] Results           List of digests computed for the PCR\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -83,7 +83,7 @@ Tpm2EventSequenceComplete (
   @param[in]  SequenceHandle    Authorization for the sequence\r
   @param[in]  Buffer            Data to be added to the hash/HMAC\r
   @param[out] Result            The returned HMAC or digest in a sized buffer\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -166,7 +166,7 @@ Tpm2SetPrimaryPolicy (
 \r
   @param[in] AuthHandle        TPM_RH_LOCKOUT or TPM_RH_PLATFORM+{PP}\r
   @param[in] AuthSession       Auth Session context\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -316,7 +316,7 @@ Tpm2DictionaryAttackParameters (
   @param[in]  NvIndex            The NV Index.\r
   @param[out] NvPublic           The public area of the index.\r
   @param[out] NvName             The Name of the nvIndex.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -337,7 +337,7 @@ Tpm2NvReadPublic (
   @param[in]  AuthSession        Auth Session context\r
   @param[in]  Auth               The authorization data.\r
   @param[in]  NvPublic           The public area of the index.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_ALREADY_STARTED    The command was returned successfully, but NvIndex is already defined.\r
@@ -357,7 +357,7 @@ Tpm2NvDefineSpace (
   @param[in]  AuthHandle         TPM_RH_OWNER or TPM_RH_PLATFORM+{PP}.\r
   @param[in]  NvIndex            The NV Index.\r
   @param[in]  AuthSession        Auth Session context\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -379,7 +379,7 @@ Tpm2NvUndefineSpace (
   @param[in]     Size               Number of bytes to read.\r
   @param[in]     Offset             Byte offset into the area.\r
   @param[in,out] OutData            The data read.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -403,7 +403,7 @@ Tpm2NvRead (
   @param[in]  AuthSession        Auth Session context\r
   @param[in]  InData             The data to write.\r
   @param[in]  Offset             The offset into the NV Area.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -521,7 +521,7 @@ Tpm2PcrEvent (
   @param[out] PcrUpdateCounter   The current value of the PCR update counter.\r
   @param[out] PcrSelectionOut    The PCR in the returned list.\r
   @param[out] PcrValues          The contents of the PCR indicated in pcrSelect.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -544,7 +544,7 @@ Tpm2PcrRead (
   @param[out] MaxPCR             maximum number of PCR that may be in a bank\r
   @param[out] SizeNeeded         number of octets required to satisfy the request\r
   @param[out] SizeAvailable      Number of octets available. Computed before the allocation\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -580,25 +580,25 @@ Tpm2PcrAllocateBanks (
 /**\r
   This command returns various information regarding the TPM and its current state.\r
 \r
-  The capability parameter determines the category of data returned. The property parameter \r
-  selects the first value of the selected category to be returned. If there is no property \r
+  The capability parameter determines the category of data returned. The property parameter\r
+  selects the first value of the selected category to be returned. If there is no property\r
   that corresponds to the value of property, the next higher value is returned, if it exists.\r
-  The moreData parameter will have a value of YES if there are more values of the requested \r
+  The moreData parameter will have a value of YES if there are more values of the requested\r
   type that were not returned.\r
-  If no next capability exists, the TPM will return a zero-length list and moreData will have \r
+  If no next capability exists, the TPM will return a zero-length list and moreData will have\r
   a value of NO.\r
 \r
-  NOTE: \r
-  To simplify this function, leave returned CapabilityData for caller to unpack since there are \r
+  NOTE:\r
+  To simplify this function, leave returned CapabilityData for caller to unpack since there are\r
   many capability categories and only few categories will be used in firmware. It means the caller\r
   need swap the byte order for the feilds in CapabilityData.\r
 \r
   @param[in]  Capability         Group selection; determines the format of the response.\r
-  @param[in]  Property           Further definition of information. \r
+  @param[in]  Property           Further definition of information.\r
   @param[in]  PropertyCount      Number of properties of the indicated type to return.\r
   @param[out] MoreData           Flag to indicate if there are more values of this type.\r
   @param[out] CapabilityData     The capability data.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -618,7 +618,7 @@ Tpm2GetCapability (
   This function parse the value got from TPM2_GetCapability and return the Family.\r
 \r
   @param[out] Family             The Family of TPM. (a 4-octet character string)\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -634,7 +634,7 @@ Tpm2GetCapabilityFamily (
   This function parse the value got from TPM2_GetCapability and return the TPM manufacture ID.\r
 \r
   @param[out] ManufactureId      The manufacture ID of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -651,7 +651,7 @@ Tpm2GetCapabilityManufactureID (
 \r
   @param[out] FirmwareVersion1   The FirmwareVersion1.\r
   @param[out] FirmwareVersion2   The FirmwareVersion2.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -669,7 +669,7 @@ Tpm2GetCapabilityFirmwareVersion (
 \r
   @param[out] MaxCommandSize     The maximum value for commandSize in a command.\r
   @param[out] MaxResponseSize    The maximum value for responseSize in a command.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -682,12 +682,12 @@ Tpm2GetCapabilityMaxCommandResponseSize (
 \r
 /**\r
   This command returns Returns a list of TPMS_ALG_PROPERTIES. Each entry is an\r
-  algorithm ID and a set of properties of the algorithm. \r
+  algorithm ID and a set of properties of the algorithm.\r
 \r
   This function parse the value got from TPM2_GetCapability and return the list.\r
 \r
   @param[out] AlgList      List of algorithm.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -703,7 +703,7 @@ Tpm2GetCapabilitySupportedAlg (
   This function parse the value got from TPM2_GetCapability and return the LockoutCounter.\r
 \r
   @param[out] LockoutCounter     The LockoutCounter of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -719,7 +719,7 @@ Tpm2GetCapabilityLockoutCounter (
   This function parse the value got from TPM2_GetCapability and return the LockoutInterval.\r
 \r
   @param[out] LockoutInterval    The LockoutInterval of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -736,7 +736,7 @@ Tpm2GetCapabilityLockoutInterval (
 \r
   @param[out] InputBufferSize    The InputBufferSize of TPM.\r
                                  the maximum size of a parameter (typically, a TPM2B_MAX_BUFFER)\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -752,7 +752,7 @@ Tpm2GetCapabilityInputBufferSize (
   This function parse the value got from TPM2_GetCapability and return the PcrSelection.\r
 \r
   @param[out] Pcrs    The Pcr Selection\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -786,7 +786,7 @@ Tpm2GetCapabilitySupportedAndActivePcrs(
   This function parse the value got from TPM2_GetCapability and return the AlgorithmSet.\r
 \r
   @param[out] AlgorithmSet    The AlgorithmSet of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -843,7 +843,7 @@ Tpm2SetAlgorithmSet (
   @param[in]  AuthHash           Hash algorithm to use for the session.\r
   @param[out] SessionHandle      Handle for the newly created session.\r
   @param[out] NonceTPM           The initial nonce from the TPM, used in the computation of the sessionKey.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -865,7 +865,7 @@ Tpm2StartAuthSession (
   This command causes all context associated with a loaded object or session to be removed from TPM memory.\r
 \r
   @param[in]  FlushHandle        The handle of the item to flush.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -879,7 +879,7 @@ Tpm2FlushContext (
   This command includes a secret-based authorization to a policy.\r
   The caller proves knowledge of the secret value using an authorization\r
   session using the authValue associated with authHandle.\r
-  \r
+\r
   @param[in]  AuthHandle         Handle for an entity providing the authorization\r
   @param[in]  PolicySession      Handle for the policy session being extended.\r
   @param[in]  AuthSession        Auth Session context\r
@@ -889,7 +889,7 @@ Tpm2FlushContext (
   @param[in]  Expiration         Time when authorization will expire, measured in seconds from the time that nonceTPM was generated.\r
   @param[out] Timeout            Time value used to indicate to the TPM when the ticket expires.\r
   @param[out] PolicyTicket       A ticket that includes a value indicating when the authorization expires.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -915,7 +915,7 @@ Tpm2PolicySecret (
 \r
   @param[in] PolicySession      Handle for the policy session being extended.\r
   @param[in] HashList           the list of hashes to check for a match.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -931,7 +931,7 @@ Tpm2PolicyOR (
 \r
   @param[in]  PolicySession      Handle for the policy session being extended.\r
   @param[in]  Code               The allowed commandCode.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -948,7 +948,7 @@ Tpm2PolicyCommandCode (
 \r
   @param[in]  PolicySession      Handle for the policy session.\r
   @param[out] PolicyHash         the current value of the policyHash of policySession.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
index f072a2492549aa6590a9e5c2070642fa8f64e352..8002da57e47c057fd1f43225cc84002416bd1e53 100644 (file)
@@ -37,7 +37,7 @@ typedef enum {
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -71,7 +71,7 @@ Tpm2RequestUseTpm (
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 typedef\r
 EFI_STATUS\r
index 6c97569c67a4ba09948da865dcd1a5b5a7cfb1df..bdb15fd3f602197e90f3bb27996b2b1c237194c2 100644 (file)
@@ -2,13 +2,13 @@
   This library is only intended to be used by TPM modules.\r
   It provides basic TPM Interface Specification (TIS) and Command functions.\r
 \r
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -161,7 +161,7 @@ typedef TIS_PC_REGISTERS  *TIS_PC_REGISTERS_PTR;
 #define TIS_PC_ACC_ESTABLISH        BIT0\r
 \r
 ///\r
-/// When this bit is 1, TPM is in the Ready state, \r
+/// When this bit is 1, TPM is in the Ready state,\r
 /// indicating it is ready to receive a new command.\r
 ///\r
 #define TIS_PC_STS_READY            BIT6\r
@@ -210,13 +210,13 @@ EFI_STATUS
 EFIAPI\r
 TisPcWaitRegisterBits (\r
   IN UINT8   *Register,\r
-  IN UINT8   BitSet,   \r
-  IN UINT8   BitClear, \r
-  IN UINT32  TimeOut   \r
+  IN UINT8   BitSet,\r
+  IN UINT8   BitClear,\r
+  IN UINT32  TimeOut\r
   );\r
 \r
 /**\r
-  Get BurstCount by reading the burstCount field of a TIS regiger \r
+  Get BurstCount by reading the burstCount field of a TIS regiger\r
   in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in]  TisReg                Pointer to TIS register.\r
@@ -234,7 +234,7 @@ TisPcReadBurstCount (
   );\r
 \r
 /**\r
-  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY \r
+  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY\r
   to Status Register in time.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -250,7 +250,7 @@ TisPcPrepareCommand (
   );\r
 \r
 /**\r
-  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE \r
+  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE\r
   to ACCESS Register in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -273,7 +273,7 @@ TisPcRequestUseTpm (
   @param[in]  Data          Raw data to be digested.\r
   @param[in]  DataLen       Size of the raw data.\r
   @param[out] Digest        Pointer to a buffer that stores the final digest.\r
-  \r
+\r
   @retval     EFI_SUCCESS   Always successfully calculate the final digest.\r
 **/\r
 EFI_STATUS\r
index d99fc1db3842be0c8d323b813ab9b8b4bc793a49..6ff018d251d76661353fa9b437d959aa088ed726 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   This PPI means a FV does not need to be extended to PCR by TCG modules.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 0ae3b7b0ab4f264acf82474742d98748398a17a6..5afdd389ec3c137305c8a315ce1d76336b9808da 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  This file defines the lock physical Presence PPI. This PPI is \r
-  produced by a platform specific PEIM and consumed by the TPM \r
+  This file defines the lock physical Presence PPI. This PPI is\r
+  produced by a platform specific PEIM and consumed by the TPM\r
   PEIM.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define __PEI_LOCK_PHYSICAL_PRESENCE_H__\r
 \r
 ///\r
-/// Global ID for the PEI_LOCK_PHYSICAL_PRESENCE_PPI_GUID.  \r
+/// Global ID for the PEI_LOCK_PHYSICAL_PRESENCE_PPI_GUID.\r
 ///\r
 #define PEI_LOCK_PHYSICAL_PRESENCE_PPI_GUID  \\r
   { \\r
@@ -46,9 +46,9 @@ BOOLEAN
 );\r
 \r
 ///\r
-/// This service abstracts TPM physical presence lock interface. It is necessary for  \r
-/// safety to convey this information to the TPM driver so that TPM physical presence  \r
-/// can be locked as early as possible. This PPI is produced by a platform specific \r
+/// This service abstracts TPM physical presence lock interface. It is necessary for\r
+/// safety to convey this information to the TPM driver so that TPM physical presence\r
+/// can be locked as early as possible. This PPI is produced by a platform specific\r
 /// PEIM and consumed by the TPM PEIM.\r
 ///\r
 struct _PEI_LOCK_PHYSICAL_PRESENCE_PPI {\r
@@ -57,4 +57,4 @@ struct _PEI_LOCK_PHYSICAL_PRESENCE_PPI {
 \r
 extern EFI_GUID  gPeiLockPhysicalPresencePpiGuid;\r
 \r
-#endif  //  __PEI_LOCK_PHYSICAL_PRESENCE_H__
\ No newline at end of file
+#endif  //  __PEI_LOCK_PHYSICAL_PRESENCE_H__\r
index 7d458f5e1284b76c5adfe32da4708e29f2d86c57..fa13f956c12ffc423864dcba71446fdf1902cf82 100644 (file)
@@ -2,14 +2,14 @@
   Tag GUID that must be installed by the TPM PEIM after the TPM hardware is\r
   initialized.  PEIMs that must execute after TPM hardware initialization\r
   may use this GUID in their dependency expressions.\r
-    \r
-Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _PEI_TPM_INITIALIZED_PPI_H_\r
 \r
 ///\r
-/// Global ID for the PEI_TPM_INITIALIZED_PPI which always uses a NULL interface. \r
+/// Global ID for the PEI_TPM_INITIALIZED_PPI which always uses a NULL interface.\r
 ///\r
 #define PEI_TPM_INITIALIZED_PPI_GUID \\r
   { \\r
@@ -28,7 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 extern EFI_GUID gPeiTpmInitializedPpiGuid;\r
 \r
 ///\r
-/// Global ID for the PEI_TPM_INITIALIZATION_DONE_PPI which always uses a NULL interface. \r
+/// Global ID for the PEI_TPM_INITIALIZATION_DONE_PPI which always uses a NULL interface.\r
 ///\r
 #define PEI_TPM_INITIALIZATION_DONE_PPI_GUID \\r
   { \\r
index 213a524f271c797104ad5ae3b03ea0a56ab16129..05d75a1ee3b393da086206b4ce89ce2b81fec2d8 100644 (file)
@@ -18,7 +18,7 @@
   They will do basic validation for authentication data structure, then call crypto library\r
   to verify the signature.\r
 \r
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1303,7 +1303,7 @@ GetCertsFromDb (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  \r
+\r
   if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {\r
     //\r
     // Get variable "certdb".\r
@@ -1355,7 +1355,7 @@ GetCertsFromDb (
 \r
 /**\r
   Delete matching signer's certificates when deleting common authenticated\r
-  variable by corresponding VariableName and VendorGuid from "certdb" or \r
+  variable by corresponding VariableName and VendorGuid from "certdb" or\r
   "certdbv" according to authenticated variable attributes.\r
 \r
   @param[in]  VariableName   Name of authenticated Variable.\r
@@ -1904,13 +1904,13 @@ VerifyTimeBasedPayload (
   //            digestAlgorithms DigestAlgorithmIdentifiers,\r
   //            contentInfo ContentInfo,\r
   //            .... }\r
-  //    The DigestAlgorithmIdentifiers can be used to determine the hash algorithm \r
+  //    The DigestAlgorithmIdentifiers can be used to determine the hash algorithm\r
   //    in VARIABLE_AUTHENTICATION_2 descriptor.\r
   //    This field has the fixed offset (+13) and be calculated based on two bytes of length encoding.\r
   //\r
   if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) {\r
     if (SigDataSize >= (13 + sizeof (mSha256OidValue))) {\r
-      if (((*(SigData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) || \r
+      if (((*(SigData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) ||\r
            (CompareMem (SigData + 13, &mSha256OidValue, sizeof (mSha256OidValue)) != 0)) {\r
           return EFI_SECURITY_VIOLATION;\r
         }\r
index 28862609258f7fc6cb4a5961bfb8b6acf06e67f5..1d495b08a3ae0878739c80ced401aa2676fd5c0a 100644 (file)
@@ -12,7 +12,7 @@
   may not be modified without authorization. If platform fails to protect these resources,\r
   the authentication service provided in this driver will be broken, and the behavior is undefined.\r
 \r
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -142,7 +142,7 @@ VerifyTimeBasedPayloadAndUpdate (
 \r
 /**\r
   Delete matching signer's certificates when deleting common authenticated\r
-  variable by corresponding VariableName and VendorGuid from "certdb" or \r
+  variable by corresponding VariableName and VendorGuid from "certdb" or\r
   "certdbv" according to authenticated variable attributes.\r
 \r
   @param[in]  VariableName   Name of authenticated Variable.\r
@@ -166,9 +166,9 @@ DeleteCertsFromDb (
   Clean up signer's certificates for common authenticated variable\r
   by corresponding VariableName and VendorGuid from "certdb".\r
   Sytem may break down during Timebased Variable update & certdb update,\r
-  make them inconsistent,  this function is called in AuthVariable Init to ensure \r
+  make them inconsistent,  this function is called in AuthVariable Init to ensure\r
   consistency\r
-  \r
+\r
   @retval  EFI_NOT_FOUND         Fail to find matching certs.\r
   @retval  EFI_SUCCESS           Find matching certs and output parameters.\r
 \r
index 02a87f90775459ecc58dae27f37686c086fdce09..41ad52563ed3f526347bca78a1706c815b779dd0 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Implement defer image load services for user identification in UEFI2.2.\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -33,9 +33,9 @@ EFI_DEFERRED_IMAGE_LOAD_PROTOCOL gDeferredImageLoad   = {
   Get the image type.\r
 \r
   @param[in]    File    This is a pointer to the device path of the file\r
-                        that is being dispatched. \r
+                        that is being dispatched.\r
 \r
-  @return       UINT32  Image Type             \r
+  @return       UINT32  Image Type\r
 \r
 **/\r
 UINT32\r
@@ -44,7 +44,7 @@ GetFileType (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  EFI_HANDLE                        DeviceHandle; \r
+  EFI_HANDLE                        DeviceHandle;\r
   EFI_DEVICE_PATH_PROTOCOL          *TempDevicePath;\r
   EFI_BLOCK_IO_PROTOCOL             *BlockIo;\r
 \r
@@ -110,7 +110,7 @@ GetFileType (
   }\r
 \r
   //\r
-  // File is not in a Firmware Volume or on a Block I/O device, so check to see if \r
+  // File is not in a Firmware Volume or on a Block I/O device, so check to see if\r
   // the device path supports the Simple File System Protocol.\r
   //\r
   DeviceHandle   = NULL;\r
@@ -129,12 +129,12 @@ GetFileType (
 \r
   //\r
   // File is not from an FV, Block I/O or Simple File System, so the only options\r
-  // left are a PCI Option ROM and a Load File Protocol such as a PXE Boot from a NIC.  \r
+  // left are a PCI Option ROM and a Load File Protocol such as a PXE Boot from a NIC.\r
   //\r
   TempDevicePath = (EFI_DEVICE_PATH_PROTOCOL *)File;\r
   while (!IsDevicePathEndType (TempDevicePath)) {\r
     switch (DevicePathType (TempDevicePath)) {\r
-    \r
+\r
     case MEDIA_DEVICE_PATH:\r
       if (DevicePathSubType (TempDevicePath) == MEDIA_RELATIVE_OFFSET_RANGE_DP) {\r
         return IMAGE_FROM_OPTION_ROM;\r
@@ -144,7 +144,7 @@ GetFileType (
     case MESSAGING_DEVICE_PATH:\r
       if (DevicePathSubType(TempDevicePath) == MSG_MAC_ADDR_DP) {\r
         return IMAGE_FROM_REMOVABLE_MEDIA;\r
-      } \r
+      }\r
       break;\r
 \r
     default:\r
@@ -152,7 +152,7 @@ GetFileType (
     }\r
     TempDevicePath = NextDevicePathNode (TempDevicePath);\r
   }\r
-  return IMAGE_UNKNOWN; \r
+  return IMAGE_UNKNOWN;\r
 }\r
 \r
 \r
@@ -191,7 +191,7 @@ GetAccessControl (
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Get current user access information.\r
   //\r
@@ -234,12 +234,12 @@ GetAccessControl (
     if (EFI_ERROR (Status)) {\r
       break;\r
     }\r
-    \r
+\r
     ASSERT (Info != NULL);\r
     if (Info->InfoType != EFI_USER_INFO_ACCESS_POLICY_RECORD) {\r
       continue;\r
     }\r
-    \r
+\r
     //\r
     // Get specified access information.\r
     //\r
@@ -256,7 +256,7 @@ GetAccessControl (
       CheckLen += Access->Size;\r
     }\r
   }\r
-  \r
+\r
   if (Info != NULL) {\r
     FreePool (Info);\r
   }\r
@@ -266,17 +266,17 @@ GetAccessControl (
 /**\r
   Get file name from device path.\r
 \r
-  The file name may contain one or more device path node. Save the file name in a \r
-  buffer if file name is found. The caller is responsible to free the buffer.  \r
-  \r
+  The file name may contain one or more device path node. Save the file name in a\r
+  buffer if file name is found. The caller is responsible to free the buffer.\r
+\r
   @param[in]  DevicePath     A pointer to a device path.\r
   @param[out] FileName       The callee allocated buffer to save the file name if file name is found.\r
   @param[out] FileNameOffset The offset of file name in device path if file name is found.\r
-  \r
+\r
   @retval     UINTN          The file name length. 0 means file name is not found.\r
 \r
 **/\r
-UINTN \r
+UINTN\r
 GetFileName (\r
   IN  CONST EFI_DEVICE_PATH_PROTOCOL          *DevicePath,\r
   OUT UINT8                                   **FileName,\r
@@ -342,26 +342,26 @@ GetFileName (
     FirstNodeChar = (CHAR16) ReadUnaligned16 ((UINT16 *)((UINT8 *)TmpDevicePath + sizeof (EFI_DEVICE_PATH_PROTOCOL)));\r
     NodeStr = (CHAR8 *)TmpDevicePath + sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
     NodeStrLength = DevicePathNodeLength (TmpDevicePath) - sizeof (EFI_DEVICE_PATH_PROTOCOL) - sizeof(CHAR16);\r
-    \r
+\r
     if ((FirstNodeChar == '\\') && (LastNodeChar == '\\')) {\r
       //\r
       // Skip separator "\" when there are two separators.\r
       //\r
       NodeStr += sizeof (CHAR16);\r
-      NodeStrLength -= sizeof (CHAR16);      \r
+      NodeStrLength -= sizeof (CHAR16);\r
     } else if ((FirstNodeChar != '\\') && (LastNodeChar != '\\')) {\r
       //\r
       // Add separator "\" when there is no separator.\r
       //\r
       WriteUnaligned16 ((UINT16 *)(*FileName + Length), '\\');\r
       Length += sizeof (CHAR16);\r
-    } \r
+    }\r
     CopyMem (*FileName + Length, NodeStr, NodeStrLength);\r
     Length += NodeStrLength;\r
-    \r
+\r
     LastNodeChar  = (CHAR16) ReadUnaligned16 ((UINT16 *) (NodeStr + NodeStrLength - sizeof(CHAR16)));\r
     TmpDevicePath = NextDevicePathNode (TmpDevicePath);\r
-  }    \r
+  }\r
 \r
   return Length;\r
 }\r
@@ -373,16 +373,16 @@ GetFileName (
 \r
   If DevicePath2 is identical with DevicePath1, or with DevicePath1's child device\r
   path, then TRUE returned. Otherwise, FALSE is returned.\r
-  \r
+\r
   If DevicePath1 is NULL, then ASSERT().\r
   If DevicePath2 is NULL, then ASSERT().\r
 \r
   @param[in]  DevicePath1   A pointer to a device path.\r
   @param[in]  DevicePath2   A pointer to a device path.\r
 \r
-  @retval     TRUE          Two device paths are identical , or DevicePath2 is \r
+  @retval     TRUE          Two device paths are identical , or DevicePath2 is\r
                             DevicePath1's child device path.\r
-  @retval     FALSE         Two device paths are not identical, and DevicePath2 \r
+  @retval     FALSE         Two device paths are not identical, and DevicePath2\r
                             is not DevicePath1's child device path.\r
 \r
 **/\r
@@ -410,9 +410,9 @@ CheckDevicePath (
   if (IsDevicePathEnd (DevicePath1)) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
-  // The file name may contain one or more device path node. \r
+  // The file name may contain one or more device path node.\r
   // To compare the file name, copy file name to a buffer and compare the buffer.\r
   //\r
   FileNameSize1 = GetFileName (DevicePath1, &FileName1, &FileNameOffset1);\r
@@ -422,7 +422,7 @@ CheckDevicePath (
       DevicePathEqual = FALSE;\r
       goto Done;\r
     }\r
-    if (CompareMem (DevicePath1, DevicePath2, FileNameOffset1) != 0) {      \r
+    if (CompareMem (DevicePath1, DevicePath2, FileNameOffset1) != 0) {\r
       DevicePathEqual = FALSE;\r
       goto Done;\r
     }\r
@@ -430,7 +430,7 @@ CheckDevicePath (
       DevicePathEqual = FALSE;\r
       goto Done;\r
     }\r
-    if (CompareMem (FileName1, FileName2, FileNameSize1) != 0) {      \r
+    if (CompareMem (FileName1, FileName2, FileNameSize1) != 0) {\r
       DevicePathEqual = FALSE;\r
       goto Done;\r
     }\r
@@ -449,9 +449,9 @@ CheckDevicePath (
   DevicePathSize -= sizeof (EFI_DEVICE_PATH_PROTOCOL);\r
   if (CompareMem (DevicePath1, DevicePath2, DevicePathSize) != 0) {\r
     DevicePathEqual = FALSE;\r
-  } \r
-  \r
-Done: \r
+  }\r
+\r
+Done:\r
   if (FileName1 != NULL) {\r
     FreePool (FileName1);\r
   }\r
@@ -463,12 +463,12 @@ Done:
 \r
 \r
 /**\r
-  Check whether the image pointed to by DevicePath is in the device path list \r
-  specified by AccessType.  \r
+  Check whether the image pointed to by DevicePath is in the device path list\r
+  specified by AccessType.\r
 \r
   @param[in] DevicePath  Points to device path.\r
   @param[in] AccessType  The type of user access control.\r
\r
+\r
   @retval    TRUE        The DevicePath is in the specified List.\r
   @retval    FALSE       The DevicePath is not in the specified List.\r
 \r
@@ -482,36 +482,36 @@ IsDevicePathInList (
   EFI_STATUS                            Status;\r
   EFI_USER_INFO_ACCESS_CONTROL          *Access;\r
   EFI_DEVICE_PATH_PROTOCOL              *Path;\r
-  UINTN                                 OffSet;  \r
+  UINTN                                 OffSet;\r
 \r
   Status = GetAccessControl (&Access, AccessType);\r
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
-  }  \r
+  }\r
 \r
   OffSet = 0;\r
   while (OffSet < Access->Size - sizeof (EFI_USER_INFO_ACCESS_CONTROL)) {\r
-    Path = (EFI_DEVICE_PATH_PROTOCOL*)((UINT8*)(Access + 1) + OffSet);    \r
+    Path = (EFI_DEVICE_PATH_PROTOCOL*)((UINT8*)(Access + 1) + OffSet);\r
     if (CheckDevicePath (Path, DevicePath)) {\r
       //\r
       // The device path is found in list.\r
       //\r
       FreePool (Access);\r
       return TRUE;\r
-    }  \r
+    }\r
     OffSet += GetDevicePathSize (Path);\r
   }\r
-  \r
+\r
   FreePool (Access);\r
-  return FALSE; \r
+  return FALSE;\r
 }\r
 \r
 \r
 /**\r
-  Check whether the image pointed to by DevicePath is permitted to load.  \r
+  Check whether the image pointed to by DevicePath is permitted to load.\r
 \r
   @param[in] DevicePath  Points to device path\r
\r
+\r
   @retval    TRUE        The image pointed by DevicePath is permitted to load.\r
   @retval    FALSE       The image pointed by DevicePath is forbidden to load.\r
 \r
@@ -523,28 +523,28 @@ VerifyDevicePath (
 {\r
   if (IsDevicePathInList (DevicePath, EFI_USER_INFO_ACCESS_PERMIT_LOAD)) {\r
     //\r
-    // This access control overrides any restrictions put in place by the \r
+    // This access control overrides any restrictions put in place by the\r
     // EFI_USER_INFO_ACCESS_FORBID_LOAD record.\r
     //\r
     return TRUE;\r
   }\r
-  \r
+\r
   if (IsDevicePathInList (DevicePath, EFI_USER_INFO_ACCESS_FORBID_LOAD)) {\r
     //\r
     // The device path is found in the forbidden list.\r
     //\r
     return FALSE;\r
   }\r
-  \r
-  return TRUE; \r
+\r
+  return TRUE;\r
 }\r
 \r
 \r
 /**\r
-  Check the image pointed by DevicePath is a boot option or not.  \r
+  Check the image pointed by DevicePath is a boot option or not.\r
 \r
   @param[in] DevicePath  Points to device path.\r
\r
+\r
   @retval    TRUE        The image pointed by DevicePath is a boot option.\r
   @retval    FALSE       The image pointed by DevicePath is not a boot option.\r
 \r
@@ -562,31 +562,31 @@ IsBootOption (
   UINT8                             *OptionBuffer;\r
   UINT8                             *OptionPtr;\r
   EFI_DEVICE_PATH_PROTOCOL          *OptionDevicePath;\r
-  \r
+\r
   //\r
   // Get BootOrder\r
   //\r
   BootOrderListSize = 0;\r
-  BootOrderList     = NULL;  \r
+  BootOrderList     = NULL;\r
   Status = gRT->GetVariable (\r
-                  L"BootOrder", \r
-                  &gEfiGlobalVariableGuid, \r
-                  NULL, \r
-                  &BootOrderListSize, \r
+                  L"BootOrder",\r
+                  &gEfiGlobalVariableGuid,\r
+                  NULL,\r
+                  &BootOrderListSize,\r
                   NULL\r
                   );\r
   if (Status == EFI_BUFFER_TOO_SMALL) {\r
     BootOrderList = AllocateZeroPool (BootOrderListSize);\r
     ASSERT (BootOrderList != NULL);\r
     Status = gRT->GetVariable (\r
-                    L"BootOrder", \r
-                    &gEfiGlobalVariableGuid, \r
-                    NULL, \r
-                    &BootOrderListSize, \r
+                    L"BootOrder",\r
+                    &gEfiGlobalVariableGuid,\r
+                    NULL,\r
+                    &BootOrderListSize,\r
                     BootOrderList\r
                     );\r
   }\r
-  \r
+\r
   if (EFI_ERROR (Status)) {\r
     //\r
     // No Boot option\r
@@ -608,7 +608,7 @@ IsBootOption (
     //\r
     // Check whether the image is forbidden.\r
     //\r
-    \r
+\r
     OptionPtr = OptionBuffer;\r
     //\r
     // Skip attribute.\r
@@ -624,7 +624,7 @@ IsBootOption (
     // Skip descript string\r
     //\r
     OptionPtr += StrSize ((UINT16 *) OptionPtr);\r
\r
+\r
     //\r
     // Now OptionPtr points to Device Path.\r
     //\r
@@ -650,11 +650,11 @@ IsBootOption (
 /**\r
   Add the image info to a deferred image list.\r
 \r
-  @param[in]  ImageDevicePath  A pointer to the device path of a image.                                \r
-  @param[in]  Image            Points to the first byte of the image, or NULL if the \r
+  @param[in]  ImageDevicePath  A pointer to the device path of a image.\r
+  @param[in]  Image            Points to the first byte of the image, or NULL if the\r
                                image is not available.\r
   @param[in]  ImageSize        The size of the image, or 0 if the image is not available.\r
-  \r
+\r
 **/\r
 VOID\r
 PutDefferedImageInfo (\r
@@ -675,9 +675,9 @@ PutDefferedImageInfo (
   } else {\r
     CurImageInfo = AllocatePool ((mDeferredImage.Count + 1) * sizeof (DEFERRED_IMAGE_INFO));\r
     ASSERT (CurImageInfo != NULL);\r
-    \r
+\r
     CopyMem (\r
-      CurImageInfo, \r
+      CurImageInfo,\r
       mDeferredImage.ImageInfo,\r
       mDeferredImage.Count * sizeof (DEFERRED_IMAGE_INFO)\r
       );\r
@@ -685,7 +685,7 @@ PutDefferedImageInfo (
     mDeferredImage.ImageInfo = CurImageInfo;\r
   }\r
   mDeferredImage.Count++;\r
-  \r
+\r
   //\r
   // Save the deferred image information.\r
   //\r
@@ -704,29 +704,29 @@ PutDefferedImageInfo (
 /**\r
   Returns information about a deferred image.\r
 \r
-  This function returns information about a single deferred image. The deferred images are \r
-  numbered consecutively, starting with 0.  If there is no image which corresponds to \r
-  ImageIndex, then EFI_NOT_FOUND is returned. All deferred images may be returned by \r
+  This function returns information about a single deferred image. The deferred images are\r
+  numbered consecutively, starting with 0.  If there is no image which corresponds to\r
+  ImageIndex, then EFI_NOT_FOUND is returned. All deferred images may be returned by\r
   iteratively calling this function until EFI_NOT_FOUND is returned.\r
-  Image may be NULL and ImageSize set to 0 if the decision to defer execution was made \r
-  because of the location of the executable image, rather than its actual contents.  \r
+  Image may be NULL and ImageSize set to 0 if the decision to defer execution was made\r
+  because of the location of the executable image, rather than its actual contents.\r
 \r
   @param[in]  This             Points to this instance of the EFI_DEFERRED_IMAGE_LOAD_PROTOCOL.\r
   @param[in]  ImageIndex       Zero-based index of the deferred index.\r
-  @param[out] ImageDevicePath  On return, points to a pointer to the device path of the image. \r
-                               The device path should not be freed by the caller. \r
-  @param[out] Image            On return, points to the first byte of the image or NULL if the \r
+  @param[out] ImageDevicePath  On return, points to a pointer to the device path of the image.\r
+                               The device path should not be freed by the caller.\r
+  @param[out] Image            On return, points to the first byte of the image or NULL if the\r
                                image is not available. The image should not be freed by the caller\r
-                               unless LoadImage() has been successfully called.  \r
+                               unless LoadImage() has been successfully called.\r
   @param[out] ImageSize        On return, the size of the image, or 0 if the image is not available.\r
-  @param[out] BootOption       On return, points to TRUE if the image was intended as a boot option \r
-                               or FALSE if it was not intended as a boot option. \r
\r
+  @param[out] BootOption       On return, points to TRUE if the image was intended as a boot option\r
+                               or FALSE if it was not intended as a boot option.\r
+\r
   @retval EFI_SUCCESS           Image information returned successfully.\r
   @retval EFI_NOT_FOUND         ImageIndex does not refer to a valid image.\r
-  @retval EFI_INVALID_PARAMETER ImageDevicePath is NULL or Image is NULL or ImageSize is NULL or \r
+  @retval EFI_INVALID_PARAMETER ImageDevicePath is NULL or Image is NULL or ImageSize is NULL or\r
                                 BootOption is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -748,7 +748,7 @@ GetDefferedImageInfo (
   if ((This == NULL) || (ImageSize == NULL) || (Image == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if ((ImageDevicePath == NULL) || (BootOption == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -756,17 +756,17 @@ GetDefferedImageInfo (
   if (ImageIndex >= mDeferredImage.Count) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Get the request deferred image.\r
-  // \r
+  //\r
   ReqImageInfo = &mDeferredImage.ImageInfo[ImageIndex];\r
-   \r
+\r
   *ImageDevicePath = ReqImageInfo->ImageDevicePath;\r
   *Image           = ReqImageInfo->Image;\r
   *ImageSize       = ReqImageInfo->ImageSize;\r
   *BootOption      = ReqImageInfo->BootOption;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -775,7 +775,7 @@ GetDefferedImageInfo (
   Provides the service of deferring image load based on platform policy control,\r
   and installs Deferred Image Load Protocol.\r
 \r
-  @param[in]  AuthenticationStatus  This is the authentication status returned from the \r
+  @param[in]  AuthenticationStatus  This is the authentication status returned from the\r
                                     security measurement services for the input file.\r
   @param[in]  File                  This is a pointer to the device path of the file that\r
                                     is being dispatched. This will optionally be used for\r
@@ -824,7 +824,7 @@ DxeDeferImageLoadHandler (
 \r
   //\r
   // Check whether user has a logon.\r
-  // \r
+  //\r
   CurrentUser = NULL;\r
   if (mUserManager != NULL) {\r
     mUserManager->Current (mUserManager, &CurrentUser);\r
@@ -839,7 +839,7 @@ DxeDeferImageLoadHandler (
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Still no user logon.\r
   // Check the file type and get policy setting.\r
@@ -852,7 +852,7 @@ DxeDeferImageLoadHandler (
     //\r
     return EFI_SUCCESS;\r
   }\r
\r
+\r
   DEBUG ((EFI_D_INFO, "[Security] No user identified, the image is deferred to load!\n"));\r
   PutDefferedImageInfo (File, FileBuffer, FileSize);\r
 \r
@@ -874,10 +874,10 @@ DxeDeferImageLoadHandler (
 }\r
 \r
 /**\r
-  Locate user manager protocol when user manager is installed.  \r
+  Locate user manager protocol when user manager is installed.\r
 \r
   @param[in] Event    The Event that is being processed, not used.\r
-  @param[in] Context  Event Context, not used. \r
+  @param[in] Context  Event Context, not used.\r
 \r
 **/\r
 VOID\r
@@ -892,7 +892,7 @@ FindUserManagerProtocol (
          NULL,\r
          (VOID **) &mUserManager\r
          );\r
-  \r
+\r
 }\r
 \r
 \r
@@ -912,22 +912,22 @@ DxeDeferImageLoadLibConstructor (
   )\r
 {\r
   VOID                 *Registration;\r
-  \r
+\r
   //\r
   // Register user manager notification function.\r
   //\r
   EfiCreateProtocolNotifyEvent (\r
-    &gEfiUserManagerProtocolGuid, \r
+    &gEfiUserManagerProtocolGuid,\r
     TPL_CALLBACK,\r
     FindUserManagerProtocol,\r
     NULL,\r
     &Registration\r
     );\r
-  \r
+\r
   return RegisterSecurity2Handler (\r
            DxeDeferImageLoadHandler,\r
-           EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD \r
-           );      \r
+           EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD\r
+           );\r
 }\r
 \r
 \r
index fd750be512af49c5c9d3a7e648dc7b419c3c8afa..1390974a84b6702a61af0bf358bbfa5912500865 100644 (file)
@@ -2,13 +2,13 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by DeferImageLoadLib.\r
 \r
-Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -67,29 +67,29 @@ typedef struct {
 /**\r
   Returns information about a deferred image.\r
 \r
-  This function returns information about a single deferred image. The deferred images are \r
-  numbered consecutively, starting with 0.  If there is no image which corresponds to \r
-  ImageIndex, then EFI_NOT_FOUND is returned. All deferred images may be returned by \r
+  This function returns information about a single deferred image. The deferred images are\r
+  numbered consecutively, starting with 0.  If there is no image which corresponds to\r
+  ImageIndex, then EFI_NOT_FOUND is returned. All deferred images may be returned by\r
   iteratively calling this function until EFI_NOT_FOUND is returned.\r
-  Image may be NULL and ImageSize set to 0 if the decision to defer execution was made \r
-  because of the location of the executable image, rather than its actual contents.  \r
+  Image may be NULL and ImageSize set to 0 if the decision to defer execution was made\r
+  because of the location of the executable image, rather than its actual contents.\r
 \r
   @param[in]  This              Points to this instance of the EFI_DEFERRED_IMAGE_LOAD_PROTOCOL.\r
   @param[in]  ImageIndex        Zero-based index of the deferred index.\r
-  @param[out] ImageDevicePath   On return, points to a pointer to the device path of the image. \r
-                                The device path should not be freed by the caller. \r
-  @param[out] Image             On return, points to the first byte of the image or NULL if the \r
+  @param[out] ImageDevicePath   On return, points to a pointer to the device path of the image.\r
+                                The device path should not be freed by the caller.\r
+  @param[out] Image             On return, points to the first byte of the image or NULL if the\r
                                 image is not available. The image should not be freed by the caller\r
-                                unless LoadImage() has been called successfully.  \r
+                                unless LoadImage() has been called successfully.\r
   @param[out] ImageSize         On return, the size of the image, or 0 if the image is not available.\r
-  @param[out] BootOption        On return, points to TRUE if the image was intended as a boot option \r
-                                or FALSE if it was not intended as a boot option. \r
\r
+  @param[out] BootOption        On return, points to TRUE if the image was intended as a boot option\r
+                                or FALSE if it was not intended as a boot option.\r
+\r
   @retval EFI_SUCCESS           Image information returned successfully.\r
   @retval EFI_NOT_FOUND         ImageIndex does not refer to a valid image.\r
-  @retval EFI_INVALID_PARAMETER ImageDevicePath is NULL or Image is NULL or ImageSize is NULL or \r
+  @retval EFI_INVALID_PARAMETER ImageDevicePath is NULL or Image is NULL or ImageSize is NULL or\r
                                 BootOption is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -101,5 +101,5 @@ GetDefferedImageInfo (
      OUT UINTN                             *ImageSize,\r
      OUT BOOLEAN                           *BootOption\r
   );\r
-  \r
+\r
 #endif\r
index 8297230bed08e68a0c8549cf59343ca3e16f8dcd..3399d7a3bd0abaac0179c8e740851a46da0c911d 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  Provides security service of deferred image load\r
 #\r
-#  The platform may need to defer the execution of an image because of security \r
-#  considerations. These deferred images will be recorded and then reported by \r
+#  The platform may need to defer the execution of an image because of security\r
+#  considerations. These deferred images will be recorded and then reported by\r
 #  installing an instance of the EFI_DEFERRED_IMAGE_LOAD_PROTOCOL.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -48,9 +48,9 @@
   DevicePathLib\r
   BaseMemoryLib\r
   PrintLib\r
-  DebugLib \r
+  DebugLib\r
   UefiLib\r
-  PcdLib \r
+  PcdLib\r
 \r
 [Protocols]\r
   gEfiFirmwareVolume2ProtocolGuid                        ## SOMETIMES_CONSUMES\r
@@ -60,9 +60,9 @@
   ## SOMETIMES_CONSUMES\r
   ## NOTIFY\r
   gEfiUserManagerProtocolGuid\r
-   \r
+\r
 [Guids]\r
   gEfiGlobalVariableGuid                                  ## SOMETIMES_CONSUMES  ## Variable:L"BootOrder"\r
-  \r
+\r
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdDeferImageLoadPolicy   ## SOMETIMES_CONSUMES\r
index bc1acd1fed5c44ef49e07c09079b8ad9669b0c35..f0d41b8b9c62b1c266263fcc8251222ce532efea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement image authentication status check in UEFI2.3.1.\r
 \r
-Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -18,8 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 /**\r
   Check image authentication status returned from Section Extraction Protocol\r
-  \r
-  @param[in]    AuthenticationStatus  This is the authentication status returned from \r
+\r
+  @param[in]    AuthenticationStatus  This is the authentication status returned from\r
                              the Section Extraction Protocol when reading the input file.\r
   @param[in]    File       This is a pointer to the device path of the file that is\r
                            being dispatched. This will optionally be used for logging.\r
index 62fcdaacc6a5686b285021ed94ae91fdc206cd0f..6c826a9cbf3ac21cb02f6a5cc9ccc31cc6074d72 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 #  Authentication Status Library module supports UEFI2.3.1\r
 #\r
-# Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -20,7 +20,7 @@
   FILE_GUID                      = EB92D1DE-7C36-4680-BB88-A67E96049F72\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = DxeImageAuthenticationStatusLibConstructor\r
 \r
 #\r
index 588072c6a1d8ca4184b7f14928e722ccaa0a838a..0f795c0af125732c1842116fa9136c41ea2a2ded 100644 (file)
@@ -12,7 +12,7 @@
   DxeImageVerificationHandler(), HashPeImageByType(), HashPeImage() function will accept\r
   untrusted PE/COFF image and validate its data structure within this image buffer before use.\r
 \r
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -275,12 +275,12 @@ GetImageType (
 /**\r
   Calculate hash of Pe/Coff image based on the authenticode image hashing in\r
   PE/COFF Specification 8.0 Appendix A\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
   PE/COFF image is external input, so this function will validate its data structure\r
   within this image buffer before use.\r
 \r
-  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in \r
+  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in\r
   its caller function DxeImageVerificationHandler().\r
 \r
   @param[in]    HashAlg   Hash algorithm type.\r
@@ -1109,14 +1109,14 @@ IsTimeZero (
 }\r
 \r
 /**\r
-  Check whether the timestamp signature is valid and the signing time is also earlier than \r
+  Check whether the timestamp signature is valid and the signing time is also earlier than\r
   the revocation time.\r
 \r
   @param[in]  AuthData        Pointer to the Authenticode signature retrieved from signed image.\r
   @param[in]  AuthDataSize    Size of the Authenticode signature in bytes.\r
   @param[in]  RevocationTime  The time that the certificate was revoked.\r
 \r
-  @retval TRUE      Timestamp signature is valid and signing time is no later than the \r
+  @retval TRUE      Timestamp signature is valid and signing time is no later than the\r
                     revocation time.\r
   @retval FALSE     Timestamp signature is not valid or the signing time is later than the\r
                     revocation time.\r
@@ -1226,9 +1226,9 @@ Done:
 \r
 **/\r
 BOOLEAN\r
-IsForbiddenByDbx (  \r
+IsForbiddenByDbx (\r
   IN UINT8                  *AuthData,\r
-  IN UINTN                  AuthDataSize  \r
+  IN UINTN                  AuthDataSize\r
   )\r
 {\r
   EFI_STATUS                Status;\r
index 6575e1c4b9a8a5842f6a06cc6a6e86be72b1d987..75994a24530a59bf10c187a05da1dbbbab668fea 100644 (file)
@@ -2,13 +2,13 @@
 // Provides security service of image verification\r
 //\r
 // This library hooks LoadImage() API to verify every image by the verification policy.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This library will have external input - PE/COFF image.\r
 // This external input must be validated carefully to avoid security issues such as\r
 // buffer overflow or integer overflow.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 6b98747d4a8084fa6ce6e08cbaa0ecfb7e9ef48e..3f0d4f25eb3181f8f20b1f6dd01e37da837c6a4f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Measure TCG required variable.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -97,9 +97,9 @@ AssignVendorGuid (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
 **/\r
@@ -151,8 +151,8 @@ AddDataMeasured (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
 \r
   @retval TRUE  The data is already measured.\r
   @retval FALSE The data is not measured yet.\r
@@ -197,7 +197,7 @@ IsSecureAuthorityVariable (
   UINTN   Index;\r
 \r
   for (Index = 0; Index < sizeof(mVariableType)/sizeof(mVariableType[0]); Index++) {\r
-    if ((StrCmp (VariableName, mVariableType[Index].VariableName) == 0) && \r
+    if ((StrCmp (VariableName, mVariableType[Index].VariableName) == 0) &&\r
         (CompareGuid (VendorGuid, mVariableType[Index].VendorGuid))) {\r
       return TRUE;\r
     }\r
@@ -210,9 +210,9 @@ IsSecureAuthorityVariable (
 \r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
index d6f4207a5064f6033d18b7553f78da347f896645..8421545c119045ee4fa41b84cc2f5c29e97643e7 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
 \r
-  This library registers RSA 2048 SHA 256 guided section handler \r
+  This library registers RSA 2048 SHA 256 guided section handler\r
   to parse RSA 2048 SHA 256 encapsulation section and extract raw data.\r
   It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -50,7 +50,7 @@ CONST UINT8 mRsaE[] = { 0x01, 0x00, 0x01 };
 /**\r
 \r
   GetInfo gets raw data size and attribute of the input guided section.\r
-  It first checks whether the input guid section is supported. \r
+  It first checks whether the input guid section is supported.\r
   If not, EFI_INVALID_PARAMETER will return.\r
 \r
   @param InputSection       Buffer containing the input GUIDed section to be processed.\r
@@ -58,7 +58,7 @@ CONST UINT8 mRsaE[] = { 0x01, 0x00, 0x01 };
   @param ScratchBufferSize  The size of ScratchBuffer.\r
   @param SectionAttribute   The attribute of the input guided section.\r
 \r
-  @retval EFI_SUCCESS            The size of destination buffer, the size of scratch buffer and \r
+  @retval EFI_SUCCESS            The size of destination buffer, the size of scratch buffer and\r
                                  the attribute of the input section are successfully retrieved.\r
   @retval EFI_INVALID_PARAMETER  The GUID in InputSection does not match this instance guid.\r
 \r
@@ -111,7 +111,7 @@ Rsa2048Sha256GuidedSectionGetInfo (
 \r
   Extraction handler tries to extract raw data from the input guided section.\r
   It also does authentication check for RSA 2048 SHA 256 signature in the input guided section.\r
-  It first checks whether the input guid section is supported. \r
+  It first checks whether the input guid section is supported.\r
   If not, EFI_INVALID_PARAMETER will return.\r
 \r
   @param InputSection    Buffer containing the input GUIDed section to be processed.\r
@@ -143,10 +143,10 @@ Rsa2048Sha256GuidedSectionHandler (
   UINTN                           PublicKeyBufferSize;\r
   VOID                            *HashContext;\r
   VOID                            *Rsa;\r
-  \r
+\r
   HashContext = NULL;\r
   Rsa         = NULL;\r
-  \r
+\r
   if (IS_SECTION2 (InputSection)) {\r
     //\r
     // Check whether the input guid section is recognized.\r
@@ -156,7 +156,7 @@ Rsa2048Sha256GuidedSectionHandler (
         &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-  \r
+\r
     //\r
     // Get the RSA 2048 SHA 256 information.\r
     //\r
@@ -184,7 +184,7 @@ Rsa2048Sha256GuidedSectionHandler (
         &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-  \r
+\r
     //\r
     // Get the RSA 2048 SHA 256 information.\r
     //\r
@@ -214,7 +214,7 @@ Rsa2048Sha256GuidedSectionHandler (
     // If SecurityPolicy Protocol exist, AUTH platform override bit is set.\r
     //\r
     *AuthenticationStatus |= EFI_AUTH_STATUS_PLATFORM_OVERRIDE;\r
-    \r
+\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -222,7 +222,7 @@ Rsa2048Sha256GuidedSectionHandler (
   // All paths from here return EFI_SUCESS and result is returned in AuthenticationStatus\r
   //\r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // Fail if the HashType is not SHA 256\r
   //\r
@@ -264,7 +264,7 @@ Rsa2048Sha256GuidedSectionHandler (
     *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Fail if the PublicKey is not one of the public keys in PcdRsa2048Sha256PublicKeyBuffer\r
   //\r
@@ -299,8 +299,8 @@ Rsa2048Sha256GuidedSectionHandler (
     *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;\r
     goto Done;\r
   }\r
-  \r
-  // \r
+\r
+  //\r
   // Set RSA Key Components.\r
   // NOTE: Only N and E are needed to be set as RSA public key for signature verification.\r
   //\r
@@ -347,10 +347,10 @@ Rsa2048Sha256GuidedSectionHandler (
   //\r
   PERF_INMODULE_BEGIN ("DxeRsaVerify");\r
   CryptoStatus = RsaPkcs1Verify (\r
-                   Rsa, \r
-                   Digest, \r
-                   SHA256_DIGEST_SIZE, \r
-                   CertBlockRsa2048Sha256->Signature, \r
+                   Rsa,\r
+                   Digest,\r
+                   SHA256_DIGEST_SIZE,\r
+                   CertBlockRsa2048Sha256->Signature,\r
                    sizeof (CertBlockRsa2048Sha256->Signature)\r
                    );\r
   PERF_INMODULE_END ("DxeRsaVerify");\r
index 4681f08643f8ae24c1701266077b8989451bcc3f..cbb553c0bfcb6789520f8f2ee41db3931010d875 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-#  This library doesn't produce any library class. The constructor function uses \r
+#  This library doesn't produce any library class. The constructor function uses\r
 #  ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided section handler\r
 #  that parses RSA 2048 SHA 256 encapsulation section and extracts raw data.\r
 #\r
 #  It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 #\r
-# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -39,7 +39,7 @@
   MdePkg/MdePkg.dec\r
   CryptoPkg/CryptoPkg.dec\r
   SecurityPkg/SecurityPkg.dec\r
-  \r
+\r
 [LibraryClasses]\r
   ExtractGuidedSectionLib\r
   UefiBootServicesTableLib\r
   PcdLib\r
   PerformanceLib\r
 \r
-[Pcd]  \r
+[Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer    ## SOMETIMES_CONSUMES\r
 \r
 [Protocols]\r
   gEfiSecurityPolicyProtocolGuid                   ## SOMETIMES_CONSUMES (Set platform override AUTH status if exist)\r
-  \r
+\r
 [Guids]\r
   gEfiCertTypeRsa2048Sha256Guid  ## PRODUCES       ## UNDEFINED  # Specifies RSA 2048 SHA 256 authentication algorithm.\r
   gEfiHashAlgorithmSha256Guid    ## SOMETIMES_CONSUMES ## UNDEFINED\r
-  
\ No newline at end of file
+\r
index 5a043efbb2e4de8b58ea5066847d65d7c005faad..19131a71ab2152c10b05f85e231183b07d1e0b23 100644 (file)
@@ -3,10 +3,10 @@
 //\r
 // ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided section handler\r
 // that parses RSA 2048 SHA 256 encapsulation section and extracts raw data.\r
-// \r
+//\r
 // It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 5ece8e513abc5921095c583b326d587c013ed2a9..a271c813887f8e5864aa88e348429aad55143c53 100644 (file)
@@ -7,13 +7,13 @@
 \r
   Tpm2ExecutePendingTpmRequest() will receive untrusted input and do validation.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -109,7 +109,7 @@ Done:
   Change EPS.\r
 \r
   @param[in]  PlatformAuth      platform auth value. NULL means no platform auth change.\r
-  \r
+\r
   @retval EFI_SUCCESS Operation completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -145,9 +145,9 @@ Tpm2CommandChangeEps (
   @param[in]      CommandCode         Physical presence operation value.\r
   @param[in]      CommandParameter    Physical presence operation parameter.\r
   @param[in, out] PpiFlags            The physical presence interface flags.\r
-  \r
+\r
   @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE   Unknown physical presence operation.\r
-  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE   Error occurred during sending command to TPM or \r
+  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE   Error occurred during sending command to TPM or\r
                                                    receiving response from TPM.\r
   @retval Others                                   Return code from the TPM device after command execution.\r
 **/\r
@@ -274,8 +274,8 @@ Tcg2ReadUserKey (
   EFI_STATUS                        Status;\r
   EFI_INPUT_KEY                     Key;\r
   UINT16                            InputKey;\r
-      \r
-  InputKey = 0; \r
+\r
+  InputKey = 0;\r
   do {\r
     Status = gBS->CheckEvent (gST->ConIn->WaitForKey);\r
     if (!EFI_ERROR (Status)) {\r
@@ -289,13 +289,13 @@ Tcg2ReadUserKey (
       if ((Key.ScanCode == SCAN_F12) && CautionKey) {\r
         InputKey = Key.ScanCode;\r
       }\r
-    }      \r
+    }\r
   } while (InputKey == 0);\r
 \r
   if (InputKey != SCAN_ESC) {\r
     return TRUE;\r
   }\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
@@ -364,7 +364,7 @@ Tcg2UserConfirm (
 {\r
   CHAR16                            *ConfirmText;\r
   CHAR16                            *TmpStr1;\r
-  CHAR16                            *TmpStr2; \r
+  CHAR16                            *TmpStr2;\r
   UINTN                             BufSize;\r
   BOOLEAN                           CautionKey;\r
   BOOLEAN                           NoPpiInfo;\r
@@ -376,7 +376,7 @@ Tcg2UserConfirm (
   EFI_TCG2_BOOT_SERVICE_CAPABILITY  ProtocolCapability;\r
   UINT32                            CurrentPCRBanks;\r
   EFI_STATUS                        Status;\r
-  \r
+\r
   TmpStr2     = NULL;\r
   CautionKey  = FALSE;\r
   NoPpiInfo   = FALSE;\r
@@ -403,7 +403,7 @@ Tcg2UserConfirm (
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CLEAR));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), L" \n\n", (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       break;\r
 \r
@@ -423,7 +423,7 @@ Tcg2UserConfirm (
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CLEAR));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), L" \n\n", (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1); \r
+      FreePool (TmpStr1);\r
 \r
       break;\r
 \r
@@ -453,11 +453,11 @@ Tcg2UserConfirm (
 \r
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_SET_PCR_BANKS_1));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_SET_PCR_BANKS_2));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       Tcg2FillBufferWithBootHashAlg (TempBuffer, sizeof(TempBuffer), TpmPpCommandParameter);\r
       Tcg2FillBufferWithBootHashAlg (TempBuffer2, sizeof(TempBuffer2), CurrentPCRBanks);\r
@@ -468,7 +468,7 @@ Tcg2UserConfirm (
 \r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), L" \n", (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       break;\r
 \r
@@ -482,11 +482,11 @@ Tcg2UserConfirm (
 \r
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CHANGE_EPS_1));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
-      \r
+      FreePool (TmpStr1);\r
+\r
       TmpStr1 = Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CHANGE_EPS_2));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       break;\r
 \r
@@ -571,10 +571,10 @@ Tcg2UserConfirm (
 \r
   DstStr[80] = L'\0';\r
   for (Index = 0; Index < StrLen (ConfirmText); Index += 80) {\r
-    StrnCpyS (DstStr, sizeof (DstStr) / sizeof (CHAR16), ConfirmText + Index, sizeof (DstStr) / sizeof (CHAR16) - 1);    \r
-    Print (DstStr);    \r
+    StrnCpyS (DstStr, sizeof (DstStr) / sizeof (CHAR16), ConfirmText + Index, sizeof (DstStr) / sizeof (CHAR16) - 1);\r
+    Print (DstStr);\r
   }\r
-  \r
+\r
   FreePool (TmpStr1);\r
   FreePool (TmpStr2);\r
   FreePool (ConfirmText);\r
@@ -584,17 +584,17 @@ Tcg2UserConfirm (
     return TRUE;\r
   }\r
 \r
-  return FALSE;  \r
+  return FALSE;\r
 }\r
 \r
 /**\r
-  Check if there is a valid physical presence command request. Also updates parameter value \r
+  Check if there is a valid physical presence command request. Also updates parameter value\r
   to whether the requested physical presence command already confirmed by user\r
\r
-   @param[in]  TcgPpData                 EFI Tcg2 Physical Presence request data. \r
+\r
+   @param[in]  TcgPpData                 EFI Tcg2 Physical Presence request data.\r
    @param[in]  Flags                     The physical presence interface flags.\r
    @param[out] RequestConfirmed          If the physical presence operation command required user confirm from UI.\r
-                                           True, it indicates the command doesn't require user confirm, or already confirmed \r
+                                           True, it indicates the command doesn't require user confirm, or already confirmed\r
                                                  in last boot cycle by user.\r
                                            False, it indicates the command need user confirm from UI.\r
 \r
@@ -657,7 +657,7 @@ Tcg2HaveValidTpmRequest  (
         *RequestConfirmed = TRUE;\r
       }\r
       break;\r
-      \r
+\r
     case TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS:\r
       *RequestConfirmed = TRUE;\r
       break;\r
@@ -778,7 +778,7 @@ Tcg2ExecutePendingTpmRequest (
   } else {\r
     if (!RequestConfirmed) {\r
       //\r
-      // Print confirm text and wait for approval. \r
+      // Print confirm text and wait for approval.\r
       //\r
       RequestConfirmed = Tcg2UserConfirm (TcgPpData->PPRequest, TcgPpData->PPRequestParameter);\r
     }\r
@@ -791,8 +791,8 @@ Tcg2ExecutePendingTpmRequest (
     if (RequestConfirmed) {\r
       TcgPpData->PPResponse = Tcg2ExecutePhysicalPresence (\r
                                 PlatformAuth,\r
-                                TcgPpData->PPRequest, \r
-                                TcgPpData->PPRequestParameter, \r
+                                TcgPpData->PPRequest,\r
+                                TcgPpData->PPRequestParameter,\r
                                 &NewFlags\r
                                 );\r
     }\r
@@ -809,7 +809,7 @@ Tcg2ExecutePendingTpmRequest (
                       EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
                       sizeof (EFI_TCG2_PHYSICAL_PRESENCE_FLAGS),\r
                       &NewFlags\r
-                      ); \r
+                      );\r
   }\r
 \r
   //\r
@@ -817,7 +817,7 @@ Tcg2ExecutePendingTpmRequest (
   //\r
   if ((NewFlags.PPFlags & TCG2_LIB_PP_FLAG_RESET_TRACK) == 0) {\r
     TcgPpData->LastPPRequest = TcgPpData->PPRequest;\r
-    TcgPpData->PPRequest = TCG2_PHYSICAL_PRESENCE_NO_ACTION;    \r
+    TcgPpData->PPRequest = TCG2_PHYSICAL_PRESENCE_NO_ACTION;\r
     TcgPpData->PPRequestParameter = 0;\r
   }\r
 \r
@@ -879,19 +879,19 @@ Tcg2ExecutePendingTpmRequest (
 \r
   Print (L"Rebooting system to make TPM2 settings in effect\n");\r
   gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);\r
-  ASSERT (FALSE);  \r
+  ASSERT (FALSE);\r
 }\r
 \r
 /**\r
   Check and execute the pending TPM request.\r
 \r
-  The TPM request may come from OS or BIOS. This API will display request information and wait \r
+  The TPM request may come from OS or BIOS. This API will display request information and wait\r
   for user confirmation if TPM request exists. The TPM request will be sent to TPM device after\r
-  the TPM request is confirmed, and one or more reset may be required to make TPM request to \r
+  the TPM request is confirmed, and one or more reset may be required to make TPM request to\r
   take effect.\r
-  \r
+\r
   This API should be invoked after console in and console out are all ready as they are required\r
-  to display request information and get user input to confirm the request.  \r
+  to display request information and get user input to confirm the request.\r
 \r
   @param[in]  PlatformAuth                   platform auth value. NULL means no platform auth change.\r
 **/\r
@@ -908,7 +908,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
   EFI_TCG2_PHYSICAL_PRESENCE_FLAGS  PpiFlags;\r
 \r
   //\r
-  // This flags variable controls whether physical presence is required for TPM command. \r
+  // This flags variable controls whether physical presence is required for TPM command.\r
   // It should be protected from malicious software. We set it as read-only variable here.\r
   //\r
   Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **)&VariableLockProtocol);\r
@@ -923,7 +923,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
       ASSERT_EFI_ERROR (Status);\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Check S4 resume\r
   //\r
@@ -958,7 +958,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
     }\r
     DEBUG((DEBUG_INFO, "[TPM2] Initial physical presence flags value is 0x%x\n", PpiFlags.PPFlags));\r
   }\r
-  \r
+\r
   //\r
   // Initialize physical presence variable.\r
   //\r
@@ -990,7 +990,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
 \r
   //\r
   // Execute pending TPM request.\r
-  //  \r
+  //\r
   Tcg2ExecutePendingTpmRequest (PlatformAuth, &TcgPpData, &PpiFlags);\r
   DEBUG ((EFI_D_INFO, "[TPM2] PPResponse = %x (LastPPRequest=%x, Flags=%x)\n", TcgPpData.PPResponse, TcgPpData.LastPPRequest, PpiFlags.PPFlags));\r
 \r
@@ -1001,7 +1001,7 @@ Tcg2PhysicalPresenceLibProcessRequest (
 \r
   The TPM request may come from OS. This API will check if TPM request exists and need user\r
   input to confirmation.\r
-  \r
+\r
   @retval    TRUE        TPM needs input to confirm user physical presence.\r
   @retval    FALSE       TPM doesn't need input to confirm user physical presence.\r
 \r
@@ -1052,7 +1052,7 @@ Tcg2PhysicalPresenceLibNeedUserConfirm(
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   if (TcgPpData.PPRequest == TCG2_PHYSICAL_PRESENCE_NO_ACTION) {\r
     //\r
     // No operation request\r
@@ -1097,7 +1097,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
   EFI_STATUS                        Status;\r
   UINTN                             DataSize;\r
   EFI_TCG2_PHYSICAL_PRESENCE        PpData;\r
-  \r
+\r
   DEBUG ((EFI_D_INFO, "[TPM2] ReturnOperationResponseToOsFunction\n"));\r
 \r
   //\r
@@ -1117,7 +1117,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
     DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status = %r\n", Status));\r
     return TCG_PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE;\r
   }\r
-  \r
+\r
   *MostRecentRequest = PpData.LastPPRequest;\r
   *Response          = PpData.PPResponse;\r
 \r
@@ -1130,7 +1130,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
   Submit TPM Operation Request to Pre-OS Environment 2.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   @param[in]      OperationRequest TPM physical presence operation request.\r
   @param[in]      RequestParameter TPM physical presence operation request parameter.\r
 \r
@@ -1148,9 +1148,9 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
   UINTN                             DataSize;\r
   EFI_TCG2_PHYSICAL_PRESENCE        PpData;\r
   EFI_TCG2_PHYSICAL_PRESENCE_FLAGS  Flags;\r
-  \r
+\r
   DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request = %x, %x\n", OperationRequest, RequestParameter));\r
-  \r
+\r
   //\r
   // Get the Physical Presence variable\r
   //\r
@@ -1184,7 +1184,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
                     DataSize,\r
                     &PpData\r
                     );\r
-    if (EFI_ERROR (Status)) { \r
+    if (EFI_ERROR (Status)) {\r
       DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status = %r\n", Status));\r
       return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
     }\r
index fc10129989f64744711d2ad600d88de9bd3eddac..d74f00020340669f568fef773b4a857ca4cbb1c3 100644 (file)
@@ -8,7 +8,7 @@
 #  This driver will have external input - variable.\r
 #  This external input must be validated carefully to avoid security issue.\r
 #\r
-# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -25,7 +25,7 @@
   FILE_GUID                      = 7E507A86-DE8B-4AD3-BC4C-0498389098D3\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = Tcg2PhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = Tcg2PhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
index 7cb7072c174af30e9f482a7df63aacbacaae3a3b..472b9d9e516e15de8d880ceb1860ec3111aa5d7c 100644 (file)
@@ -3,12 +3,12 @@
 //\r
 // This library will check and execute TPM 2.0 request from OS or BIOS. The request may\r
 // ask for user confirmation before execution.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - variable.\r
 // This external input must be validated carefully to avoid security issue.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 0271b890e01c9d74fa3bcf6042b86e1ec9b8b1af..50f53e651136b3444dcac7abccb0b99b40910ccc 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   String definitions for TPM 2.0 physical presence confirm text.\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -17,8 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string TPM_HEAD_STR                  #language en-US    "A configuration change was requested to %s this computer's TPM (Trusted Platform Module)\n\n"\r
 #string TPM_PPI_HEAD_STR              #language en-US    "A configuration change was requested to allow the Operating System to %s the computer's TPM (Trusted Platform Module) without asking for user confirmation in the future.\n\n"\r
 \r
-#string TPM_ACCEPT_KEY                #language en-US    "Press F10 " \r
-#string TPM_CAUTION_KEY               #language en-US    "Press F12 " \r
+#string TPM_ACCEPT_KEY                #language en-US    "Press F10 "\r
+#string TPM_CAUTION_KEY               #language en-US    "Press F12 "\r
 #string TPM_REJECT_KEY                #language en-US    "to %s the TPM \nPress ESC to reject this change request and continue\n"\r
 \r
 #string TPM_ENABLE                    #language en-US    "enable"\r
@@ -48,8 +48,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string TCG_STORAGE_HEAD_STR                  #language en-US    "A configuration change was requested to %s on subsequent boots\n\n"\r
 #string TCG_STORAGE_PPI_HEAD_STR              #language en-US    "A configuration change was requested to allow the Operating System to %s without asking for user confirmation in the future.\n\n"\r
 \r
-#string TCG_STORAGE_ACCEPT_KEY                #language en-US    "Press F10 " \r
-#string TCG_STORAGE_CAUTION_KEY               #language en-US    "Press F12 " \r
+#string TCG_STORAGE_ACCEPT_KEY                #language en-US    "Press F10 "\r
+#string TCG_STORAGE_CAUTION_KEY               #language en-US    "Press F12 "\r
 #string TCG_STORAGE_REJECT_KEY                #language en-US    "to %s\nPress ESC to reject this change request and continue\n"\r
 \r
 #string TCG_STORAGE_NO_PPI_INFO               #language en-US    "to approve future Operating System requests "\r
index 4f35be80bb2d6589d84c9e018647c838848b3381..32e07000969349f518aed1516f8f63b351d87b1e 100644 (file)
@@ -8,13 +8,13 @@
 \r
   ExecutePendingTpmRequest() will receive untrusted input and do validation.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -60,10 +60,10 @@ PhysicalPresenceGetStringById (
 /**\r
   Get TPM physical presence permanent flags.\r
 \r
-  @param[in]  TcgProtocol   EFI TCG Protocol instance.  \r
-  @param[out] LifetimeLock  physicalPresenceLifetimeLock permanent flag.  \r
+  @param[in]  TcgProtocol   EFI TCG Protocol instance.\r
+  @param[out] LifetimeLock  physicalPresenceLifetimeLock permanent flag.\r
   @param[out] CmdEnable     physicalPresenceCMDEnable permanent flag.\r
-  \r
+\r
   @retval EFI_SUCCESS       Flags were returns successfully.\r
   @retval other             Failed to locate EFI TCG Protocol.\r
 \r
@@ -82,13 +82,13 @@ GetTpmCapability (
   UINT8                             SendBuffer[sizeof (*TpmRqu) + sizeof (UINT32) * 3];\r
   TPM_PERMANENT_FLAGS               *TpmPermanentFlags;\r
   UINT8                             RecvBuffer[40];\r
-  \r
+\r
   //\r
   // Fill request header\r
   //\r
   TpmRsp = (TPM_RSP_COMMAND_HDR*)RecvBuffer;\r
   TpmRqu = (TPM_RQU_COMMAND_HDR*)SendBuffer;\r
-  \r
+\r
   TpmRqu->tag       = SwapBytes16 (TPM_TAG_RQU_COMMAND);\r
   TpmRqu->paramSize = SwapBytes32 (sizeof (SendBuffer));\r
   TpmRqu->ordinal   = SwapBytes32 (TPM_ORD_GetCapability);\r
@@ -99,8 +99,8 @@ GetTpmCapability (
   SendBufPtr      = (UINT32*)(TpmRqu + 1);\r
   WriteUnaligned32 (SendBufPtr++, SwapBytes32 (TPM_CAP_FLAG));\r
   WriteUnaligned32 (SendBufPtr++, SwapBytes32 (sizeof (TPM_CAP_FLAG_PERMANENT)));\r
-  WriteUnaligned32 (SendBufPtr, SwapBytes32 (TPM_CAP_FLAG_PERMANENT));  \r
-  \r
+  WriteUnaligned32 (SendBufPtr, SwapBytes32 (TPM_CAP_FLAG_PERMANENT));\r
+\r
   Status = TcgProtocol->PassThroughToTpm (\r
                           TcgProtocol,\r
                           sizeof (SendBuffer),\r
@@ -111,9 +111,9 @@ GetTpmCapability (
   ASSERT_EFI_ERROR (Status);\r
   ASSERT (TpmRsp->tag == SwapBytes16 (TPM_TAG_RSP_COMMAND));\r
   ASSERT (TpmRsp->returnCode == 0);\r
-  \r
+\r
   TpmPermanentFlags = (TPM_PERMANENT_FLAGS *)&RecvBuffer[sizeof (TPM_RSP_COMMAND_HDR) + sizeof (UINT32)];\r
-  \r
+\r
   if (LifetimeLock != NULL) {\r
     *LifetimeLock = TpmPermanentFlags->physicalPresenceLifetimeLock;\r
   }\r
@@ -128,9 +128,9 @@ GetTpmCapability (
 /**\r
   Issue TSC_PhysicalPresence command to TPM.\r
 \r
-  @param[in] TcgProtocol          EFI TCG Protocol instance.  \r
-  @param[in] PhysicalPresence     The state to set the TPM's Physical Presence flags.  \r
-  \r
+  @param[in] TcgProtocol          EFI TCG Protocol instance.\r
+  @param[in] PhysicalPresence     The state to set the TPM's Physical Presence flags.\r
+\r
   @retval EFI_SUCCESS             TPM executed the command successfully.\r
   @retval EFI_SECURITY_VIOLATION  TPM returned error when executing the command.\r
   @retval other                   Failed to locate EFI TCG Protocol.\r
@@ -154,7 +154,7 @@ TpmPhysicalPresence (
   TpmRqu->tag       = SwapBytes16 (TPM_TAG_RQU_COMMAND);\r
   TpmRqu->paramSize = SwapBytes32 (sizeof (Buffer));\r
   TpmRqu->ordinal   = SwapBytes32 (TSC_ORD_PhysicalPresence);\r
-  WriteUnaligned16 (TpmPp, (TPM_PHYSICAL_PRESENCE) SwapBytes16 (PhysicalPresence));  \r
+  WriteUnaligned16 (TpmPp, (TPM_PHYSICAL_PRESENCE) SwapBytes16 (PhysicalPresence));\r
 \r
   Status = TcgProtocol->PassThroughToTpm (\r
                           TcgProtocol,\r
@@ -171,19 +171,19 @@ TpmPhysicalPresence (
     //\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
 /**\r
   Issue a TPM command for which no additional output data will be returned.\r
 \r
-  @param[in] TcgProtocol              EFI TCG Protocol instance.  \r
-  @param[in] Ordinal                  TPM command code.  \r
-  @param[in] AdditionalParameterSize  Additional parameter size.  \r
-  @param[in] AdditionalParameters     Pointer to the Additional paramaters.  \r
-  \r
-  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE  Error occurred during sending command to TPM or \r
+  @param[in] TcgProtocol              EFI TCG Protocol instance.\r
+  @param[in] Ordinal                  TPM command code.\r
+  @param[in] AdditionalParameterSize  Additional parameter size.\r
+  @param[in] AdditionalParameters     Pointer to the Additional paramaters.\r
+\r
+  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE  Error occurred during sending command to TPM or\r
                                                   receiving response from TPM.\r
   @retval Others                                  Return code from the TPM device after command execution.\r
 \r
@@ -232,9 +232,9 @@ TpmCommandNoReturnData (
   @param[in]      TcgProtocol         EFI TCG Protocol instance.\r
   @param[in]      CommandCode         Physical presence operation value.\r
   @param[in, out] PpiFlags            The physical presence interface flags.\r
-  \r
+\r
   @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE  Unknown physical presence operation.\r
-  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE  Error occurred during sending command to TPM or \r
+  @retval TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE  Error occurred during sending command to TPM or\r
                                                   receiving response from TPM.\r
   @retval Others                                  Return code from the TPM device after command execution.\r
 \r
@@ -397,7 +397,7 @@ ExecutePhysicalPresence (
     case PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE:\r
       PpiFlags->PPFlags |= TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_MAINTENANCE;\r
       return 0;\r
-  \r
+\r
     case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR:\r
       //\r
       // PHYSICAL_PRESENCE_ENABLE_ACTIVATE + PHYSICAL_PRESENCE_CLEAR\r
@@ -423,7 +423,7 @@ ExecutePhysicalPresence (
       } else {\r
         TpmResponse = ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE, PpiFlags);\r
         PpiFlags->PPFlags &= ~TCG_VENDOR_LIB_FLAG_RESET_TRACK;\r
-      } \r
+      }\r
       return TpmResponse;\r
 \r
     default:\r
@@ -453,7 +453,7 @@ ReadUserKey (
   UINT16                            InputKey;\r
   UINTN                             Index;\r
 \r
-  InputKey = 0; \r
+  InputKey = 0;\r
   do {\r
     Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
     if (Status == EFI_NOT_READY) {\r
@@ -479,18 +479,18 @@ ReadUserKey (
   if (InputKey != SCAN_ESC) {\r
     return TRUE;\r
   }\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
 /**\r
   The constructor function register UNI strings into imageHandle.\r
-  \r
-  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. \r
+\r
+  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
 \r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor successfully added string package.\r
   @retval Other value   The constructor can't add string package.\r
 \r
@@ -523,12 +523,12 @@ UserConfirm (
 {\r
   CHAR16                            *ConfirmText;\r
   CHAR16                            *TmpStr1;\r
-  CHAR16                            *TmpStr2; \r
+  CHAR16                            *TmpStr2;\r
   UINTN                             BufSize;\r
   BOOLEAN                           CautionKey;\r
   UINT16                            Index;\r
   CHAR16                            DstStr[81];\r
-    \r
+\r
   TmpStr2     = NULL;\r
   CautionKey  = FALSE;\r
   BufSize     = CONFIRM_BUFFER_SIZE;\r
@@ -538,7 +538,7 @@ UserConfirm (
   switch (TpmPpCommand) {\r
     case PHYSICAL_PRESENCE_ENABLE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_ENABLE));\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
@@ -550,7 +550,7 @@ UserConfirm (
 \r
     case PHYSICAL_PRESENCE_DISABLE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_DISABLE));\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
@@ -563,10 +563,10 @@ UserConfirm (
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
       break;\r
-      \r
+\r
     case PHYSICAL_PRESENCE_ACTIVATE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_ACTIVATE));\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
@@ -589,7 +589,7 @@ UserConfirm (
 \r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_ACCEPT_KEY));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1); \r
+      FreePool (TmpStr1);\r
       break;\r
 \r
     case PHYSICAL_PRESENCE_CLEAR:\r
@@ -603,7 +603,7 @@ UserConfirm (
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CLEAR));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), L" \n\n", (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1);      \r
+      FreePool (TmpStr1);\r
 \r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_CAUTION_KEY));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
@@ -628,15 +628,15 @@ UserConfirm (
 \r
     case PHYSICAL_PRESENCE_DEACTIVATE_DISABLE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_DEACTIVATE_DISABLE));\r
-      \r
-      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));      \r
+\r
+      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
 \r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_NOTE_OFF));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
@@ -648,8 +648,8 @@ UserConfirm (
 \r
     case PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_ALLOW_TAKE_OWNERSHIP));\r
-      \r
-      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));      \r
+\r
+      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
 \r
@@ -660,8 +660,8 @@ UserConfirm (
 \r
     case PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_DISALLOW_TAKE_OWNERSHIP));\r
-      \r
-      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));      \r
+\r
+      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
 \r
@@ -688,15 +688,15 @@ UserConfirm (
 \r
     case PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE:\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_TURN_OFF));\r
-      \r
-      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));      \r
+\r
+      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
 \r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_NOTE_OFF));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
@@ -709,11 +709,11 @@ UserConfirm (
     case PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE:\r
       CautionKey = TRUE;\r
       TmpStr2 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_UNOWNED_FIELD_UPGRADE));\r
-      \r
-      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_UPGRADE_HEAD_STR));      \r
+\r
+      TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_UPGRADE_HEAD_STR));\r
       UnicodeSPrint (ConfirmText, BufSize, TmpStr1, TmpStr2);\r
       FreePool (TmpStr1);\r
-      \r
+\r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_MAINTAIN));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       FreePool (TmpStr1);\r
@@ -787,7 +787,7 @@ UserConfirm (
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_WARNING_CLEAR));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), L" \n\n", (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
-      FreePool (TmpStr1); \r
+      FreePool (TmpStr1);\r
 \r
       TmpStr1 = PhysicalPresenceGetStringById (STRING_TOKEN (TPM_CAUTION_KEY));\r
       StrnCatS (ConfirmText, BufSize / sizeof (CHAR16), TmpStr1, (BufSize / sizeof (CHAR16)) - StrLen (ConfirmText) - 1);\r
@@ -877,10 +877,10 @@ UserConfirm (
 \r
   DstStr[80] = L'\0';\r
   for (Index = 0; Index < StrLen (ConfirmText); Index += 80) {\r
-    StrnCpyS(DstStr, sizeof (DstStr) / sizeof (CHAR16), ConfirmText + Index, sizeof (DstStr) / sizeof (CHAR16) - 1);    \r
-    Print (DstStr);    \r
+    StrnCpyS(DstStr, sizeof (DstStr) / sizeof (CHAR16), ConfirmText + Index, sizeof (DstStr) / sizeof (CHAR16) - 1);\r
+    Print (DstStr);\r
   }\r
-  \r
+\r
   FreePool (TmpStr1);\r
   FreePool (TmpStr2);\r
   FreePool (ConfirmText);\r
@@ -889,17 +889,17 @@ UserConfirm (
     return TRUE;\r
   }\r
 \r
-  return FALSE;  \r
+  return FALSE;\r
 }\r
 \r
 /**\r
-  Check if there is a valid physical presence command request. Also updates parameter value \r
+  Check if there is a valid physical presence command request. Also updates parameter value\r
   to whether the requested physical presence command already confirmed by user\r
\r
+\r
    @param[in]  TcgPpData           EFI TCG Physical Presence request data.\r
-   @param[in]  Flags               The physical presence interface flags. \r
+   @param[in]  Flags               The physical presence interface flags.\r
    @param[out] RequestConfirmed    If the physical presence operation command required user confirm from UI.\r
-                                   True, it indicates the command doesn't require user confirm, or already confirmed \r
+                                   True, it indicates the command doesn't require user confirm, or already confirmed\r
                                    in last boot cycle by user.\r
                                    False, it indicates the command need user confirm from UI.\r
 \r
@@ -1006,7 +1006,7 @@ HaveValidTpmRequest  (
   TcgPpData variable is external input, so this function will validate\r
   its data structure to be valid value.\r
 \r
-  @param[in] TcgProtocol          EFI TCG Protocol instance. \r
+  @param[in] TcgProtocol          EFI TCG Protocol instance.\r
   @param[in] TcgPpData            Point to the physical presence NV variable.\r
   @param[in] Flags                The physical presence interface flags.\r
 \r
@@ -1052,7 +1052,7 @@ ExecutePendingTpmRequest (
   } else {\r
     if (!RequestConfirmed) {\r
       //\r
-      // Print confirm text and wait for approval. \r
+      // Print confirm text and wait for approval.\r
       //\r
       RequestConfirmed = UserConfirm (TcgPpData->PPRequest);\r
     }\r
@@ -1077,18 +1077,18 @@ ExecutePendingTpmRequest (
                       EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
                       sizeof (EFI_PHYSICAL_PRESENCE_FLAGS),\r
                       &NewFlags\r
-                      ); \r
+                      );\r
     if (EFI_ERROR (Status)) {\r
       return;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Clear request\r
   //\r
   if ((NewFlags.PPFlags & TCG_VENDOR_LIB_FLAG_RESET_TRACK) == 0) {\r
     TcgPpData->LastPPRequest = TcgPpData->PPRequest;\r
-    TcgPpData->PPRequest = PHYSICAL_PRESENCE_NO_ACTION;    \r
+    TcgPpData->PPRequest = PHYSICAL_PRESENCE_NO_ACTION;\r
   }\r
 \r
   //\r
@@ -1124,7 +1124,7 @@ ExecutePendingTpmRequest (
     case PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE:\r
     case PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE:\r
     case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR:\r
-    case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE:      \r
+    case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE:\r
       break;\r
     default:\r
       if (TcgPpData->LastPPRequest >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {\r
@@ -1142,21 +1142,21 @@ ExecutePendingTpmRequest (
 \r
   Print (L"Rebooting system to make TPM settings in effect\n");\r
   gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);\r
-  ASSERT (FALSE);  \r
+  ASSERT (FALSE);\r
 }\r
 \r
 /**\r
   Check and execute the pending TPM request and Lock TPM.\r
 \r
-  The TPM request may come from OS or BIOS. This API will display request information and wait \r
+  The TPM request may come from OS or BIOS. This API will display request information and wait\r
   for user confirmation if TPM request exists. The TPM request will be sent to TPM device after\r
-  the TPM request is confirmed, and one or more reset may be required to make TPM request to \r
+  the TPM request is confirmed, and one or more reset may be required to make TPM request to\r
   take effect. At last, it will lock TPM to prevent TPM state change by malware.\r
-  \r
+\r
   This API should be invoked after console in and console out are all ready as they are required\r
-  to display request information and get user input to confirm the request. This API should also \r
+  to display request information and get user input to confirm the request. This API should also\r
   be invoked as early as possible as TPM is locked in this function.\r
-  \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1172,7 +1172,7 @@ TcgPhysicalPresenceLibProcessRequest (
   EFI_TCG_PROTOCOL                  *TcgProtocol;\r
   EDKII_VARIABLE_LOCK_PROTOCOL      *VariableLockProtocol;\r
   EFI_PHYSICAL_PRESENCE_FLAGS       PpiFlags;\r
-  \r
+\r
   Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);\r
   if (EFI_ERROR (Status)) {\r
     return ;\r
@@ -1206,7 +1206,7 @@ TcgPhysicalPresenceLibProcessRequest (
   DEBUG ((EFI_D_INFO, "[TPM] PpiFlags = %x\n", PpiFlags.PPFlags));\r
 \r
   //\r
-  // This flags variable controls whether physical presence is required for TPM command. \r
+  // This flags variable controls whether physical presence is required for TPM command.\r
   // It should be protected from malicious software. We set it as read-only variable here.\r
   //\r
   Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **)&VariableLockProtocol);\r
@@ -1221,7 +1221,7 @@ TcgPhysicalPresenceLibProcessRequest (
       ASSERT_EFI_ERROR (Status);\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Initialize physical presence variable.\r
   //\r
@@ -1262,7 +1262,7 @@ TcgPhysicalPresenceLibProcessRequest (
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   if (!CmdEnable) {\r
     if (LifetimeLock) {\r
       //\r
@@ -1275,7 +1275,7 @@ TcgPhysicalPresenceLibProcessRequest (
       return ;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Set operator physical presence flags\r
   //\r
@@ -1283,7 +1283,7 @@ TcgPhysicalPresenceLibProcessRequest (
 \r
   //\r
   // Execute pending TPM request.\r
-  //  \r
+  //\r
   ExecutePendingTpmRequest (TcgProtocol, &TcgPpData, PpiFlags);\r
   DEBUG ((EFI_D_INFO, "[TPM] PPResponse = %x\n", TcgPpData.PPResponse));\r
 \r
@@ -1298,7 +1298,7 @@ TcgPhysicalPresenceLibProcessRequest (
 \r
   The TPM request may come from OS. This API will check if TPM request exists and need user\r
   input to confirmation.\r
-  \r
+\r
   @retval    TRUE        TPM needs input to confirm user physical presence.\r
   @retval    FALSE       TPM doesn't need input to confirm user physical presence.\r
 \r
@@ -1317,7 +1317,7 @@ TcgPhysicalPresenceLibNeedUserConfirm(
   BOOLEAN                      CmdEnable;\r
   EFI_TCG_PROTOCOL             *TcgProtocol;\r
   EFI_PHYSICAL_PRESENCE_FLAGS  PpiFlags;\r
-  \r
+\r
   Status = gBS->LocateProtocol (&gEfiTcgProtocolGuid, NULL, (VOID **)&TcgProtocol);\r
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
@@ -1349,7 +1349,7 @@ TcgPhysicalPresenceLibNeedUserConfirm(
   if (EFI_ERROR (Status)) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   if (TcgPpData.PPRequest == PHYSICAL_PRESENCE_NO_ACTION) {\r
     //\r
     // No operation request\r
index 3aacba5c2b19b91360005c782caf567ec3671ba3..bf7e16ccb788b2064d436b08c7b37c430b9568b3 100644 (file)
@@ -2,14 +2,14 @@
 #  Executes pending TPM 1.2 requests from OS or BIOS and Locks TPM\r
 #\r
 #  This library will check and execute TPM 1.2 request from OS or BIOS. The request may\r
-#  ask for user confirmation before execution. This Library will also lock TPM physical \r
+#  ask for user confirmation before execution. This Library will also lock TPM physical\r
 #  presence at last.\r
 #\r
 #  Caution: This module requires additional review when modified.\r
 #  This driver will have external input - variable.\r
 #  This external input must be validated carefully to avoid security issue.\r
 #\r
-# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -26,9 +26,9 @@
   FILE_GUID                      = EBC43A46-34AC-4F07-A7F5-A5394619361C\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = TcgPhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = TcgPhysicalPresenceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = TcgPhysicalPresenceLibConstructor\r
-  \r
+\r
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r
index 26f8dd3e998af5279e6a8692779dc2179285fd6c..1d238918b160f349b9d8f12d7adbb976e98bf7ea 100644 (file)
@@ -4,12 +4,12 @@
 // This library will check and execute TPM 1.2 request from OS or BIOS. The request may\r
 // ask for user confirmation before execution. This Library will also lock TPM physical\r
 // presence at last.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - variable.\r
 // This external input must be validated carefully to avoid security issue.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 065cd63be1e67e9543743f7c96042baef3a4cebd..91995f85ef6ac1174380156e38e0c142d11f277a 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   String definitions for TPM 1.2 physical presence confirm text.\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,8 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string TPM_PPI_HEAD_STR              #language en-US    "A configuration change was requested to allow the Operating System to %s the computer's TPM (Trusted Platform Module) without asking for user confirmation in the future.\n\n"\r
 #string TPM_UPGRADE_HEAD_STR          #language en-US    "A configuration change was requested to %s to the TPM's (Trusted Platform Module) firmware.\n\n"\r
 \r
-#string TPM_ACCEPT_KEY                #language en-US    "Press F10 " \r
-#string TPM_CAUTION_KEY               #language en-US    "Press F12 " \r
+#string TPM_ACCEPT_KEY                #language en-US    "Press F10 "\r
+#string TPM_CAUTION_KEY               #language en-US    "Press F12 "\r
 #string TPM_REJECT_KEY                #language en-US    "to %s the TPM \nPress ESC to reject this change request and continue\n"\r
 \r
 #string TPM_ENABLE                    #language en-US    "enable"\r
index aacafa83b3498964d5d208a443a9e5f2516b239d..96f905aaad2796053087b3f7b9326964e1b92827 100644 (file)
   Tcg2MeasureGptTable() function will receive untrusted GPT partition table, and parse\r
   partition data carefully.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -70,11 +70,11 @@ MEASURED_HOB_DATA                 *mTcg2MeasuredHobData     = NULL;
 \r
   @param  FileHandle      Pointer to the file handle to read the PE/COFF image.\r
   @param  FileOffset      Offset into the PE/COFF image to begin the read operation.\r
-  @param  ReadSize        On input, the size in bytes of the requested read operation.  \r
+  @param  ReadSize        On input, the size in bytes of the requested read operation.\r
                           On output, the number of bytes actually read.\r
   @param  Buffer          Output buffer that contains the data read from the PE/COFF image.\r
-  \r
-  @retval EFI_SUCCESS     The specified portion of the PE/COFF image was read and the size \r
+\r
+  @retval EFI_SUCCESS     The specified portion of the PE/COFF image was read and the size\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -157,11 +157,11 @@ Tcg2MeasureGptTable (
   }\r
   //\r
   // Read the EFI Partition Table Header\r
-  //  \r
+  //\r
   PrimaryHeader = (EFI_PARTITION_TABLE_HEADER *) AllocatePool (BlockIo->Media->BlockSize);\r
   if (PrimaryHeader == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
-  }  \r
+  }\r
   Status = DiskIo->ReadDisk (\r
                      DiskIo,\r
                      BlockIo->Media->MediaId,\r
@@ -173,7 +173,7 @@ Tcg2MeasureGptTable (
     DEBUG ((EFI_D_ERROR, "Failed to Read Partition Table Header!\n"));\r
     FreePool (PrimaryHeader);\r
     return EFI_DEVICE_ERROR;\r
-  }  \r
+  }\r
   //\r
   // Read the partition entry.\r
   //\r
@@ -194,7 +194,7 @@ Tcg2MeasureGptTable (
     FreePool (EntryPtr);\r
     return EFI_DEVICE_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Count the valid partition\r
   //\r
@@ -202,15 +202,15 @@ Tcg2MeasureGptTable (
   NumberOfPartition = 0;\r
   for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {\r
     if (!IsZeroGuid (&PartitionEntry->PartitionTypeGUID)) {\r
-      NumberOfPartition++;  \r
+      NumberOfPartition++;\r
     }\r
     PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);\r
   }\r
 \r
   //\r
   // Prepare Data for Measurement\r
-  // \r
-  EventSize = (UINT32)(sizeof (EFI_GPT_DATA) - sizeof (GptData->Partitions) \r
+  //\r
+  EventSize = (UINT32)(sizeof (EFI_GPT_DATA) - sizeof (GptData->Partitions)\r
                         + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry);\r
   Tcg2Event = (EFI_TCG2_EVENT *) AllocateZeroPool (EventSize + sizeof (EFI_TCG2_EVENT) - sizeof(Tcg2Event->Event));\r
   if (Tcg2Event == NULL) {\r
@@ -224,11 +224,11 @@ Tcg2MeasureGptTable (
   Tcg2Event->Header.HeaderVersion = EFI_TCG2_EVENT_HEADER_VERSION;\r
   Tcg2Event->Header.PCRIndex      = 5;\r
   Tcg2Event->Header.EventType     = EV_EFI_GPT_EVENT;\r
-  GptData = (EFI_GPT_DATA *) Tcg2Event->Event;  \r
+  GptData = (EFI_GPT_DATA *) Tcg2Event->Event;\r
 \r
   //\r
   // Copy the EFI_PARTITION_TABLE_HEADER and NumberOfPartition\r
-  //  \r
+  //\r
   CopyMem ((UINT8 *)GptData, (UINT8*)PrimaryHeader, sizeof (EFI_PARTITION_TABLE_HEADER));\r
   GptData->NumberOfPartitions = NumberOfPartition;\r
   //\r
@@ -286,7 +286,7 @@ Tcg2MeasureGptTable (
 \r
   @retval EFI_SUCCESS            Successfully measure image.\r
   @retval EFI_OUT_OF_RESOURCES   No enough resource to measure image.\r
-  @retval EFI_UNSUPPORTED        ImageType is unsupported or PE image is mal-format.  \r
+  @retval EFI_UNSUPPORTED        ImageType is unsupported or PE image is mal-format.\r
   @retval other error value\r
 \r
 **/\r
@@ -381,27 +381,27 @@ Finish:
 }\r
 \r
 /**\r
-  The security handler is used to abstract platform-specific policy \r
-  from the DXE core response to an attempt to use a file that returns a \r
-  given status for the authentication check from the section extraction protocol.  \r
+  The security handler is used to abstract platform-specific policy\r
+  from the DXE core response to an attempt to use a file that returns a\r
+  given status for the authentication check from the section extraction protocol.\r
 \r
-  The possible responses in a given SAP implementation may include locking \r
-  flash upon failure to authenticate, attestation logging for all signed drivers, \r
-  and other exception operations.  The File parameter allows for possible logging \r
+  The possible responses in a given SAP implementation may include locking\r
+  flash upon failure to authenticate, attestation logging for all signed drivers,\r
+  and other exception operations.  The File parameter allows for possible logging\r
   within the SAP of the driver.\r
 \r
   If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
+  If the file specified by File with an authentication status specified by\r
   AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use under any circumstances,\r
   then EFI_ACCESS_DENIED is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use right now, but it \r
-  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use right now, but it\r
+  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is\r
   returned.\r
 \r
   @param[in]      AuthenticationStatus  This is the authentication status returned\r
@@ -453,7 +453,7 @@ DxeTpm2MeasureBootHandler (
 \r
   ProtocolCapability.Size = (UINT8) sizeof (ProtocolCapability);\r
   Status = Tcg2Protocol->GetCapability (\r
-                           Tcg2Protocol, \r
+                           Tcg2Protocol,\r
                            &ProtocolCapability\r
                            );\r
   if (EFI_ERROR (Status) || (!ProtocolCapability.TPMPresentFlag)) {\r
@@ -468,7 +468,7 @@ DxeTpm2MeasureBootHandler (
   // Copy File Device Path\r
   //\r
   OrigDevicePathNode = DuplicateDevicePath (File);\r
-  \r
+\r
   //\r
   // 1. Check whether this device path support BlockIo protocol.\r
   // Is so, this device path may be a GPT device path.\r
@@ -489,8 +489,8 @@ DxeTpm2MeasureBootHandler (
             DevicePathSubType (DevicePathNode) == MEDIA_HARDDRIVE_DP) {\r
         //\r
         // Check whether it is a gpt partition or not\r
-        //                           \r
-        if (((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->MBRType == MBR_TYPE_EFI_PARTITION_TABLE_HEADER && \r
+        //\r
+        if (((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->MBRType == MBR_TYPE_EFI_PARTITION_TABLE_HEADER &&\r
             ((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->SignatureType == SIGNATURE_TYPE_GUID) {\r
 \r
           //\r
@@ -526,7 +526,7 @@ DxeTpm2MeasureBootHandler (
       DevicePathNode    = NextDevicePathNode (DevicePathNode);\r
     }\r
   }\r
-  \r
+\r
   //\r
   // 2. Measure PE image.\r
   //\r
@@ -560,7 +560,7 @@ DxeTpm2MeasureBootHandler (
       TempHandle = Handle;\r
       do {\r
         Status = gBS->HandleProtocol(\r
-                        TempHandle, \r
+                        TempHandle,\r
                         &gEfiFirmwareVolumeBlockProtocolGuid,\r
                         (VOID**)&FvbProtocol\r
                         );\r
@@ -619,16 +619,16 @@ DxeTpm2MeasureBootHandler (
     //\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Measure only application if Application flag is set\r
   // Measure drivers and applications if Application flag is not set\r
   //\r
-  if ((!ApplicationRequired) || \r
-        (ApplicationRequired && ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)) {  \r
+  if ((!ApplicationRequired) ||\r
+        (ApplicationRequired && ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)) {\r
     //\r
     // Print the image path to be measured.\r
-    //    \r
+    //\r
     DEBUG_CODE_BEGIN ();\r
       CHAR16                            *ToText;\r
       ToText = ConvertDevicePathToText (\r
@@ -647,10 +647,10 @@ DxeTpm2MeasureBootHandler (
     //\r
     Status = Tcg2MeasurePeImage (\r
                Tcg2Protocol,\r
-               (EFI_PHYSICAL_ADDRESS) (UINTN) FileBuffer, \r
-               FileSize, \r
-               (UINTN) ImageContext.ImageAddress, \r
-               ImageContext.ImageType, \r
+               (EFI_PHYSICAL_ADDRESS) (UINTN) FileBuffer,\r
+               FileSize,\r
+               (UINTN) ImageContext.ImageAddress,\r
+               ImageContext.ImageType,\r
                DevicePathNode\r
                );\r
     DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2MeasurePeImage - %r\n", Status));\r
index 939f6fb19be22cfcd1e52edad1e1541443d17017..e5aaba2407af15fdd9d8cc6471be8a38028c13ad 100644 (file)
@@ -4,15 +4,15 @@
 #  Spec Compliance Info:\r
 #    "TCG PC Client Platform Firmware Profile Specification for TPM Family 2.0 Level 00 Revision 00.21"\r
 #\r
-#  This library instance hooks LoadImage() API to measure every image that \r
+#  This library instance hooks LoadImage() API to measure every image that\r
 #  is not measured in PEI phase. And, it will also measure GPT partition.\r
 #\r
 #  Caution: This module requires additional review when modified.\r
 #  This library will have external input - PE/COFF image and GPT partition.\r
-#  This external input must be validated carefully to avoid security issues such \r
+#  This external input must be validated carefully to avoid security issues such\r
 #  as buffer overflow or integer overflow.\r
 #\r
-# Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -29,7 +29,7 @@
   FILE_GUID                      = 778CE4F4-36BD-4ae7-B8F0-10B420B0D174\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = DxeTpm2MeasureBootLibConstructor\r
 \r
 #\r
index 260dd04481b7c7f1e46d7dc4df11ceb08ac0deba..20f7453098499188d259208cc39684f7bdb280c1 100644 (file)
@@ -3,13 +3,13 @@
 //\r
 // This library instance hooks LoadImage() API to measure every image that\r
 // is not measured in PEI phase. And, it will also measure GPT partition.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This library will have external input - PE/COFF image and GPT partition.\r
 // This external input must be validated carefully to avoid security issues such\r
 // as buffer overflow or integer overflow.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 8167a21929097353856ce05736301f8a45502330..c54ab62e2745ea5f1c6b66b14081504916e13747 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  The library instance provides security service of TPM measure boot.  \r
+  The library instance provides security service of TPM measure boot.\r
 \r
   Caution: This file requires additional review when modified.\r
   This library will have external input - PE/COFF image and GPT partition.\r
   TcgMeasureGptTable() function will receive untrusted GPT partition table, and parse\r
   partition data carefully.\r
 \r
-Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -68,11 +68,11 @@ MEASURED_HOB_DATA                 *mMeasuredHobData     = NULL;
 \r
   @param  FileHandle      Pointer to the file handle to read the PE/COFF image.\r
   @param  FileOffset      Offset into the PE/COFF image to begin the read operation.\r
-  @param  ReadSize        On input, the size in bytes of the requested read operation.  \r
+  @param  ReadSize        On input, the size in bytes of the requested read operation.\r
                           On output, the number of bytes actually read.\r
   @param  Buffer          Output buffer that contains the data read from the PE/COFF image.\r
-  \r
-  @retval EFI_SUCCESS     The specified portion of the PE/COFF image was read and the size \r
+\r
+  @retval EFI_SUCCESS     The specified portion of the PE/COFF image was read and the size\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -157,11 +157,11 @@ TcgMeasureGptTable (
   }\r
   //\r
   // Read the EFI Partition Table Header\r
-  //  \r
+  //\r
   PrimaryHeader = (EFI_PARTITION_TABLE_HEADER *) AllocatePool (BlockIo->Media->BlockSize);\r
   if (PrimaryHeader == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
-  }  \r
+  }\r
   Status = DiskIo->ReadDisk (\r
                      DiskIo,\r
                      BlockIo->Media->MediaId,\r
@@ -173,7 +173,7 @@ TcgMeasureGptTable (
     DEBUG ((EFI_D_ERROR, "Failed to Read Partition Table Header!\n"));\r
     FreePool (PrimaryHeader);\r
     return EFI_DEVICE_ERROR;\r
-  }  \r
+  }\r
   //\r
   // Read the partition entry.\r
   //\r
@@ -194,7 +194,7 @@ TcgMeasureGptTable (
     FreePool (EntryPtr);\r
     return EFI_DEVICE_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Count the valid partition\r
   //\r
@@ -202,15 +202,15 @@ TcgMeasureGptTable (
   NumberOfPartition = 0;\r
   for (Index = 0; Index < PrimaryHeader->NumberOfPartitionEntries; Index++) {\r
     if (!IsZeroGuid (&PartitionEntry->PartitionTypeGUID)) {\r
-      NumberOfPartition++;  \r
+      NumberOfPartition++;\r
     }\r
     PartitionEntry = (EFI_PARTITION_ENTRY *)((UINT8 *)PartitionEntry + PrimaryHeader->SizeOfPartitionEntry);\r
   }\r
 \r
   //\r
   // Prepare Data for Measurement\r
-  // \r
-  EventSize = (UINT32)(sizeof (EFI_GPT_DATA) - sizeof (GptData->Partitions) \r
+  //\r
+  EventSize = (UINT32)(sizeof (EFI_GPT_DATA) - sizeof (GptData->Partitions)\r
                         + NumberOfPartition * PrimaryHeader->SizeOfPartitionEntry);\r
   TcgEvent = (TCG_PCR_EVENT *) AllocateZeroPool (EventSize + sizeof (TCG_PCR_EVENT_HDR));\r
   if (TcgEvent == NULL) {\r
@@ -222,11 +222,11 @@ TcgMeasureGptTable (
   TcgEvent->PCRIndex   = 5;\r
   TcgEvent->EventType  = EV_EFI_GPT_EVENT;\r
   TcgEvent->EventSize  = EventSize;\r
-  GptData = (EFI_GPT_DATA *) TcgEvent->Event;  \r
+  GptData = (EFI_GPT_DATA *) TcgEvent->Event;\r
 \r
   //\r
   // Copy the EFI_PARTITION_TABLE_HEADER and NumberOfPartition\r
-  //  \r
+  //\r
   CopyMem ((UINT8 *)GptData, (UINT8*)PrimaryHeader, sizeof (EFI_PARTITION_TABLE_HEADER));\r
   GptData->NumberOfPartitions = NumberOfPartition;\r
   //\r
@@ -278,7 +278,7 @@ TcgMeasureGptTable (
   PE/COFF image is external input, so this function will validate its data structure\r
   within this image buffer before use.\r
 \r
-  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in \r
+  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in\r
   its caller function DxeTpmMeasureBootHandler().\r
 \r
   @param[in] TcgProtocol    Pointer to the located TCG protocol instance.\r
@@ -290,7 +290,7 @@ TcgMeasureGptTable (
 \r
   @retval EFI_SUCCESS            Successfully measure image.\r
   @retval EFI_OUT_OF_RESOURCES   No enough resource to measure image.\r
-  @retval EFI_UNSUPPORTED        ImageType is unsupported or PE image is mal-format.  \r
+  @retval EFI_UNSUPPORTED        ImageType is unsupported or PE image is mal-format.\r
   @retval other error value\r
 \r
 **/\r
@@ -420,8 +420,8 @@ TcgMeasurePeImage (
   //\r
   if (Hdr.Pe32->FileHeader.Machine == IMAGE_FILE_MACHINE_IA64 && Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
     //\r
-    // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value \r
-    //       in the PE/COFF Header. If the MachineType is Itanium(IA64) and the \r
+    // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value\r
+    //       in the PE/COFF Header. If the MachineType is Itanium(IA64) and the\r
     //       Magic value in the OptionalHeader is EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC\r
     //       then override the magic value to EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC\r
     //\r
@@ -432,7 +432,7 @@ TcgMeasurePeImage (
     //\r
     Magic = Hdr.Pe32->OptionalHeader.Magic;\r
   }\r
-  \r
+\r
   //\r
   // 3.  Calculate the distance from the base of the image header to the image checksum address.\r
   // 4.  Hash the image header from its base to beginning of the image checksum.\r
@@ -455,7 +455,7 @@ TcgMeasurePeImage (
   HashStatus = Sha1Update (Sha1Ctx, HashBase, HashSize);\r
   if (!HashStatus) {\r
     goto Finish;\r
-  }  \r
+  }\r
 \r
   //\r
   // 5.  Skip over the image checksum (it occupies a single ULONG).\r
@@ -484,7 +484,7 @@ TcgMeasurePeImage (
       if (!HashStatus) {\r
         goto Finish;\r
       }\r
-    }    \r
+    }\r
   } else {\r
     //\r
     // 7.  Hash everything from the end of the checksum to the start of the Cert Directory.\r
@@ -498,7 +498,7 @@ TcgMeasurePeImage (
     } else {\r
       //\r
       // Use PE32+ offset\r
-      //    \r
+      //\r
       HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32);\r
       HashSize = (UINTN) (&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY]) - (UINTN) HashBase;\r
     }\r
@@ -527,7 +527,7 @@ TcgMeasurePeImage (
       HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY + 1];\r
       HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress);\r
     }\r
-    \r
+\r
     if (HashSize != 0) {\r
       HashStatus  = Sha1Update (Sha1Ctx, HashBase, HashSize);\r
       if (!HashStatus) {\r
@@ -690,27 +690,27 @@ Finish:
 }\r
 \r
 /**\r
-  The security handler is used to abstract platform-specific policy \r
-  from the DXE core response to an attempt to use a file that returns a \r
-  given status for the authentication check from the section extraction protocol.  \r
+  The security handler is used to abstract platform-specific policy\r
+  from the DXE core response to an attempt to use a file that returns a\r
+  given status for the authentication check from the section extraction protocol.\r
 \r
-  The possible responses in a given SAP implementation may include locking \r
-  flash upon failure to authenticate, attestation logging for all signed drivers, \r
-  and other exception operations.  The File parameter allows for possible logging \r
+  The possible responses in a given SAP implementation may include locking\r
+  flash upon failure to authenticate, attestation logging for all signed drivers,\r
+  and other exception operations.  The File parameter allows for possible logging\r
   within the SAP of the driver.\r
 \r
   If File is NULL, then EFI_INVALID_PARAMETER is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
+  If the file specified by File with an authentication status specified by\r
   AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use under any circumstances, \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use under any circumstances,\r
   then EFI_ACCESS_DENIED is returned.\r
 \r
-  If the file specified by File with an authentication status specified by \r
-  AuthenticationStatus is not safe for the DXE Core to use right now, but it \r
-  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is \r
+  If the file specified by File with an authentication status specified by\r
+  AuthenticationStatus is not safe for the DXE Core to use right now, but it\r
+  might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is\r
   returned.\r
 \r
   @param[in]      AuthenticationStatus  This is the authentication status returned\r
@@ -764,7 +764,7 @@ DxeTpmMeasureBootHandler (
 \r
   ProtocolCapability.Size = (UINT8) sizeof (ProtocolCapability);\r
   Status = TcgProtocol->StatusCheck (\r
-             TcgProtocol, \r
+             TcgProtocol,\r
              &ProtocolCapability,\r
              &TCGFeatureFlags,\r
              &EventLogLocation,\r
@@ -781,7 +781,7 @@ DxeTpmMeasureBootHandler (
   // Copy File Device Path\r
   //\r
   OrigDevicePathNode = DuplicateDevicePath (File);\r
-  \r
+\r
   //\r
   // 1. Check whether this device path support BlockIo protocol.\r
   // Is so, this device path may be a GPT device path.\r
@@ -802,8 +802,8 @@ DxeTpmMeasureBootHandler (
             DevicePathSubType (DevicePathNode) == MEDIA_HARDDRIVE_DP) {\r
         //\r
         // Check whether it is a gpt partition or not\r
-        //                           \r
-        if (((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->MBRType == MBR_TYPE_EFI_PARTITION_TABLE_HEADER && \r
+        //\r
+        if (((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->MBRType == MBR_TYPE_EFI_PARTITION_TABLE_HEADER &&\r
             ((HARDDRIVE_DEVICE_PATH *) DevicePathNode)->SignatureType == SIGNATURE_TYPE_GUID) {\r
 \r
           //\r
@@ -838,7 +838,7 @@ DxeTpmMeasureBootHandler (
       DevicePathNode    = NextDevicePathNode (DevicePathNode);\r
     }\r
   }\r
-  \r
+\r
   //\r
   // 2. Measure PE image.\r
   //\r
@@ -872,7 +872,7 @@ DxeTpmMeasureBootHandler (
       TempHandle = Handle;\r
       do {\r
         Status = gBS->HandleProtocol(\r
-                        TempHandle, \r
+                        TempHandle,\r
                         &gEfiFirmwareVolumeBlockProtocolGuid,\r
                         (VOID**)&FvbProtocol\r
                         );\r
@@ -931,16 +931,16 @@ DxeTpmMeasureBootHandler (
     //\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Measure only application if Application flag is set\r
   // Measure drivers and applications if Application flag is not set\r
   //\r
-  if ((!ApplicationRequired) || \r
-        (ApplicationRequired && ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)) {  \r
+  if ((!ApplicationRequired) ||\r
+        (ApplicationRequired && ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)) {\r
     //\r
     // Print the image path to be measured.\r
-    //    \r
+    //\r
     DEBUG_CODE_BEGIN ();\r
       CHAR16                            *ToText;\r
       ToText = ConvertDevicePathToText (\r
@@ -959,10 +959,10 @@ DxeTpmMeasureBootHandler (
     //\r
     Status = TcgMeasurePeImage (\r
                TcgProtocol,\r
-               (EFI_PHYSICAL_ADDRESS) (UINTN) FileBuffer, \r
-               FileSize, \r
-               (UINTN) ImageContext.ImageAddress, \r
-               ImageContext.ImageType, \r
+               (EFI_PHYSICAL_ADDRESS) (UINTN) FileBuffer,\r
+               FileSize,\r
+               (UINTN) ImageContext.ImageAddress,\r
+               ImageContext.ImageType,\r
                DevicePathNode\r
                );\r
   }\r
index 553e68321e6b1a695928a7a89c47109d3c668add..a2c5847747713f91b515bab988af6bea2d56662e 100644 (file)
@@ -1,15 +1,15 @@
 ## @file\r
 #  Provides security service for TPM 1.2 measured boot\r
 #\r
-#  This library instance hooks LoadImage() API to measure every image that \r
+#  This library instance hooks LoadImage() API to measure every image that\r
 #  is not measured in PEI phase. And, it will also measure GPT partition.\r
 #\r
 #  Caution: This module requires additional review when modified.\r
 #  This library will have external input - PE/COFF image and GPT partition.\r
-#  This external input must be validated carefully to avoid security issues such \r
+#  This external input must be validated carefully to avoid security issues such\r
 #  as buffer overflow or integer overflow.\r
 #\r
-# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -26,7 +26,7 @@
   FILE_GUID                      = 6C60C7D0-922A-4b7c-87D7-E503EDD73BBF\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = NULL|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = DxeTpmMeasureBootLibConstructor\r
 \r
 #\r
index 74d6e76d52a88de5ded4ec310c2d4edde68b71ad..f3f64395f14ca8b28f9b739e2682fdeedeb7d73d 100644 (file)
@@ -3,13 +3,13 @@
 //\r
 // This library instance hooks LoadImage() API to measure every image that\r
 // is not measured in PEI phase. And, it will also measure GPT partition.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This library will have external input - PE/COFF image and GPT partition.\r
 // This external input must be validated carefully to avoid security issues such\r
 // as buffer overflow or integer overflow.\r
 //\r
-// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 7a2ec7f221e5fd04d01552a81f2223c21a560853..8c56a713d8d885d9ccd101e0ee4c39e944f2ee29 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is used by other modules to measure data to TPM.\r
 \r
-Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -171,7 +171,7 @@ Tpm20MeasureAndLogData (
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 TpmMeasureAndLogData (\r
   IN UINT32             PcrIndex,\r
   IN UINT32             EventType,\r
index 410eb788db38f545e3ed9c79808c7516d42e798c..17527ba025a212d5eaf41349a9d5cd754505bbb1 100644 (file)
@@ -1,10 +1,10 @@
 ## @file\r
 #  Provides TPM measurement functions for TPM1.2 and TPM 2.0\r
-# \r
-#  This library provides TpmMeasureAndLogData() to measure and log data, and \r
+#\r
+#  This library provides TpmMeasureAndLogData() to measure and log data, and\r
 #  extend the measurement result into a specific PCR.\r
 #\r
-# Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -20,7 +20,7 @@
   FILE_GUID                      = 30930D10-AF5B-4abf-80E6-EB4FFC0AE9D1\r
   MODULE_TYPE                    = UEFI_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = TpmMeasurementLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = TpmMeasurementLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   MODULE_UNI_FILE                = DxeTpmMeasurementLib.uni\r
 \r
 #\r
index 6dc3508be0898102dc9095c4bf2344e890f4161c..d09b68c8b1540ed3b83914db558c3af7cee6601b 100644 (file)
@@ -2,7 +2,7 @@
   This library is BaseCrypto SHA1 hash instance.\r
   It can be registered to BaseCrypto router, to serve as hash engine.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -118,7 +118,7 @@ Sha1HashFinal (
   Sha1Final (Sha1Ctx, Digest);\r
 \r
   FreePool (Sha1Ctx);\r
-  \r
+\r
   Tpm2SetSha1ToDigestList (DigestList, Digest);\r
 \r
   return EFI_SUCCESS;\r
@@ -133,7 +133,7 @@ HASH_INTERFACE  mSha1InternalHashInstance = {
 \r
 /**\r
   The function register SHA1 instance.\r
-  \r
+\r
   @retval EFI_SUCCESS   SHA1 instance is registered, or system dose not surpport registr SHA1 instance\r
 **/\r
 EFI_STATUS\r
@@ -152,4 +152,4 @@ HashInstanceLibSha1Constructor (
     return EFI_SUCCESS;\r
   }\r
   return Status;\r
-}
\ No newline at end of file
+}\r
index 32e03120be03e0412cd77c56db574ddd9e04d92c..44dc77928e1f576d3ce7c47cf66aec48cdc1717e 100644 (file)
@@ -2,7 +2,7 @@
   This library is BaseCrypto SHA256 hash instance.\r
   It can be registered to BaseCrypto router, to serve as hash engine.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -118,7 +118,7 @@ Sha256HashFinal (
   Sha256Final (Sha256Ctx, Digest);\r
 \r
   FreePool (Sha256Ctx);\r
-  \r
+\r
   Tpm2SetSha256ToDigestList (DigestList, Digest);\r
 \r
   return EFI_SUCCESS;\r
@@ -133,7 +133,7 @@ HASH_INTERFACE  mSha256InternalHashInstance = {
 \r
 /**\r
   The function register SHA256 instance.\r
-  \r
+\r
   @retval EFI_SUCCESS   SHA256 instance is registered, or system dose not surpport registr SHA256 instance\r
 **/\r
 EFI_STATUS\r
@@ -152,4 +152,4 @@ HashInstanceLibSha256Constructor (
     return EFI_SUCCESS;\r
   }\r
   return Status;\r
-}
\ No newline at end of file
+}\r
index 7bb5087550577764f1bcf6c9ef21629da39514ad..73a616a0dfa51945c0561c29dfc5a5b978419c7d 100644 (file)
@@ -3,7 +3,7 @@
   hash handler registerd, such as SHA1, SHA256.\r
   Platform can use PcdTpm2HashMask to mask some hash engines.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -269,16 +269,16 @@ RegisterHashInterfaceLib (
 \r
   CopyMem (&mHashInterface[mHashInterfaceCount], HashInterface, sizeof(*HashInterface));\r
   mHashInterfaceCount ++;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   The constructor function of HashLibBaseCryptoRouterDxe.\r
-  \r
+\r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor executed correctly.\r
 \r
 **/\r
index 6e660d4f14f89e8b5f458257df7e28fedac66177..4e9ce56c69169e5a1eb6010aedfe51ea7cd9cf87 100644 (file)
@@ -2,10 +2,10 @@
 #  Provides hash service by registered hash handler\r
 #\r
 #  This library is BaseCrypto router. It will redirect hash request to each individual\r
-#  hash handler registered, such as SHA1, SHA256. Platform can use PcdTpm2HashMask to \r
+#  hash handler registered, such as SHA1, SHA256. Platform can use PcdTpm2HashMask to\r
 #  mask some hash engines.\r
 #\r
-# Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -22,7 +22,7 @@
   FILE_GUID                      = 158DC712-F15A-44dc-93BB-1675045BE066\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = HashLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = HashLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
   CONSTRUCTOR                    = HashLibBaseCryptoRouterDxeConstructor\r
 \r
 #\r
index bf6e1336ee76bd7ef162e445aa86f4d8eb0cb41a..b9868e6b9d02a20b309ab4f7fa5b553d85266317 100644 (file)
@@ -3,7 +3,7 @@
   hash handler registerd, such as SHA1, SHA256.\r
   Platform can use PcdTpm2HashMask to mask some hash engines.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -374,7 +374,7 @@ RegisterHashInterfaceLib (
 \r
   CopyMem (&HashInterfaceHob->HashInterface[HashInterfaceHob->HashInterfaceCount], HashInterface, sizeof(*HashInterface));\r
   HashInterfaceHob->HashInterfaceCount ++;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
index 018090b8fac32efc19fa598d45545c74ec3e0ff2..20824ce75e41ae6d46e95aa9ac97228a00e8cdb3 100644 (file)
@@ -2,10 +2,10 @@
 #  Provides hash service by registered hash handler\r
 #\r
 #  This library is BaseCrypto router. It will redirect hash request to each individual\r
-#  hash handler registered, such as SHA1, SHA256. Platform can use PcdTpm2HashMask to \r
+#  hash handler registered, such as SHA1, SHA256. Platform can use PcdTpm2HashMask to\r
 #  mask some hash engines.\r
 #\r
-# Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
index cd5dde5be3348b04e14d2d763c8e746fe9be1b16..fac27eef11298170ec9165e6d29bc7c58eacb659 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library uses TPM2 device to calculation hash.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -339,4 +339,4 @@ RegisterHashInterfaceLib (
   )\r
 {\r
   return EFI_UNSUPPORTED;\r
-}
\ No newline at end of file
+}\r
index f807cc7f3d3a8bbe72498a824f171774b4e74a69..db97d4547ddc43cec3a2c4bd24db525ceb573f9d 100644 (file)
@@ -1,10 +1,10 @@
 ## @file\r
 #  Provides hash service using TPM2 device\r
 #\r
-#  This library uses TPM2 device to calculate hash. Platform can use PcdTpm2HashMask to \r
+#  This library uses TPM2 device to calculate hash. Platform can use PcdTpm2HashMask to\r
 #  mask some hash calculation.\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
index 2272308ddca0c99b779a6d52687b162e3d4a9ebe..e059f64c9b143ee952de7b4dca42f068b0acf1ff 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
 \r
-  This library registers RSA 2048 SHA 256 guided section handler \r
+  This library registers RSA 2048 SHA 256 guided section handler\r
   to parse RSA 2048 SHA 256 encapsulation section and extract raw data.\r
   It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -48,7 +48,7 @@ CONST UINT8 mRsaE[] = { 0x01, 0x00, 0x01 };
 /**\r
 \r
   GetInfo gets raw data size and attribute of the input guided section.\r
-  It first checks whether the input guid section is supported. \r
+  It first checks whether the input guid section is supported.\r
   If not, EFI_INVALID_PARAMETER will return.\r
 \r
   @param InputSection       Buffer containing the input GUIDed section to be processed.\r
@@ -56,7 +56,7 @@ CONST UINT8 mRsaE[] = { 0x01, 0x00, 0x01 };
   @param ScratchBufferSize  The size of ScratchBuffer.\r
   @param SectionAttribute   The attribute of the input guided section.\r
 \r
-  @retval EFI_SUCCESS            The size of destination buffer, the size of scratch buffer and \r
+  @retval EFI_SUCCESS            The size of destination buffer, the size of scratch buffer and\r
                                  the attribute of the input section are successfully retrieved.\r
   @retval EFI_INVALID_PARAMETER  The GUID in InputSection does not match this instance guid.\r
 \r
@@ -109,7 +109,7 @@ Rsa2048Sha256GuidedSectionGetInfo (
 \r
   Extraction handler tries to extract raw data from the input guided section.\r
   It also does authentication check for RSA 2048 SHA 256 signature in the input guided section.\r
-  It first checks whether the input guid section is supported. \r
+  It first checks whether the input guid section is supported.\r
   If not, EFI_INVALID_PARAMETER will return.\r
 \r
   @param InputSection    Buffer containing the input GUIDed section to be processed.\r
@@ -140,10 +140,10 @@ Rsa2048Sha256GuidedSectionHandler (
   UINTN                           PublicKeyBufferSize;\r
   VOID                            *HashContext;\r
   VOID                            *Rsa;\r
-  \r
+\r
   HashContext = NULL;\r
   Rsa         = NULL;\r
-  \r
+\r
   if (IS_SECTION2 (InputSection)) {\r
     //\r
     // Check whether the input guid section is recognized.\r
@@ -153,7 +153,7 @@ Rsa2048Sha256GuidedSectionHandler (
         &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-  \r
+\r
     //\r
     // Get the RSA 2048 SHA 256 information.\r
     //\r
@@ -181,7 +181,7 @@ Rsa2048Sha256GuidedSectionHandler (
         &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-  \r
+\r
     //\r
     // Get the RSA 2048 SHA 256 information.\r
     //\r
@@ -206,7 +206,7 @@ Rsa2048Sha256GuidedSectionHandler (
   // All paths from here return EFI_SUCESS and result is returned in AuthenticationStatus\r
   //\r
   Status = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // Fail if the HashType is not SHA 256\r
   //\r
@@ -248,7 +248,7 @@ Rsa2048Sha256GuidedSectionHandler (
     *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Fail if the PublicKey is not one of the public keys in PcdRsa2048Sha256PublicKeyBuffer\r
   //\r
@@ -283,8 +283,8 @@ Rsa2048Sha256GuidedSectionHandler (
     *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;\r
     goto Done;\r
   }\r
-  \r
-  // \r
+\r
+  //\r
   // Set RSA Key Components.\r
   // NOTE: Only N and E are needed to be set as RSA public key for signature verification.\r
   //\r
@@ -331,10 +331,10 @@ Rsa2048Sha256GuidedSectionHandler (
   //\r
   PERF_INMODULE_BEGIN ("PeiRsaVerify");\r
   CryptoStatus = RsaPkcs1Verify (\r
-                   Rsa, \r
-                   Digest, \r
-                   SHA256_DIGEST_SIZE, \r
-                   CertBlockRsa2048Sha256->Signature, \r
+                   Rsa,\r
+                   Digest,\r
+                   SHA256_DIGEST_SIZE,\r
+                   CertBlockRsa2048Sha256->Signature,\r
                    sizeof (CertBlockRsa2048Sha256->Signature)\r
                    );\r
   PERF_INMODULE_END ("PeiRsaVerify");\r
index 3b781c71c7283d5bedc0ee6ab1712316c37e5bfc..d11d7309f9e4790100e3cdea26844535596a33f7 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-#  This library doesn't produce any library class. The constructor function uses \r
+#  This library doesn't produce any library class. The constructor function uses\r
 #  ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided section handler\r
 #  that parses RSA 2048 SHA 256 encapsulation section and extracts raw data.\r
 #\r
 #  It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 #\r
-# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
   PcdLib\r
   PerformanceLib\r
 \r
-[Pcd]  \r
+[Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer      ## SOMETIMES_CONSUMES\r
-  \r
+\r
 [Guids]\r
   gEfiCertTypeRsa2048Sha256Guid  ## PRODUCES     ## UNDEFINED  # Specifies RSA 2048 SHA 256 authentication algorithm.\r
   gEfiHashAlgorithmSha256Guid    ## SOMETIMES_CONSUMES ## UNDEFINED\r
-  
\ No newline at end of file
+\r
index 5a043efbb2e4de8b58ea5066847d65d7c005faad..19131a71ab2152c10b05f85e231183b07d1e0b23 100644 (file)
@@ -3,10 +3,10 @@
 //\r
 // ExtractGuidedSectionLib service to register an RSA 2048 SHA 256 guided section handler\r
 // that parses RSA 2048 SHA 256 encapsulation section and extracts raw data.\r
-// \r
+//\r
 // It uses the BaseCrypyLib based on OpenSSL to authenticate the signature.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index e1907189079dd27e367a05d7408a4c00b4cf84ce..a4c3cb8aeb7c3940cb50f0e3c11aa78520fec7e1 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   Get TPM 2.0 physical presence information.\r
-  \r
+\r
   This library will get TPM 2.0 physical presence information.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -39,7 +39,7 @@ Tcg2PhysicalPresenceLibGetManagementFlags (
   EFI_PEI_READ_ONLY_VARIABLE2_PPI   *VariablePpi;\r
   EFI_TCG2_PHYSICAL_PRESENCE_FLAGS  PpiFlags;\r
   UINTN                             DataSize;\r
-  \r
+\r
   Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
index 6d0b7a00cb0d7655945ef6a14f7d715bacde548d..adcbceedb3501d83736b4f3effa3d60ed1558b32 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 #  This library will get TPM 2.0 physical presence information.\r
 #\r
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -40,7 +40,7 @@
   DebugLib\r
   PeiServicesLib\r
   PeiServicesTablePointerLib\r
-  \r
+\r
 [Guids]\r
   ## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresenceFlags"\r
   gEfiTcg2PhysicalPresenceGuid\r
@@ -49,4 +49,4 @@
   gEfiPeiReadOnlyVariable2PpiGuid       ## CONSUMES\r
 \r
 [Depex]\r
-  gEfiPeiReadOnlyVariable2PpiGuid
\ No newline at end of file
+  gEfiPeiReadOnlyVariable2PpiGuid\r
index b562ca223c584ea8ef00d7322e4559cf547d3d8b..e41cbcbba4372e7065be485e13e86410a3b69a77 100644 (file)
@@ -2,8 +2,8 @@
 // Get TPM 2.0 physical presence information.\r
 //\r
 // This library will get TPM 2.0 physical presence information.\r
-// \r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+//\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 8dc07ec74a10967a7cc7e65ca56a5989a95b591b..0c6ded22f3e6d330889a5eb7000756de6bab28ea 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
-  NULL PlatformSecureLib instance does NOT really detect whether a physical present \r
+  NULL PlatformSecureLib instance does NOT really detect whether a physical present\r
   user exists but return TRUE directly. This instance can be used to verify security\r
   related features during platform enabling and development. It should be replaced\r
   by a platform-specific method(e.g. Button pressed) in a real platform for product.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -20,7 +20,7 @@ BOOLEAN       mUserPhysicalPresence      = FALSE;
 /**\r
 \r
   This function provides a platform-specific method to detect whether the platform\r
-  is operating by a physically present user. \r
+  is operating by a physically present user.\r
 \r
   Programmatic changing of platform security policy (such as disable Secure Boot,\r
   or switch between Standard/Custom Secure Boot mode) MUST NOT be possible during\r
@@ -29,7 +29,7 @@ BOOLEAN       mUserPhysicalPresence      = FALSE;
 \r
   NOTE THAT: This function cannot depend on any EFI Variable Service since they are\r
   not available when this function is called in AuthenticateVariable driver.\r
-  \r
+\r
   @retval  TRUE       The platform is operated by a physically present user.\r
   @retval  FALSE      The platform is NOT operated by a physically present user.\r
 \r
@@ -40,7 +40,7 @@ UserPhysicalPresent (
   VOID\r
   )\r
 {\r
-  return mUserPhysicalPresence;  \r
+  return mUserPhysicalPresence;\r
 }\r
 \r
 \r
index be415f4166bbd428f9d302b2903cdd8c6677f197..2f2ea4fc254c0177be48d426a6c1fce15f23dce8 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
 #  NULL platform secure library instance that alway returns TRUE for a user physical present\r
 #\r
-#  NULL PlatformSecureLib instance does NOT really detect whether a physical present \r
+#  NULL PlatformSecureLib instance does NOT really detect whether a physical present\r
 #  user exists but returns TRUE directly. This instance can be used to verify security\r
 #  related features during platform enabling and development. It should be replaced\r
 #  by a platform-specific method(e.g. Button pressed) in a real platform for product.\r
 #\r
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
index 6a4dce919845c47f6f53c1b497c7b2ca691899b2..ddd223f4d98ca04e858554fc8c6d55828287f9c4 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
   Handle TPM 2.0 physical presence requests from OS.\r
-  \r
+\r
   This library will handle TPM 2.0 physical presence request from OS.\r
 \r
   Caution: This module requires additional review when modified.\r
   will receive untrusted input and do validation.\r
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -151,7 +151,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
                                    DataSize,\r
                                    &PpData\r
                                    );\r
-    if (EFI_ERROR (Status)) { \r
+    if (EFI_ERROR (Status)) {\r
       DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status = %r\n", Status));\r
       ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
       goto EXIT;\r
@@ -203,7 +203,7 @@ EXIT:
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   @param[in]      OperationRequest TPM physical presence operation request.\r
   @param[in]      RequestParameter TPM physical presence operation request parameter.\r
 \r
@@ -233,7 +233,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   @param[in]      OperationRequest TPM physical presence operation request.\r
 \r
   @return Return Code for Get User Confirmation Status for Operation.\r
@@ -249,7 +249,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
   EFI_TCG2_PHYSICAL_PRESENCE        PpData;\r
   EFI_TCG2_PHYSICAL_PRESENCE_FLAGS  Flags;\r
   BOOLEAN                           RequestConfirmed;\r
-  \r
+\r
   DEBUG ((EFI_D_INFO, "[TPM2] GetUserConfirmationStatusFunction, Request = %x\n", OperationRequest));\r
 \r
   //\r
@@ -314,7 +314,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
         RequestConfirmed = TRUE;\r
       }\r
       break;\r
-      \r
+\r
     case TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS:\r
       RequestConfirmed = TRUE;\r
       break;\r
@@ -369,17 +369,17 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
     return TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED;\r
   } else {\r
     return TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED;\r
-  }    \r
+  }\r
 }\r
 \r
 /**\r
   The constructor function locates SmmVariable protocol.\r
-  \r
-  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. \r
+\r
+  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
 \r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor successfully added string package.\r
   @retval Other value   The constructor can't add string package.\r
 **/\r
index 83670971c9df45fed65a36c929e697ff95cb47af..dd46e0ec2171d8e4eec7fb2968abcc2924d8fc38 100644 (file)
@@ -57,4 +57,4 @@
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer  ## CONSUMES\r
 \r
 [Depex]\r
-  gEfiSmmVariableProtocolGuid
\ No newline at end of file
+  gEfiSmmVariableProtocolGuid\r
index 268db455d918189cf70ee20f3dcd71906039f512..e252a82ed73a7190e406a0c7de4d415f5084d19d 100644 (file)
@@ -2,12 +2,12 @@
 // Handle TPM 2.0 physical presence requests from OS.\r
 //\r
 // This library will handle TPM 2.0 physical presence request from OS.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - variable.\r
 // This external input must be validated carefully to avoid security issue.\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 93cb312d90f4bf5a235fd2f3e3b607d42e9c0367..a1ec9e71c5dbfe507f1722149b87654eb5b2f60b 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   NULL Tcg2 PP Vendor library instance that does not support any vendor specific PPI.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,9 +19,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Check and execute the requested physical presence command.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      PlatformAuth     platform auth value. NULL means no platform auth change.\r
@@ -50,7 +50,7 @@ Tcg2PpVendorLibExecutePendingRequest (
   Check if there is a valid physical presence command request.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
   If OperationRequest < 128, then ASSERT().\r
@@ -84,7 +84,7 @@ Tcg2PpVendorLibHasValidRequest (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -113,7 +113,7 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
index f953fe95a7026eef9635ec537d7e189de9c0b3ac..0a1588a9087b4e0678804da87bb85cc4d8723bbf 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  NULL Tcg PP Vendor library instance that does not support any vendor specific PPI\r
 #\r
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -32,6 +32,6 @@
 [Packages]\r
   MdePkg/MdePkg.dec\r
   SecurityPkg/SecurityPkg.dec\r
-  \r
+\r
 [LibraryClasses]\r
-  DebugLib
\ No newline at end of file
+  DebugLib\r
index ddd6d727cc33933290414dd648c39484dd49ed3a..000f2be97e6d71cc190a2f5bfcf5d8d98f1666b7 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   NULL TCG PP Vendor library instance that does not support any vendor specific PPI.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,9 +19,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   Check and execute the requested physical presence command.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -48,7 +48,7 @@ TcgPpVendorLibExecutePendingRequest (
   Check if there is a valid physical presence command request.\r
 \r
   This API should be invoked in BIOS boot phase to process pending request.\r
-  \r
+\r
   Caution: This function may receive untrusted input.\r
 \r
   If OperationRequest < 128, then ASSERT().\r
@@ -82,7 +82,7 @@ TcgPpVendorLibHasValidRequest (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
@@ -109,7 +109,7 @@ TcgPpVendorLibSubmitRequestToPreOSFunction (
   This API should be invoked in OS runtime phase to interface with ACPI method.\r
 \r
   Caution: This function may receive untrusted input.\r
-  \r
+\r
   If OperationRequest < 128, then ASSERT().\r
 \r
   @param[in]      OperationRequest TPM physical presence operation request.\r
index 9674386abd12e5b12365737388b148a1196d246d..db1abb4c53dc76c2dc10b7f75dd513a30edb06d7 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  NULL TCG PP Vendor library instance that does not support any vendor specific PPI\r
 #\r
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -32,6 +32,6 @@
 [Packages]\r
   MdePkg/MdePkg.dec\r
   SecurityPkg/SecurityPkg.dec\r
-  \r
+\r
 [LibraryClasses]\r
-  DebugLib
\ No newline at end of file
+  DebugLib\r
index cf37cad004100837c8ab542c6a290ee3952c4202..4947f4ff27430335f3c2ddd5615b504e6dd38078 100644 (file)
@@ -1143,7 +1143,7 @@ OpalSetLockingSpAuthorityEnabledAndPin(
   ERROR_CHECK(OpalPerformMethod(LockingSpSession, Size, Buf, sizeof(Buf), &ParseStruct, MethodStatus, 0));\r
 \r
   //\r
-  // For Pyrite type SSC, it not supports Active Key. \r
+  // For Pyrite type SSC, it not supports Active Key.\r
   // So here add check logic before enable it.\r
   //\r
   Ret = OpalParseRetrieveGlobalLockingRangeActiveKey(&ParseStruct, &ActiveKey);\r
index e176b00f6bc8f78c2156864637e2fd9a736747aa..40bc2c37118ab0105cfb95b64028262425c88a8a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM1.2 NV storage related command.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. <BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -58,7 +58,7 @@ typedef struct {
 \r
 /**\r
   Send NV DefineSpace command to TPM1.2.\r
-  \r
+\r
   @param PubInfo           The public parameters of the NV area.\r
   @param EncAuth           The encrypted AuthData, only valid if the attributes require subsequent authorization.\r
 \r
@@ -180,7 +180,7 @@ Tpm12NvReadValue (
 \r
 /**\r
   Send NV WriteValue command to TPM1.2.\r
-  \r
+\r
   @param NvIndex           The index of the area to set.\r
   @param Offset            The offset into the NV Area.\r
   @param DataSize          The size of the data parameter.\r
index 0b1bf5c536112e37b5b4a9bcd0cfd6198879cafd..c4bad5ba1bbcda5f3528a98a63c7e6a0516a14b9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM1.2 Ownership related command.\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -52,4 +52,4 @@ Tpm12ForceClear (
   default:\r
     return EFI_DEVICE_ERROR;\r
   }\r
-}
\ No newline at end of file
+}\r
index 30b399499ee0ed923701563c536a001906184e73..949493cae8030187bab495b0d7edfc0044016f1c 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  Provides TPM 1.2 TIS functions\r
-#  \r
-#  This library implements TIS (TPM Interface Specification) functions which is \r
-#  used for every TPM 1.2 command. Choosing this library means platform uses and \r
+#\r
+#  This library implements TIS (TPM Interface Specification) functions which is\r
+#  used for every TPM 1.2 command. Choosing this library means platform uses and\r
 #  only uses TPM 1.2 device.\r
 #\r
-# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -45,4 +45,4 @@
   DebugLib\r
 \r
 [Pcd]\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress               ## CONSUMES
\ No newline at end of file
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress               ## CONSUMES\r
index c392b4b2150e8a63c16b436c78334ad50e8eacce..72802f44cce768eaff22ed36eb3c648e0c13515d 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   TIS (TPM Interface Specification) functions used by TPM1.2.\r
-  \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -52,7 +52,7 @@ Tpm12TisPcPresenceCheck (
   )\r
 {\r
   UINT8                             RegRead;\r
-  \r
+\r
   RegRead = MmioRead8 ((UINTN)&TisReg->Access);\r
   return (BOOLEAN)(RegRead != (UINT8)-1);\r
 }\r
@@ -127,7 +127,7 @@ Tpm12TisPcWaitRegisterBits (
 }\r
 \r
 /**\r
-  Get BurstCount by reading the burstCount field of a TIS regiger \r
+  Get BurstCount by reading the burstCount field of a TIS regiger\r
   in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in]  TisReg                Pointer to TIS register.\r
@@ -171,7 +171,7 @@ Tpm12TisPcReadBurstCount (
 }\r
 \r
 /**\r
-  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY \r
+  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY\r
   to Status Register in time.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -202,7 +202,7 @@ Tpm12TisPcPrepareCommand (
 }\r
 \r
 /**\r
-  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE \r
+  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE\r
   to ACCESS Register in the time of default TIS_TIMEOUT_A.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -218,11 +218,11 @@ Tpm12TisPcRequestUseTpm (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  \r
+\r
   if (TisReg == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!Tpm12TisPcPresenceCheck (TisReg)) {\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -240,12 +240,12 @@ Tpm12TisPcRequestUseTpm (
 /**\r
   Send a command to TPM for execution and return response data.\r
 \r
-  @param[in]      TisReg        TPM register space base address.  \r
-  @param[in]      BufferIn      Buffer for command data.  \r
-  @param[in]      SizeIn        Size of command data.  \r
-  @param[in, out] BufferOut     Buffer for response data.  \r
-  @param[in, out] SizeOut       Size of response data.  \r
\r
+  @param[in]      TisReg        TPM register space base address.\r
+  @param[in]      BufferIn      Buffer for command data.\r
+  @param[in]      SizeIn        Size of command data.\r
+  @param[in, out] BufferOut     Buffer for response data.\r
+  @param[in, out] SizeOut       Size of response data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
   @retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
@@ -422,7 +422,7 @@ Exit:
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 126ec06cbde13a4b677cc1c13d88973588033a5b..e119f8632067e1ba487edc256b67e0c2ddf1d708 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is TPM12 TCG protocol lib.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/TcgService.h>\r
 #include <IndustryStandard/Tpm12.h>\r
 \r
-EFI_TCG_PROTOCOL  *mTcgProtocol = NULL; \r
+EFI_TCG_PROTOCOL  *mTcgProtocol = NULL;\r
 \r
 /**\r
   This service enables the sending of commands to the TPM12.\r
@@ -33,7 +33,7 @@ EFI_TCG_PROTOCOL  *mTcgProtocol = NULL;
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 76ea4924a46b915d5546a5defc37ca00e1f119f3..25b7260f7229442776c8780a90629fdaff4c4f3e 100644 (file)
@@ -4,7 +4,7 @@
 #  This library helps to use TPM 1.2 device in library function API\r
 #  based on TCG protocol.\r
 #\r
-# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -21,7 +21,7 @@
   FILE_GUID                      = 4D8B77D9-E923-48f8-B070-4053D78B7E56\r
   MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = Tpm12DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = Tpm12DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
index b11a8ac3e27db800f4f879c3fe71f8ff0fac8d05..734cea7c1f632305326d705ac0c87dbb73b1311a 100644 (file)
@@ -48,25 +48,25 @@ typedef struct {
 /**\r
   This command returns various information regarding the TPM and its current state.\r
 \r
-  The capability parameter determines the category of data returned. The property parameter \r
-  selects the first value of the selected category to be returned. If there is no property \r
+  The capability parameter determines the category of data returned. The property parameter\r
+  selects the first value of the selected category to be returned. If there is no property\r
   that corresponds to the value of property, the next higher value is returned, if it exists.\r
-  The moreData parameter will have a value of YES if there are more values of the requested \r
+  The moreData parameter will have a value of YES if there are more values of the requested\r
   type that were not returned.\r
-  If no next capability exists, the TPM will return a zero-length list and moreData will have \r
+  If no next capability exists, the TPM will return a zero-length list and moreData will have\r
   a value of NO.\r
 \r
-  NOTE: \r
-  To simplify this function, leave returned CapabilityData for caller to unpack since there are \r
+  NOTE:\r
+  To simplify this function, leave returned CapabilityData for caller to unpack since there are\r
   many capability categories and only few categories will be used in firmware. It means the caller\r
   need swap the byte order for the feilds in CapabilityData.\r
 \r
   @param[in]  Capability         Group selection; determines the format of the response.\r
-  @param[in]  Property           Further definition of information. \r
+  @param[in]  Property           Further definition of information.\r
   @param[in]  PropertyCount      Number of properties of the indicated type to return.\r
   @param[out] MoreData           Flag to indicate if there are more values of this type.\r
   @param[out] CapabilityData     The capability data.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -95,10 +95,10 @@ Tpm2GetCapability (
   SendBuffer.Capability = SwapBytes32 (Capability);\r
   SendBuffer.Property = SwapBytes32 (Property);\r
   SendBuffer.PropertyCount = SwapBytes32 (PropertyCount);\r
\r
+\r
   SendBufferSize = (UINT32) sizeof (SendBuffer);\r
   SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize);\r
-    \r
+\r
   //\r
   // send Tpm command\r
   //\r
@@ -128,7 +128,7 @@ Tpm2GetCapability (
   // Does not unpack all possiable property here, the caller should unpack it and note the byte order.\r
   //\r
   CopyMem (CapabilityData, &RecvBuffer.CapabilityData, RecvBufferSize - sizeof (TPM2_RESPONSE_HEADER) - sizeof (UINT8));\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -138,7 +138,7 @@ Tpm2GetCapability (
   This function parse the value got from TPM2_GetCapability and return the Family.\r
 \r
   @param[out] Family             The Family of TPM. (a 4-octet character string)\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -150,13 +150,13 @@ Tpm2GetCapabilityFamily (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_FAMILY_INDICATOR, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_FAMILY_INDICATOR,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -173,7 +173,7 @@ Tpm2GetCapabilityFamily (
   This function parse the value got from TPM2_GetCapability and return the TPM manufacture ID.\r
 \r
   @param[out] ManufactureId      The manufacture ID of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -185,13 +185,13 @@ Tpm2GetCapabilityManufactureID (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_MANUFACTURER, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_MANUFACTURER,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -209,7 +209,7 @@ Tpm2GetCapabilityManufactureID (
 \r
   @param[out] FirmwareVersion1   The FirmwareVersion1.\r
   @param[out] FirmwareVersion2   The FirmwareVersion2.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -222,13 +222,13 @@ Tpm2GetCapabilityFirmwareVersion (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_FIRMWARE_VERSION_1, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_FIRMWARE_VERSION_1,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -237,10 +237,10 @@ Tpm2GetCapabilityFirmwareVersion (
   *FirmwareVersion1 = SwapBytes32 (TpmCap.data.tpmProperties.tpmProperty->value);\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_FIRMWARE_VERSION_2, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_FIRMWARE_VERSION_2,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -258,7 +258,7 @@ Tpm2GetCapabilityFirmwareVersion (
 \r
   @param[out] MaxCommandSize     The maximum value for commandSize in a command.\r
   @param[out] MaxResponseSize    The maximum value for responseSize in a command.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -274,10 +274,10 @@ Tpm2GetCapabilityMaxCommandResponseSize (
   EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_MAX_COMMAND_SIZE, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_MAX_COMMAND_SIZE,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -287,10 +287,10 @@ Tpm2GetCapabilityMaxCommandResponseSize (
   *MaxCommandSize = SwapBytes32 (TpmCap.data.tpmProperties.tpmProperty->value);\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_MAX_RESPONSE_SIZE, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_MAX_RESPONSE_SIZE,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -298,17 +298,17 @@ Tpm2GetCapabilityMaxCommandResponseSize (
   }\r
 \r
   *MaxResponseSize = SwapBytes32 (TpmCap.data.tpmProperties.tpmProperty->value);\r
-  return EFI_SUCCESS; \r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
   This command returns Returns a list of TPMS_ALG_PROPERTIES. Each entry is an\r
-  algorithm ID and a set of properties of the algorithm. \r
+  algorithm ID and a set of properties of the algorithm.\r
 \r
   This function parse the value got from TPM2_GetCapability and return the list.\r
 \r
   @param[out] AlgList      List of algorithm.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -322,24 +322,24 @@ Tpm2GetCapabilitySupportedAlg (
   TPMI_YES_NO             MoreData;\r
   UINTN                   Index;\r
   EFI_STATUS              Status;\r
\r
+\r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_ALGS, \r
-             1, \r
-             MAX_CAP_ALGS, \r
-             &MoreData, \r
+             TPM_CAP_ALGS,\r
+             1,\r
+             MAX_CAP_ALGS,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   CopyMem (AlgList, &TpmCap.data.algorithms, sizeof (TPML_ALG_PROPERTY));\r
 \r
   AlgList->count = SwapBytes32 (AlgList->count);\r
   if (AlgList->count > MAX_CAP_ALGS) {\r
     DEBUG ((DEBUG_ERROR, "Tpm2GetCapabilitySupportedAlg - AlgList->count error %x\n", AlgList->count));\r
-    return EFI_DEVICE_ERROR; \r
+    return EFI_DEVICE_ERROR;\r
   }\r
 \r
   for (Index = 0; Index < AlgList->count; Index++) {\r
@@ -356,7 +356,7 @@ Tpm2GetCapabilitySupportedAlg (
   This function parse the value got from TPM2_GetCapability and return the LockoutCounter.\r
 \r
   @param[out] LockoutCounter     The LockoutCounter of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -368,13 +368,13 @@ Tpm2GetCapabilityLockoutCounter (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_LOCKOUT_COUNTER, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_LOCKOUT_COUNTER,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -391,7 +391,7 @@ Tpm2GetCapabilityLockoutCounter (
   This function parse the value got from TPM2_GetCapability and return the LockoutInterval.\r
 \r
   @param[out] LockoutInterval    The LockoutInterval of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -403,13 +403,13 @@ Tpm2GetCapabilityLockoutInterval (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_LOCKOUT_INTERVAL, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_LOCKOUT_INTERVAL,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -427,7 +427,7 @@ Tpm2GetCapabilityLockoutInterval (
 \r
   @param[out] InputBufferSize    The InputBufferSize of TPM.\r
                                  the maximum size of a parameter (typically, a TPM2B_MAX_BUFFER)\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -439,13 +439,13 @@ Tpm2GetCapabilityInputBufferSize (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_INPUT_BUFFER, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_INPUT_BUFFER,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -462,7 +462,7 @@ Tpm2GetCapabilityInputBufferSize (
   This function parse the value got from TPM2_GetCapability and return the PcrSelection.\r
 \r
   @param[out] Pcrs    The Pcr Selection\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -478,10 +478,10 @@ Tpm2GetCapabilityPcrs (
   UINTN                   Index;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_PCRS, \r
-             0, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_PCRS,\r
+             0,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
@@ -605,7 +605,7 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
   This function parse the value got from TPM2_GetCapability and return the AlgorithmSet.\r
 \r
   @param[out] AlgorithmSet    The AlgorithmSet of TPM.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -617,13 +617,13 @@ Tpm2GetCapabilityAlgorithmSet (
 {\r
   TPMS_CAPABILITY_DATA    TpmCap;\r
   TPMI_YES_NO             MoreData;\r
-  EFI_STATUS              Status; \r
+  EFI_STATUS              Status;\r
 \r
   Status = Tpm2GetCapability (\r
-             TPM_CAP_TPM_PROPERTIES, \r
-             TPM_PT_ALGORITHM_SET, \r
-             1, \r
-             &MoreData, \r
+             TPM_CAP_TPM_PROPERTIES,\r
+             TPM_PT_ALGORITHM_SET,\r
+             1,\r
+             &MoreData,\r
              &TpmCap\r
              );\r
   if (EFI_ERROR (Status)) {\r
index 02a250127a260e918bdbdbedb0b8e8f3dd0ff70c..b9c86d76a097ff7ffc9b51929bdcbd42dde2c6d2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM2 Context related command.\r
 \r
-Copyright (c) 2014, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -36,7 +36,7 @@ typedef struct {
   This command causes all context associated with a loaded object or session to be removed from TPM memory.\r
 \r
   @param[in]  FlushHandle        The handle of the item to flush.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -59,7 +59,7 @@ Tpm2FlushContext (
   SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_FlushContext);\r
 \r
   SendBuffer.FlushHandle = SwapBytes32 (FlushHandle);\r
\r
+\r
   SendBufferSize = (UINT32) sizeof (SendBuffer);\r
   SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize);\r
 \r
index a7a7bf2c653901012fa784ea6d767e76262357f1..9bf24da7a735a36edbf905196e8809619fb4121a 100644 (file)
@@ -87,7 +87,7 @@ typedef struct {
   @param[in]  Expiration         Time when authorization will expire, measured in seconds from the time that nonceTPM was generated.\r
   @param[out] Timeout            Time value used to indicate to the TPM when the ticket expires.\r
   @param[out] PolicyTicket       A ticket that includes a value indicating when the authorization expires.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -120,7 +120,7 @@ Tpm2PolicySecret (
   SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_PolicySecret);\r
   SendBuffer.AuthHandle = SwapBytes32 (AuthHandle);\r
   SendBuffer.PolicySession = SwapBytes32 (PolicySession);\r
-  \r
+\r
   //\r
   // Add in Auth session\r
   //\r
@@ -148,7 +148,7 @@ Tpm2PolicySecret (
   Buffer += sizeof(UINT16);\r
   CopyMem (Buffer, PolicyRef->buffer, PolicyRef->size);\r
   Buffer += PolicyRef->size;\r
-  \r
+\r
   WriteUnaligned32 ((UINT32 *)Buffer, SwapBytes32((UINT32)Expiration));\r
   Buffer += sizeof(UINT32);\r
 \r
@@ -220,7 +220,7 @@ Done:
 \r
   @param[in] PolicySession      Handle for the policy session being extended.\r
   @param[in] HashList           the list of hashes to check for a match.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -285,7 +285,7 @@ Tpm2PolicyOR (
 \r
   @param[in]  PolicySession      Handle for the policy session being extended.\r
   @param[in]  Code               The allowed commandCode.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -341,7 +341,7 @@ Tpm2PolicyCommandCode (
 \r
   @param[in]  PolicySession      Handle for the policy session.\r
   @param[out] PolicyHash         the current value of the policyHash of policySession.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
index cc77785de1c040bb87812a4b3b3b4d2f06b8d95c..6b2b6b4008614648c09d70156ca61406b0840787 100644 (file)
@@ -97,7 +97,7 @@ CopyAuthSessionCommand (
   UINT8  *Buffer;\r
 \r
   Buffer = (UINT8 *)AuthSessionOut;\r
-  \r
+\r
   //\r
   // Add in Auth session\r
   //\r
index 9bfbdad394c0aa9b80a22435ffdc7dff95c05e58..27fc6e29659e9df2aa2b9576790fece0e12a880f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM2 Hierarchy related command.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -214,7 +214,7 @@ Done:
 \r
   @param[in] AuthHandle        TPM_RH_LOCKOUT or TPM_RH_PLATFORM+{PP}\r
   @param[in] AuthSession       Auth Session context\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -455,8 +455,8 @@ Tpm2HierarchyChangeAuth (
   // Call the TPM\r
   //\r
   Status = Tpm2SubmitCommand (\r
-             CmdSize, \r
-             (UINT8 *)&Cmd, \r
+             CmdSize,\r
+             (UINT8 *)&Cmd,\r
              &ResultBufSize,\r
              ResultBuf\r
              );\r
@@ -553,8 +553,8 @@ Tpm2ChangeEPS (
   // Call the TPM\r
   //\r
   Status = Tpm2SubmitCommand (\r
-             CmdSize, \r
-             (UINT8 *)&Cmd, \r
+             CmdSize,\r
+             (UINT8 *)&Cmd,\r
              &ResultBufSize,\r
              ResultBuf\r
              );\r
@@ -651,8 +651,8 @@ Tpm2ChangePPS (
   // Call the TPM\r
   //\r
   Status = Tpm2SubmitCommand (\r
-             CmdSize, \r
-             (UINT8 *)&Cmd, \r
+             CmdSize,\r
+             (UINT8 *)&Cmd,\r
              &ResultBufSize,\r
              ResultBuf\r
              );\r
@@ -759,8 +759,8 @@ Tpm2HierarchyControl (
   // Call the TPM\r
   //\r
   Status = Tpm2SubmitCommand (\r
-             CmdSize, \r
-             (UINT8 *)&Cmd, \r
+             CmdSize,\r
+             (UINT8 *)&Cmd,\r
              &ResultBufSize,\r
              ResultBuf\r
              );\r
index af52322c275bc8f7622b5cb11f3e2165deb24cb0..741fe031a98ce8be5b0a6adae04f260b83a045dc 100644 (file)
@@ -120,16 +120,16 @@ Tpm2PcrExtend (
   // Add in Auth session\r
   //\r
   Buffer = (UINT8 *)&Cmd.AuthSessionPcr;\r
-  \r
+\r
   // sessionInfoSize\r
   SessionInfoSize = CopyAuthSessionCommand (NULL, Buffer);\r
   Buffer += SessionInfoSize;\r
   Cmd.AuthorizationSize = SwapBytes32(SessionInfoSize);\r
-  \r
+\r
   //Digest Count\r
   WriteUnaligned32 ((UINT32 *)Buffer, SwapBytes32(Digests->count));\r
   Buffer += sizeof(UINT32);\r
-  \r
+\r
   //Digest\r
   for (Index = 0; Index < Digests->count; Index++) {\r
     WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16(Digests->digests[Index].hashAlg));\r
@@ -241,7 +241,7 @@ Tpm2PcrEvent (
 \r
   CopyMem (Buffer, EventData->buffer, EventData->size);\r
   Buffer += EventData->size;\r
-  \r
+\r
   CmdSize              = (UINT32)((UINTN)Buffer - (UINTN)&Cmd);\r
   Cmd.Header.paramSize = SwapBytes32(CmdSize);\r
 \r
@@ -311,7 +311,7 @@ Tpm2PcrEvent (
   @param[out] PcrUpdateCounter   The current value of the PCR update counter.\r
   @param[out] PcrSelectionOut    The PCR in the returned list.\r
   @param[out] PcrValues          The contents of the PCR indicated in pcrSelect.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -338,7 +338,7 @@ Tpm2PcrRead (
   //\r
   SendBuffer.Header.tag = SwapBytes16(TPM_ST_NO_SESSIONS);\r
   SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_PCR_Read);\r
\r
+\r
   SendBuffer.PcrSelectionIn.count = SwapBytes32(PcrSelectionIn->count);\r
   for (Index = 0; Index < PcrSelectionIn->count; Index++) {\r
     SendBuffer.PcrSelectionIn.pcrSelections[Index].hash = SwapBytes16(PcrSelectionIn->pcrSelections[Index].hash);\r
@@ -442,7 +442,7 @@ Tpm2PcrRead (
   @param[out] MaxPCR             maximum number of PCR that may be in a bank\r
   @param[out] SizeNeeded         number of octets required to satisfy the request\r
   @param[out] SizeAvailable      Number of octets available. Computed before the allocation\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -509,8 +509,8 @@ Tpm2PcrAllocate (
   // Call the TPM\r
   //\r
   Status = Tpm2SubmitCommand (\r
-             CmdSize, \r
-             (UINT8 *)&Cmd, \r
+             CmdSize,\r
+             (UINT8 *)&Cmd,\r
              &ResultBufSize,\r
              ResultBuf\r
              );\r
@@ -566,7 +566,7 @@ Done:
   @param[in]  PlatformAuth      platform auth value. NULL means no platform auth change.\r
   @param[in]  SupportedPCRBanks Supported PCR banks\r
   @param[in]  PCRBanks          PCR banks\r
-  \r
+\r
   @retval EFI_SUCCESS Operation completed successfully.\r
 **/\r
 EFI_STATUS\r
@@ -692,4 +692,4 @@ Tpm2PcrAllocateBanks (
 Done:\r
   ZeroMem(&LocalAuthSession.hmac, sizeof(LocalAuthSession.hmac));\r
   return Status;\r
-}
\ No newline at end of file
+}\r
index 14b10952415ec49dadb08c03d3788ffde07cf931..ed304071850ede182eef4d1266f43e3d27b95a0b 100644 (file)
@@ -162,7 +162,7 @@ typedef struct {
   @param[in]  NvIndex            The NV Index.\r
   @param[out] NvPublic           The public area of the index.\r
   @param[out] NvName             The Name of the nvIndex.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -192,7 +192,7 @@ Tpm2NvReadPublic (
   SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_NV_ReadPublic);\r
 \r
   SendBuffer.NvIndex = SwapBytes32 (NvIndex);\r
\r
+\r
   SendBufferSize = (UINT32) sizeof (SendBuffer);\r
   SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize);\r
 \r
@@ -265,7 +265,7 @@ Tpm2NvReadPublic (
 \r
   CopyMem (NvName->name, (UINT8 *)&RecvBuffer + sizeof(TPM2_RESPONSE_HEADER) + sizeof(UINT16) + NvPublicSize + sizeof(UINT16), NvNameSize);\r
   NvName->size = NvNameSize;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -278,7 +278,7 @@ Tpm2NvReadPublic (
   @param[in]  AuthSession        Auth Session context\r
   @param[in]  Auth               The authorization data.\r
   @param[in]  NvPublic           The public area of the index.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_ALREADY_STARTED    The command was returned successfully, but NvIndex is already defined.\r
@@ -414,7 +414,7 @@ Done:
   @param[in]  AuthHandle         TPM_RH_OWNER or TPM_RH_PLATFORM+{PP}.\r
   @param[in]  NvIndex            The NV Index.\r
   @param[in]  AuthSession        Auth Session context\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -521,7 +521,7 @@ Done:
   @param[in]     Size               Number of bytes to read.\r
   @param[in]     Offset             Byte offset into the area.\r
   @param[in,out] OutData            The data read.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
@@ -648,7 +648,7 @@ Tpm2NvRead (
   }\r
 \r
   CopyMem (OutData->buffer, &RecvBuffer.Data.buffer, OutData->size);\r
-  \r
+\r
 Done:\r
   //\r
   // Clear AuthSession Content\r
@@ -666,7 +666,7 @@ Done:
   @param[in]  AuthSession        Auth Session context\r
   @param[in]  InData             The data to write.\r
   @param[in]  Offset             The offset into the NV Area.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
   @retval EFI_NOT_FOUND          The command was returned successfully, but NvIndex is not found.\r
index 90877768d3afcc53e9291865ae2c924f2b1633bf..3322548f6fa24d5439fddac2b12f126620c6052f 100644 (file)
@@ -90,7 +90,7 @@ typedef struct {
   @param[in]  HashAlg           The hash algorithm to use for the hash sequence\r
                                 An Event sequence starts if this is TPM_ALG_NULL.\r
   @param[out] SequenceHandle    A handle to reference the sequence\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -178,7 +178,7 @@ Tpm2HashSequenceStart (
 \r
   @param[in] SequenceHandle    Handle for the sequence object\r
   @param[in] Buffer            Data to be added to hash\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -277,7 +277,7 @@ Tpm2SequenceUpdate (
   @param[in]  SequenceHandle    Authorization for the sequence\r
   @param[in]  Buffer            Data to be added to the Event\r
   @param[out] Results           List of digests computed for the PCR\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
@@ -408,7 +408,7 @@ Tpm2EventSequenceComplete (
   @param[in]  SequenceHandle    Authorization for the sequence\r
   @param[in]  Buffer            Data to be added to the hash/HMAC\r
   @param[out] Result            The returned HMAC or digest in a sized buffer\r
\r
+\r
   @retval EFI_SUCCESS      Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR Unexpected device behavior.\r
 **/\r
index 35ad86a17af9d5bba9a1b5e4f2a136599838f107..65b15cb23c300c91b97cb2924cb3cae86d446e26 100644 (file)
@@ -53,7 +53,7 @@ typedef struct {
   @param[in]  AuthHash           Hash algorithm to use for the session.\r
   @param[out] SessionHandle      Handle for the newly created session.\r
   @param[out] NonceTPM           The initial nonce from the TPM, used in the computation of the sessionKey.\r
-  \r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
 **/\r
@@ -136,7 +136,7 @@ Tpm2StartAuthSession (
 \r
   WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (AuthHash));\r
   Buffer += sizeof(UINT16);\r
\r
+\r
   SendBufferSize = (UINT32) ((UINTN)Buffer - (UINTN)&SendBuffer);\r
   SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize);\r
 \r
index e9dad4a3b08c7776cdd68912d8010890d6fb4f44..815a149c3dc36976cd1e722bd9269edb1659d4d1 100644 (file)
@@ -53,7 +53,7 @@ Tpm2GetIdleByPass (
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -87,7 +87,7 @@ DTpm2RequestUseTpm (
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -142,7 +142,7 @@ Tpm2RegisterTpm2DeviceLib (
 \r
 /**\r
   The function caches current active TPM interface type.\r
-  \r
+\r
   @retval EFI_SUCCESS   DTPM2.0 instance is registered, or system dose not surpport registr DTPM2.0 instance\r
 **/\r
 EFI_STATUS\r
index 2e54a78cc0fc87bcb2dc3ccf7b215b2765fac5f1..b41c6cbd2d31b82bcbd655610fd31759f63fff57 100644 (file)
@@ -55,4 +55,4 @@
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress            ## CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdActiveTpmInterfaceType    ## PRODUCES\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdCRBIdleByPass             ## PRODUCES
\ No newline at end of file
+  gEfiSecurityPkgTokenSpaceGuid.PcdCRBIdleByPass             ## PRODUCES\r
index 5f6e163c0f2ecddc4b4b81a2f2b35c03c7f81641..9bcf7a8a06d11205c6e2a383444c92ad2eba9384 100644 (file)
@@ -66,7 +66,7 @@ DumpPtpInfo (
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -98,7 +98,7 @@ TPM2_DEVICE_INTERFACE  mDTpm2InternalTpm2Device = {
 \r
 /**\r
   The function register DTPM2.0 instance and caches current active TPM interface type.\r
-  \r
+\r
   @retval EFI_SUCCESS   DTPM2.0 instance is registered, or system dose not surpport registr DTPM2.0 instance\r
 **/\r
 EFI_STATUS\r
index 24e4c35d55b3679d094e816877065000f0f3442d..b418e7380be5ca9f4b2663f782caf3dac63aa753 100644 (file)
@@ -51,4 +51,4 @@
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress          ## CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdActiveTpmInterfaceType  ## PRODUCES\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdCRBIdleByPass             ## PRODUCES
\ No newline at end of file
+  gEfiSecurityPkgTokenSpaceGuid.PcdCRBIdleByPass             ## PRODUCES\r
index 0889162592fd6b488a207c28bd21450aa849f894..6f390bf5c9c291be93a7117395869a0b6ec2ce38 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   TIS (TPM Interface Specification) functions used by dTPM2.0 library.\r
-  \r
+\r
 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -46,7 +46,7 @@ TisPcPresenceCheck (
   )\r
 {\r
   UINT8                             RegRead;\r
-  \r
+\r
   RegRead = MmioRead8 ((UINTN)&TisReg->Access);\r
   return (BOOLEAN)(RegRead != (UINT8)-1);\r
 }\r
@@ -83,7 +83,7 @@ TisPcWaitRegisterBits (
 }\r
 \r
 /**\r
-  Get BurstCount by reading the burstCount field of a TIS regiger \r
+  Get BurstCount by reading the burstCount field of a TIS regiger\r
   in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in]  TisReg                Pointer to TIS register.\r
@@ -127,7 +127,7 @@ TisPcReadBurstCount (
 }\r
 \r
 /**\r
-  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY \r
+  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY\r
   to Status Register in time.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -158,7 +158,7 @@ TisPcPrepareCommand (
 }\r
 \r
 /**\r
-  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE \r
+  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE\r
   to ACCESS Register in the time of default TIS_TIMEOUT_A.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -174,11 +174,11 @@ TisPcRequestUseTpm (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  \r
+\r
   if (TisReg == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!TisPcPresenceCheck (TisReg)) {\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -196,12 +196,12 @@ TisPcRequestUseTpm (
 /**\r
   Send a command to TPM for execution and return response data.\r
 \r
-  @param[in]      TisReg        TPM register space base address.  \r
-  @param[in]      BufferIn      Buffer for command data.  \r
-  @param[in]      SizeIn        Size of command data.  \r
-  @param[in, out] BufferOut     Buffer for response data.  \r
-  @param[in, out] SizeOut       Size of response data.  \r
\r
+  @param[in]      TisReg        TPM register space base address.\r
+  @param[in]      BufferIn      Buffer for command data.\r
+  @param[in]      SizeIn        Size of command data.\r
+  @param[in, out] BufferOut     Buffer for response data.\r
+  @param[in, out] SizeOut       Size of response data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
   @retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
@@ -403,7 +403,7 @@ Exit:
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index eedc439228aaa1ab93cfce9f637e30b54617bb3a..d8d391cba1bc8a86a44d7dc306f31680701fec01 100644 (file)
@@ -3,7 +3,7 @@
   via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.\r
   At most one TPM2 instance can be finally registered, and other will return unsupported.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -32,7 +32,7 @@ TPM2_DEVICE_INTERFACE  mInternalTpm2DeviceInterface;
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 28f381c7bedd241643ff6f54e7eac9f84dee06fc..26684f9864fadba1a4e2e23cd16ba47e3ed3cf3d 100644 (file)
@@ -5,7 +5,7 @@
 #  it via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.\r
 #  At most one TPM 2.0 instance can be finally registered, and other will return unsupported.\r
 #\r
-# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -22,7 +22,7 @@
   FILE_GUID                      = C3D69D87-5200-4aab-A6DB-2569BA1A92FC\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = Tpm2DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = Tpm2DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
index 7470fe347de3e9899436060717409fdf0d873901..980a2a0550116dfc43ab25dc81219ed764254c01 100644 (file)
@@ -3,7 +3,7 @@
   via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.\r
   At most one TPM2 instance can be finally registered, and other will return unsupported.\r
 \r
-Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -54,7 +54,7 @@ InternalGetTpm2DeviceInterface (
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 2eca146dd21ead4c4505f667247f4628458a6a0f..877cf95bc18e235c318f6effc6e2ad61440625e6 100644 (file)
@@ -5,7 +5,7 @@
 #  it via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.\r
 #  At most one TPM 2.0 instance can be finally registered, and other will return unsupported.\r
 #\r
-# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -46,4 +46,4 @@
 \r
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid        ## CONSUMES\r
-  
\ No newline at end of file
+\r
index 1d59050a0b624003a02941afca4da36654133118..ca40a2324d7c39909ea3780209c1bad888d73456 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is TPM2 TCG2 protocol lib.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/Tcg2Protocol.h>\r
 #include <IndustryStandard/Tpm20.h>\r
 \r
-EFI_TCG2_PROTOCOL  *mTcg2Protocol = NULL; \r
+EFI_TCG2_PROTOCOL  *mTcg2Protocol = NULL;\r
 \r
 /**\r
   This service enables the sending of commands to the TPM2.\r
@@ -32,7 +32,7 @@ EFI_TCG2_PROTOCOL  *mTcg2Protocol = NULL;
 \r
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
index 6d95ebdd50261ef7656fb09cf6501748cb63364a..cffc4afb4d50f5da04d54e42470cac9c0eba6e9a 100644 (file)
@@ -4,7 +4,7 @@
 #  This library helps to use TPM 2.0 device in library function API\r
 #  based on TPM2 protocol.\r
 #\r
-# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -21,7 +21,7 @@
   FILE_GUID                      = A1B0B230-67DC-431E-A94A-A96AF1EBE637\r
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = Tpm2DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER \r
+  LIBRARY_CLASS                  = Tpm2DeviceLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
 \r
 #\r
 # The following information is for reference only and not required by the build tools.\r
index b8496c72765fb4b43eb746a91fa8b512ae149d11..10839c95b2bf87199a1d3816b590ca62677b720f 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The intenal header file for TpmCommLib.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index c157d41b72fedf72553ebcff70b6d8bf0409b5f5..77bf70c246e34fcbffad36a6e204a77f03bd9415 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Basic TIS (TPM Interface Specification) functions.\r
 \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -28,7 +28,7 @@ TisPcPresenceCheck (
   )\r
 {\r
   UINT8                             RegRead;\r
-  \r
+\r
   RegRead = MmioRead8 ((UINTN)&TisReg->Access);\r
   return (BOOLEAN)(RegRead != (UINT8)-1);\r
 }\r
@@ -66,7 +66,7 @@ TisPcWaitRegisterBits (
 }\r
 \r
 /**\r
-  Get BurstCount by reading the burstCount field of a TIS regiger \r
+  Get BurstCount by reading the burstCount field of a TIS regiger\r
   in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in]  TisReg                Pointer to TIS register.\r
@@ -111,7 +111,7 @@ TisPcReadBurstCount (
 }\r
 \r
 /**\r
-  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY \r
+  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY\r
   to Status Register in time.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -143,7 +143,7 @@ TisPcPrepareCommand (
 }\r
 \r
 /**\r
-  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE \r
+  Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE\r
   to ACCESS Register in the time of default TIS_TIMEOUT_A.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -160,11 +160,11 @@ TisPcRequestUseTpm (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  \r
+\r
   if (TisReg == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!TisPcPresenceCheck (TisReg)) {\r
     return EFI_NOT_FOUND;\r
   }\r
index 3197f96a995a9c6a689c4ac231c4cd3df18053f8..69f5f5c05b51d9422bfe50037b4074ff762fe98b 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Basic TPM command functions.\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param[in]  Data          Raw data to be digested.\r
   @param[in]  DataLen       Size of the raw data.\r
   @param[out] Digest        Pointer to a buffer that stores the final digest.\r
-  \r
+\r
   @retval     EFI_SUCCESS   Always successfully calculate the final digest.\r
 **/\r
 EFI_STATUS\r
index 7f05f597118ed7638dfb78f671bcec11d1b95a21..9ca66d1805b70868ec4ce744387ab1cc4dde6ccf 100644 (file)
@@ -1,10 +1,10 @@
 ## @file\r
 #  Provides some common functions for the TCG feature\r
 #\r
-#  This instance provides basic TPM Interface Specification (TIS) functions \r
+#  This instance provides basic TPM Interface Specification (TIS) functions\r
 #  and TPM hashall function.\r
 #\r
-# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
index ba18ed7ec65704dd89f70ba41a7c6d22458c4035..add855f8a398e794e98787a1c139f7c9cbca7e0a 100644 (file)
@@ -6,13 +6,13 @@
 // Verification Protocol which is used to verify data signed using PKCS#7\r
 // structure. The PKCS#7 data to be verified must be ASN.1 (DER) encoded.\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 55ae8d066a4a275978bac90dd295ab9751ddf38c..d5d79e5b68bfa016e4f6145a48144aaa070c24f1 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Pkcs7VerifyDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI PKCS7 Verification DXE"\r
 \r
 \r
index 13b424dc2e7e4f96a6b48f8e7b28dce8d9245824..ed366b2b874aed7bcf7a293881bde97469977a49 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
   Core Primitive Implementation of the Advanced Encryption Standard (AES) algorithm.\r
-  Refer to FIPS PUB 197 ("Advanced Encryption Standard (AES)") for detailed algorithm \r
-  description of AES. \r
+  Refer to FIPS PUB 197 ("Advanced Encryption Standard (AES)") for detailed algorithm\r
+  description of AES.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -29,47 +29,47 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // ShiftRows with MixColumns steps and transforming them into table lookups.\r
 //\r
 GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32 AesForwardTable[] = {\r
-  0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, \r
+  0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd,\r
   0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d,\r
-  0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, \r
+  0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d,\r
   0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b,\r
-  0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, \r
+  0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7,\r
   0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a,\r
-  0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, \r
+  0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4,\r
   0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f,\r
-  0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, \r
+  0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1,\r
   0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d,\r
-  0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, \r
+  0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e,\r
   0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb,\r
-  0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, \r
+  0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e,\r
   0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c,\r
-  0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, \r
+  0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46,\r
   0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a,\r
-  0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, \r
+  0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7,\r
   0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81,\r
-  0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, \r
+  0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe,\r
   0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504,\r
-  0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, \r
+  0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a,\r
   0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f,\r
-  0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, \r
+  0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2,\r
   0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395,\r
-  0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, \r
+  0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e,\r
   0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c,\r
-  0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, \r
+  0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256,\r
   0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4,\r
-  0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, \r
+  0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4,\r
   0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7,\r
-  0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, \r
+  0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa,\r
   0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818,\r
-  0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, \r
+  0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1,\r
   0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21,\r
-  0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, \r
+  0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42,\r
   0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12,\r
-  0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, \r
+  0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158,\r
   0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133,\r
-  0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, \r
+  0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22,\r
   0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a,\r
-  0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, \r
+  0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631,\r
   0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11,\r
   0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a\r
 };\r
@@ -113,7 +113,7 @@ typedef struct {
 } AES_KEY;\r
 \r
 /**\r
-  AES Key Expansion. \r
+  AES Key Expansion.\r
   This function expands the cipher key into encryption schedule.\r
 \r
   @param[in]  Key                AES symmetric key buffer.\r
@@ -161,7 +161,7 @@ AesExpandKey (
   for (Index1 = Index2 = 0; Index1 < Nk; Index1++, Index2 += 4) {\r
     LOAD32H (Ek[Index1], Key + Index2);\r
   }\r
-  \r
+\r
   //\r
   // Initialize the encryption key scheduler\r
   //\r
@@ -181,7 +181,7 @@ AesExpandKey (
       }\r
     } else {\r
       //\r
-      // Different routine for key expansion If Cipher Key is 256 bits, \r
+      // Different routine for key expansion If Cipher Key is 256 bits,\r
       //\r
       for (Index1 = 1; Index1 < 4 && (Index1 + Index2) < Nw; Index1++) {\r
         Ek [Index1 + Index2] = Ek[Index1 + Index2 - Nk] ^ Ek[Index1 + Index2 - 1];\r
@@ -193,7 +193,7 @@ AesExpandKey (
                                                (AES_FT0((Temp >>  8) & 0xFF) & 0x0000FF00) ^\r
                                                (AES_FT1((Temp)       & 0xFF) & 0x000000FF);\r
       }\r
-      \r
+\r
       for (Index1 = 5; Index1 < Nk && (Index1 + Index2) < Nw; Index1++) {\r
         Ek[Index1 + Index2] = Ek[Index1 + Index2 - Nk] ^ Ek[Index1 + Index2 - 1];\r
       }\r
@@ -259,8 +259,8 @@ AesEncrypt (
   StateY  = TempState;\r
 \r
   //\r
-  // AES Cipher transformation rounds (Nr - 1 rounds), in which SubBytes(), \r
-  // ShiftRows() and MixColumns() operations were combined by a sequence of \r
+  // AES Cipher transformation rounds (Nr - 1 rounds), in which SubBytes(),\r
+  // ShiftRows() and MixColumns() operations were combined by a sequence of\r
   // table lookups to speed up the execution.\r
   //\r
   for (Round = 1; Round < Nr; Round++) {\r
@@ -301,4 +301,4 @@ AesEncrypt (
   }\r
 \r
   return EFI_SUCCESS;\r
-}
\ No newline at end of file
+}\r
index 395b8867c83620e39c77ebf92cc7f41c01d7d2b6..acfdc71d356c3188e49cc786bdbe98d2af5cbf2e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support routines for RDRAND instruction access.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -63,7 +63,7 @@ RdRandGetBytes (
   This function takes multiple random numbers through RDRAND without intervening\r
   delays to ensure reseeding and performs AES-CBC-MAC over the data to compute the\r
   seed value.\r
-  \r
+\r
   @param[out]  SeedBuffer    Pointer to a 128bit buffer to store the random seed.\r
 \r
   @retval EFI_SUCCESS        Random seed generation succeeded.\r
index 32c46ab45f127f58a15cfc472754e1e9a7f0e1c1..852bbfadd7ea8b5628b703b79a5db558c2a416bc 100644 (file)
@@ -1,7 +1,7 @@
-/** @file  \r
+/** @file\r
   RNG Driver to produce the UEFI Random Number Generator protocol.\r
 \r
-  The driver will use the new RDRAND instruction to produce high-quality, high-performance \r
+  The driver will use the new RDRAND instruction to produce high-quality, high-performance\r
   entropy and random number.\r
 \r
   RNG Algoritnms defined in UEFI 2.4:\r
    - EFI_RNG_ALGORITHM_X9_31_3DES_GUID        - Unsupported\r
    - EFI_RNG_ALGORITHM_X9_31_AES_GUID         - Unsupported\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -40,7 +40,7 @@ EFI_RNG_ALGORITHM mSupportedRngAlgorithms[] = {
   Returns information about the random number generation implementation.\r
 \r
   @param[in]     This                 A pointer to the EFI_RNG_PROTOCOL instance.\r
-  @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList. \r
+  @param[in,out] RNGAlgorithmListSize On input, the size in bytes of RNGAlgorithmList.\r
                                       On output with a return code of EFI_SUCCESS, the size\r
                                       in bytes of the data returned in RNGAlgorithmList. On output\r
                                       with a return code of EFI_BUFFER_TOO_SMALL,\r
@@ -89,7 +89,7 @@ RngGetInfo (
     }\r
   }\r
   *RNGAlgorithmListSize = RequiredSize;\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -151,7 +151,7 @@ RngGetRNG (
   //\r
   if (CompareGuid (RNGAlgorithm, &gEfiRngAlgorithmRaw)) {\r
     //\r
-    // When a DRBG is used on the output of a entropy source, \r
+    // When a DRBG is used on the output of a entropy source,\r
     // its security level must be at least 256 bits according to UEFI Spec.\r
     //\r
     if (RNGValueLength < 32) {\r
index 4d668a170ae172a061d45ced34f5c0cee8ad1d0a..3f39d471715cfaebd67951a653299fe5ffa5c9ff 100644 (file)
@@ -8,7 +8,7 @@
 #  -generator-drng-software-implementation-guide/ for more information about Intel\r
 #  Secure Key technology.\r
 #\r
-#  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -50,7 +50,7 @@
   UefiLib\r
   UefiBootServicesTableLib\r
   BaseLib\r
-  DebugLib     \r
+  DebugLib\r
   UefiDriverEntryPoint\r
   TimerLib\r
   RngLib\r
index 38f53c98a1edb56a3c3dea4085fb62adc2dd0ea9..ff068e587a96d377b08818dda78da3dc99fdf033 100644 (file)
@@ -8,13 +8,13 @@
 // -generator-drng-software-implementation-guide/ for more information about Intel\r
 // Secure Key technology.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
 // which accompanies this distribution. The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
index 1fdc7e22536c951edaa5506560e0c5ca6d05b36e..eddb639516b24caa12a651053c4f176827ce69c6 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // RngDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "UEFI Random Number Generator DXE"\r
 \r
 \r
index e24b563bdb6860de03885ed43a0235da62d74e7c..8d64b4fefe7d4c74ab717f869ba0e2a301c174f4 100644 (file)
 \r
 [LibraryClasses]\r
   ##  @libraryclass  Provides hash interfaces from different implementations.\r
-  # \r
+  #\r
   HashLib|Include/Library/HashLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides a platform specific interface to detect physically present user.\r
   #\r
   PlatformSecureLib|Include/Library/PlatformSecureLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides interfaces to handle TPM 1.2 request.\r
   #\r
   TcgPhysicalPresenceLib|Include/Library/TcgPhysicalPresenceLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides support for TCG PP >= 128 Vendor Specific PPI Operation.\r
   #\r
   TcgPpVendorLib|Include/Library/TcgPpVendorLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides interfaces for other modules to send TPM 2.0 command.\r
   #\r
   Tpm2CommandLib|Include/Library/Tpm2CommandLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides interfaces on how to access TPM 2.0 hardware device.\r
   #\r
   Tpm2DeviceLib|Include/Library/Tpm2DeviceLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides interfaces for other modules to send TPM 1.2 command.\r
   #\r
   Tpm12CommandLib|Include/Library/Tpm12CommandLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides interfaces on how to access TPM 1.2 hardware device.\r
   #\r
   Tpm12DeviceLib|Include/Library/Tpm12DeviceLib.h\r
-  \r
+\r
   ##  @libraryclass  Provides TPM Interface Specification (TIS) interfaces for TPM command.\r
   #\r
   TpmCommLib|Include/Library/TpmCommLib.h\r
 \r
-  ##  @libraryclass  Provides support for TCG Physical Presence Interface (PPI) specification \r
+  ##  @libraryclass  Provides support for TCG Physical Presence Interface (PPI) specification\r
   #   >= 128 Vendor Specific PPI Operation.\r
   #\r
   Tcg2PpVendorLib|Include/Library/TcgPpVendorLib.h\r
-  \r
+\r
   ##  @libraryclass  Handle TPM 2.0 physical presence request from OS.\r
   #\r
   Tcg2PhysicalPresenceLib|Include/Library/Tcg2PhysicalPresenceLib.h\r
   gEfiCustomModeEnableGuid           = { 0xc076ec0c, 0x7028, 0x4399, { 0xa0, 0x72, 0x71, 0xee, 0x5c, 0x44, 0x8b, 0x9f } }\r
 \r
   ## GUID used to "VendorKeysNv" variable to record the out of band secure boot keys modification.\r
-  #  This variable is a read-only NV variable that indicates whether someone other than the platform vendor has used a \r
+  #  This variable is a read-only NV variable that indicates whether someone other than the platform vendor has used a\r
   #  mechanism not defined by the UEFI Specification to transition the system to setup mode or to update secure boot keys.\r
   #  Include/Guid/AuthenticatedVariableFormat.h\r
   gEfiVendorKeysNvGuid               = { 0x9073e4e0, 0x60ec, 0x4b6e, { 0x99, 0x3, 0x4c, 0x22, 0x3c, 0x26, 0xf, 0x3c } }\r
   ## GUID used to "PhysicalPresence" variable and "PhysicalPresenceFlags" variable for TPM request and response.\r
   #  Include/Guid/PhysicalPresenceData.h\r
   gEfiPhysicalPresenceGuid           = { 0xf6499b1, 0xe9ad, 0x493d, { 0xb9, 0xc2, 0x2f, 0x90, 0x81, 0x5c, 0x6c, 0xbc }}\r
-  \r
+\r
   ## GUID used to "Tcg2PhysicalPresence" variable and "Tcg2PhysicalPresenceFlags" variable for TPM2 request and response.\r
   #  Include/Guid/Tcg2PhysicalPresenceData.h\r
   gEfiTcg2PhysicalPresenceGuid = { 0xaeb9c5c1, 0x94f1, 0x4d02, { 0xbf, 0xd9, 0x46, 0x2, 0xdb, 0x2d, 0x3c, 0x54 }}\r
   ## GUID used for FormSet.\r
   #  Include/Guid/TcgConfigHii.h\r
   gTcgConfigFormSetGuid              = { 0xb0f901e4, 0xc424, 0x45de, { 0x90, 0x81, 0x95, 0xe2, 0xb, 0xde, 0x6f, 0xb5 }}\r
-  \r
+\r
   ## GUID used for FormSet and config variable.\r
   #  Include/Guid/Tcg2ConfigHii.h\r
   gTcg2ConfigFormSetGuid    = {0x6339d487, 0x26ba, 0x424b, { 0x9a, 0x5d, 0x68, 0x7e, 0x25, 0xd7, 0x40, 0xbc }}\r
-  \r
+\r
   ## GUID used for FormSet.\r
   #  Include/Guid/SecureBootConfigHii.h\r
   gSecureBootConfigFormSetGuid       = { 0x5daf50a5, 0xea81, 0x4de2, {0x8f, 0x9b, 0xca, 0xbd, 0xa9, 0xcf, 0x5c, 0x14}}\r
   ## GUID value used for PcdTpmInstanceGuid to indicate TPM is disabled.\r
   #  Include/Guid/TpmInstance.h\r
   gEfiTpmDeviceInstanceNoneGuid      = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }\r
-  \r
+\r
   ## GUID value used for PcdTpmInstanceGuid to indicate TPM 1.2 device is selected to support.\r
   #  Include/Guid/TpmInstance.h\r
   gEfiTpmDeviceInstanceTpm12Guid     = { 0x8b01e5b6, 0x4f19, 0x46e8, { 0xab, 0x93, 0x1c, 0x53, 0x67, 0x1b, 0x90, 0xcc } }\r
-  \r
+\r
   ## GUID value used for PcdTpmInstanceGuid to indicate discrete TPM 2.0 device is selected to support.\r
   #  Include/Guid/TpmInstance.h\r
   gEfiTpmDeviceInstanceTpm20DtpmGuid = { 0x286bf25a, 0xc2c3, 0x408c, { 0xb3, 0xb4, 0x25, 0xe6, 0x75, 0x8b, 0x73, 0x17 } }\r
-  \r
+\r
   ## GUID used to select supported TPM instance from UI.\r
   #  Include/Guid/TpmInstance.h\r
   gEfiTpmDeviceSelectedGuid          = { 0x7f4158d3, 0x74d, 0x456d, { 0x8c, 0xb2, 0x1, 0xf9, 0xc8, 0xf7, 0x9d, 0xaa } }\r
   #  0x00000004      Deny execution when there is security violation.<BR>\r
   #  0x00000005      Query user when there is security violation.<BR>\r
   # @Prompt Set policy for the image from fixed media.\r
-  # @ValidRange 0x80000001 | 0x00000000 - 0x00000005 \r
+  # @ValidRange 0x80000001 | 0x00000000 - 0x00000005\r
   gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04|UINT32|0x00000003\r
 \r
-  ## Defer Image Load policy settings. The policy is bitwise. \r
-  #  If a bit is set, the image from corresponding device will be trusted when loading. Or  \r
+  ## Defer Image Load policy settings. The policy is bitwise.\r
+  #  If a bit is set, the image from corresponding device will be trusted when loading. Or\r
   #  the image will be deferred. The deferred image will be checked after user is identified.<BR><BR>\r
   #    BIT0       - Image from unknown device. <BR>\r
   #    BIT1       - Image from firmware volume.<BR>\r
   #    BIT3       - Image from removable media which includes CD-ROM, Floppy, USB and network.<BR>\r
   #    BIT4       - Image from fixed media device which includes hard disk.<BR>\r
   # @Prompt Set policy whether trust image before user identification.\r
-  # @ValidRange 0x80000002 | 0x00000000 - 0x0000001F \r
+  # @ValidRange 0x80000002 | 0x00000000 - 0x0000001F\r
   gEfiSecurityPkgTokenSpaceGuid.PcdDeferImageLoadPolicy|0x0000001F|UINT32|0x0000004\r
 \r
   ## Null-terminated Unicode string of the file name that is the default name to save USB credential.\r
   ## The size of Append variable buffer. This buffer is reserved for runtime use, OS can append data into one existing variable.\r
   #  Note: This PCD is not been used.\r
   # @Prompt Max variable size for append operation.\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdMaxAppendVariableSize|0x2000|UINT32|0x30000005  \r
+  gEfiSecurityPkgTokenSpaceGuid.PcdMaxAppendVariableSize|0x2000|UINT32|0x30000005\r
 \r
   ## Specifies the type of TCG platform that contains TPM chip.<BR><BR>\r
   #  If 0, TCG platform type is PC client.<BR>\r
   #  If 1, TCG platform type is PC server.<BR>\r
   # @Prompt Select platform type.\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass|0|UINT8|0x00000006\r
-  \r
+\r
   ## Progress Code for TPM device subclass definitions.<BR><BR>\r
   #  EFI_PERIPHERAL_TPM  = (EFI_PERIPHERAL | 0x000D0000) = 0x010D0000<BR>\r
   # @Prompt Status Code for TPM device definitions\r
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04|UINT32|0x00000001\r
 \r
   ## Indicates the presence or absence of the platform operator during firmware booting.\r
-  #  If platform operator is not physical presence during boot. TPM will be locked and the TPM commands \r
+  #  If platform operator is not physical presence during boot. TPM will be locked and the TPM commands\r
   #  that required operator physical presence can not run.<BR><BR>\r
   #   TRUE  - The platform operator is physically present.<BR>\r
   #   FALSE - The platform operator is not physically present.<BR>\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPhysicalPresence|TRUE|BOOLEAN|0x00010001\r
 \r
 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]\r
-  ## Indicates whether TPM physical presence is locked during platform initialization.  \r
+  ## Indicates whether TPM physical presence is locked during platform initialization.\r
   #  Once it is locked, it can not be unlocked for TPM life time.<BR><BR>\r
   #   TRUE  - Lock TPM physical presence asserting method.<BR>\r
   #   FALSE - Not lock TPM physical presence asserting method.<BR>\r
   #  If 0, no initialization needed - most likely used for chipset SRTM solution, in which TPM is already initialized.<BR>\r
   #  If 1, initialization needed.<BR>\r
   # @Prompt TPM 2.0 device initialization policy.<BR>\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy|1|UINT8|0x0001000A\r
 \r
   ## This PCD indicates the initialization policy for TPM 1.2.<BR><BR>\r
   #  If 0, no initialization needed - most likely used for chipset SRTM solution, in which TPM is already initialized.<BR>\r
   #  If 1, initialization needed.<BR>\r
   # @Prompt TPM 1.2 device initialization policy.\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy|1|UINT8|0x0001000B\r
 \r
   ## This PCD indicates the TPM 2.0 SelfTest policy.<BR><BR>\r
   #  if 0, no SelfTest needed - most likely used for fTPM, because it might already be tested.<BR>\r
   #  if 1, SelfTest needed.<BR>\r
   # @Prompt TPM 2.0 device selftest.\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2SelfTestPolicy|1|UINT8|0x0001000C\r
 \r
   ## This PCD indicates Static Core Root of Trust for Measurement (SCRTM) policy using TPM 2.0.<BR><BR>\r
   #  if 0, no SCRTM measurement needed - In this case, it is already done.<BR>\r
   #  if 1, SCRTM measurement done by BIOS.<BR>\r
   # @Prompt SCRTM policy setting for TPM 2.0 device.\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2ScrtmPolicy|1|UINT8|0x0001000D\r
 \r
   ## This PCD indicates Static Core Root of Trust for Measurement (SCRTM) policy using TPM 1.2.<BR><BR>\r
   #  if 0, no SCRTM measurement needed - In this case, it is already done.<BR>\r
   #  if 1, SCRTM measurement done by BIOS.<BR>\r
   # @Prompt SCRTM policy setting for TPM 1.2 device\r
-  # @ValidRange 0x80000001 | 0x00 - 0x1 \r
+  # @ValidRange 0x80000001 | 0x00 - 0x1\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmScrtmPolicy|1|UINT8|0x0001000E\r
 \r
   ## Guid name to identify TPM instance.<BR><BR>\r
   #  0 means dynamic get from supported HASH algorithm\r
   # @Prompt OEM configurated number of PCR banks.\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2NumberOfPCRBanks|0x0|UINT32|0x00010015\r
-  \r
+\r
   ## Provides one or more SHA 256 Hashes of the RSA 2048 public keys used to verify Recovery and Capsule Update images\r
   #  WARNING: The default value is treated as test key. Please do not use default value in the production.\r
   # @Prompt One or more SHA 256 Hashes of RSA 2048 bit public keys used to verify Recovery and Capsule Update images\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|"1.3"|VOID*|0x00000008\r
 \r
   ## Indicate whether a physical presence user exist.\r
-  # When it is configured to Dynamic or DynamicEx, it can be set through detection using \r
+  # When it is configured to Dynamic or DynamicEx, it can be set through detection using\r
   # a platform-specific method (e.g. Button pressed) in a actual platform in early boot phase.<BR><BR>\r
   # @Prompt A physical presence user status\r
   gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|FALSE|BOOLEAN|0x00010019\r
   #    BIT2  -  SHA384.<BR>\r
   #    BIT3  -  SHA512.<BR>\r
   # @Prompt Hash mask for TPM 2.0\r
-  # @ValidRange 0x80000001 | 0x00000000 - 0x0000000F \r
+  # @ValidRange 0x80000001 | 0x00000000 - 0x0000000F\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0x0000000F|UINT32|0x00010010\r
 \r
   ## This PCD indicated final BIOS supported Hash mask.\r
   gEfiSecurityPkgTokenSpaceGuid.PcdActiveTpmInterfaceType|0xFF|UINT8|0x0001001E\r
 \r
   ## This PCD records IdleByass status supported by current active TPM interface.\r
-  #  Accodingt to TCG PTP spec 1.3, TPM with CRB interface can skip idle state and \r
+  #  Accodingt to TCG PTP spec 1.3, TPM with CRB interface can skip idle state and\r
   #  diretcly move to CmdReady state. <BR>\r
   #  0x00 - Do not support IdleByPass.<BR>\r
   #  0x01 - Support IdleByPass.<BR>\r
index 000bc83d809bddfb1fd18c8b0f73254a268ccc66..400fe6015e6ff0d7b77dc7cd91c3eedeb3cd26eb 100644 (file)
@@ -11,7 +11,7 @@
 // the terms and conditions of the BSD License which accompanies this distribution.\r
 // The full text of the license may be found at\r
 // http://opensource.org/licenses/bsd-license.php\r
-// \r
+//\r
 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 //\r
                                                                                           "Accodingt to TCG PTP spec 1.3, TPM with CRB interface can skip idle state and diretcly move to CmdReady state. <BR>"\r
                                                                                           "0x01 - Do not support IdleByPass.<BR>\n"\r
                                                                                           "0x02 - Support IdleByPass.<BR>\n"\r
-                                                                                          "0xFF - IdleByPass State is not synced with TPM hardware.<BR>"
\ No newline at end of file
+                                                                                          "0xFF - IdleByPass State is not synced with TPM hardware.<BR>"\r
index d52875dbc6aa1544f4a6fc6268e0c35374e83f7a..21beb012e7c94dd92915b4bea447da24b1bd34a8 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Security Package Localized Strings and Content.\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials are licensed and made available under\r
 // the terms and conditions of the BSD License which accompanies this distribution.\r
@@ -13,7 +13,7 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_PACKAGE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_PACKAGE_NAME\r
+#language en-US\r
 "Security package"\r
 \r
index 4fc3330c3964d0d2851537d5aedcc09cd88df3c5..c16761bb3dd99cc71d807f4af625b2490352da3b 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
   TCG MOR (Memory Overwrite Request) Control Driver.\r
 \r
-  This driver initilize MemoryOverwriteRequestControl variable. It \r
+  This driver initilize MemoryOverwriteRequestControl variable. It\r
   will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do TPer Reset for\r
   those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL at EndOfDxe.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -36,7 +36,7 @@ OnReadyToBoot (
 {\r
   EFI_STATUS  Status;\r
   UINTN       DataSize;\r
-  \r
+\r
   if (MOR_CLEAR_MEMORY_VALUE (mMorControl) == 0x0) {\r
     //\r
     // MorControl is expected, directly return to avoid unnecessary variable operation\r
@@ -47,14 +47,14 @@ OnReadyToBoot (
   // Clear MOR_CLEAR_MEMORY_BIT\r
   //\r
   DEBUG ((EFI_D_INFO, "TcgMor: Clear MorClearMemory bit\n"));\r
-  mMorControl &= 0xFE;  \r
+  mMorControl &= 0xFE;\r
 \r
   DataSize = sizeof (mMorControl);\r
   Status   = gRT->SetVariable (\r
-               MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, \r
-               &gEfiMemoryOverwriteControlDataGuid, \r
+               MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME,\r
+               &gEfiMemoryOverwriteControlDataGuid,\r
                EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
-               DataSize, \r
+               DataSize,\r
                &mMorControl\r
                );\r
   if (EFI_ERROR (Status)) {\r
@@ -304,7 +304,7 @@ TPerResetAtEndOfDxe (
   @param[in] ImageHandle  Image handle of this driver.\r
   @param[in] SystemTable  A Pointer to the EFI System Table.\r
 \r
-  @retval EFI_SUCEESS     \r
+  @retval EFI_SUCEESS\r
   @return Others          Some error occurs.\r
 **/\r
 EFI_STATUS\r
@@ -324,10 +324,10 @@ MorDriverEntryPoint (
 \r
   DataSize = sizeof (mMorControl);\r
   Status = gRT->GetVariable (\r
-                  MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, \r
-                  &gEfiMemoryOverwriteControlDataGuid, \r
-                  NULL, \r
-                  &DataSize, \r
+                  MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME,\r
+                  &gEfiMemoryOverwriteControlDataGuid,\r
+                  NULL,\r
+                  &DataSize,\r
                   &mMorControl\r
                   );\r
   if (EFI_ERROR (Status)) {\r
@@ -336,10 +336,10 @@ MorDriverEntryPoint (
     //\r
     mMorControl = 0;\r
     Status = gRT->SetVariable (\r
-                    MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, \r
-                    &gEfiMemoryOverwriteControlDataGuid, \r
+                    MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME,\r
+                    &gEfiMemoryOverwriteControlDataGuid,\r
                     EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
-                    DataSize, \r
+                    DataSize,\r
                     &mMorControl\r
                     );\r
     DEBUG ((EFI_D_INFO, "TcgMor: Create MOR variable! Status = %r\n", Status));\r
index a4aae48a5f2a920ff2a826fa7845a027a91a3793..d717362ffd6efc45fbbe228a604162567ef99b79 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for TcgMor.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 7278fff4eb8f812a37ca95f4edbda9ae3725dc97..fe4d60d765cec67559d15dff37eb27ceeaaa4895 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgMor Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) MOR"\r
 \r
 \r
index 7763b1369435f1feefd340217f52b6cb0266bbad..7520be0c67ec97376481a246cb0cb188ac977aa5 100644 (file)
@@ -4,13 +4,13 @@
   This driver initilize MemoryOverwriteRequestControlLock variable.\r
   This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -51,7 +51,7 @@ IsAnyMorVariable (
   UINTN   Index;\r
 \r
   for (Index = 0; Index < sizeof(mMorVariableType)/sizeof(mMorVariableType[0]); Index++) {\r
-    if ((StrCmp (VariableName, mMorVariableType[Index].VariableName) == 0) && \r
+    if ((StrCmp (VariableName, mMorVariableType[Index].VariableName) == 0) &&\r
         (CompareGuid (VendorGuid, mMorVariableType[Index].VendorGuid))) {\r
       return TRUE;\r
     }\r
@@ -74,7 +74,7 @@ IsMorLockVariable (
   IN EFI_GUID                               *VendorGuid\r
   )\r
 {\r
-  if ((StrCmp (VariableName, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME) == 0) && \r
+  if ((StrCmp (VariableName, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME) == 0) &&\r
       (CompareGuid (VendorGuid, &gEfiMemoryOverwriteRequestControlLockGuid))) {\r
     return TRUE;\r
   }\r
@@ -142,7 +142,7 @@ SetVariableCheckHandlerMor (
     //\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Delete not OK\r
   //\r
@@ -173,7 +173,7 @@ SetVariableCheckHandlerMor (
   @param[in] ImageHandle  Image handle of this driver.\r
   @param[in] SystemTable  A Pointer to the EFI System Table.\r
 \r
-  @retval EFI_SUCEESS     \r
+  @retval EFI_SUCEESS\r
   @return Others          Some error occurs.\r
 **/\r
 EFI_STATUS\r
index af303575337ec3d62e9f103ce8868fd9ccc62803..6848f1cd386834df558c549cfedcb62383316505 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
    TCG MOR (Memory Overwrite Request) Lock Control Driver header file.\r
-   \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -125,7 +125,7 @@ SetVariableCheckHandlerMor (
   @param[in] ImageHandle  Image handle of this driver.\r
   @param[in] SystemTable  A Pointer to the EFI System Table.\r
 \r
-  @retval EFI_SUCEESS     \r
+  @retval EFI_SUCEESS\r
   @return Others          Some error occurs.\r
 **/\r
 EFI_STATUS\r
index 770092dafc7e67643c19de4f0dc4018296d10c77..67e0613cdcd942c8dc4af32e3ef31bcaddae823d 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgMorLock Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) MOR Lock"\r
 \r
 \r
index e5db98cc870ad51b4f9e159263db06fab75047e6..171504b912c1115bcf18cef5c5ad79d59fcc9f15 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
    TCG MOR (Memory Overwrite Request) Lock Control Driver SMM wrapper.\r
-   \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -130,7 +130,7 @@ MorLockDriverEntryPointSmm (
   // This driver link to Smm Variable driver\r
   //\r
   DEBUG ((EFI_D_INFO, "MorLockDriverEntryPointSmm\n"));\r
-  \r
+\r
   Status = gSmst->SmmLocateProtocol (\r
                   &gEfiSmmVariableProtocolGuid,\r
                   NULL,\r
index b1d6ed13d5b978bad060bf0c36d8e6173208409a..037f81ac24a7e26c8906d2e856d4875f6a1fa8a8 100644 (file)
@@ -369,7 +369,7 @@ typedef struct _EFI_ATA_COMMAND_BLOCK {
   UINT8 AtaDeviceHead;\r
   UINT8 AtaSectorNumberExp;\r
   UINT8 AtaCylinderLowExp;\r
-  UINT8 AtaCylinderHighExp; \r
+  UINT8 AtaCylinderHighExp;\r
   UINT8 AtaFeaturesExp;\r
   UINT8 AtaSectorCount;\r
   UINT8 AtaSectorCountExp;\r
@@ -386,7 +386,7 @@ typedef struct _EFI_ATA_STATUS_BLOCK {
   UINT8 AtaDeviceHead;\r
   UINT8 AtaSectorNumberExp;\r
   UINT8 AtaCylinderLowExp;\r
-  UINT8 AtaCylinderHighExp; \r
+  UINT8 AtaCylinderHighExp;\r
   UINT8 Reserved2;\r
   UINT8 AtaSectorCount;\r
   UINT8 AtaSectorCountExp;\r
index 3cfa80051fa47cf3593edbf260557d691be8db5c..2bca770620d2cd4015dedae48630e65254b7c6d2 100644 (file)
@@ -77,7 +77,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL  gOpalComponentName2;
 \r
 //\r
 // The max timeout value assume the user can wait for the revert action. The unit of this macro is second.\r
-// If the revert time value bigger than this one, driver needs to popup a dialog to let user confirm the \r
+// If the revert time value bigger than this one, driver needs to popup a dialog to let user confirm the\r
 // revert action.\r
 //\r
 #define MAX_ACCEPTABLE_REVERTING_TIME    10\r
@@ -258,7 +258,7 @@ OpalSupportGetAvailableActions(
   @param[in]      Msid               Msid\r
   @param[in]      MsidLength         Msid Length\r
   @param[in]      Password           Admin password\r
-  @param[in]      PassLength         Length of password in bytes \r
+  @param[in]      PassLength         Length of password in bytes\r
 \r
 **/\r
 TCG_RESULT\r
index 4817f99eff7e7d31de5d4176b2649f6dfb2a2cf9..4336604d0d1e2aa02ddd205d5ca2ac52da24a197 100644 (file)
@@ -728,7 +728,7 @@ DriverCallback(
         }\r
         *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;\r
         return EFI_SUCCESS;\r
\r
+\r
       case HII_KEY_ID_REVERT:\r
         DEBUG ((DEBUG_INFO,  "HII_KEY_ID_REVERT\n"));\r
         gHiiConfiguration.OpalRequest.Revert = Value->b;\r
index e694db8cf196c46a85778d15d934133401a74ea4..5117c7441124d3716e5fa46dd29e8984edc6e2dd 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  This driver produces PEI_LOCK_PHYSICAL_PRESENCE_PPI to indicate \r
-  whether TPM need be locked or not. It can be replaced by a platform \r
+  This driver produces PEI_LOCK_PHYSICAL_PRESENCE_PPI to indicate\r
+  whether TPM need be locked or not. It can be replaced by a platform\r
   specific driver.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -70,18 +70,18 @@ LockTpmPhysicalPresence (
   EFI_PHYSICAL_PRESENCE              TcgPpData;\r
 \r
   //\r
-  // The CRTM has sensed the physical presence assertion of the user. For example, \r
-  // the user has pressed the startup button or inserted a USB dongle. The details \r
+  // The CRTM has sensed the physical presence assertion of the user. For example,\r
+  // the user has pressed the startup button or inserted a USB dongle. The details\r
   // of the implementation are vendor-specific. Here we read a PCD value to indicate\r
   // whether operator physical presence.\r
-  // \r
+  //\r
   if (!PcdGetBool (PcdTpmPhysicalPresence)) {\r
     return TRUE;\r
   }\r
 \r
   //\r
-  // Check the pending TPM requests. Lock TPM physical presence if there is no TPM \r
-  // request.  \r
+  // Check the pending TPM requests. Lock TPM physical presence if there is no TPM\r
+  // request.\r
   //\r
   Status = PeiServicesLocatePpi (\r
              &gEfiPeiReadOnlyVariable2PpiGuid,\r
@@ -91,8 +91,8 @@ LockTpmPhysicalPresence (
              );\r
   if (!EFI_ERROR (Status)) {\r
     DataSize = sizeof (EFI_PHYSICAL_PRESENCE);\r
-    Status = Variable->GetVariable ( \r
-                         Variable, \r
+    Status = Variable->GetVariable (\r
+                         Variable,\r
                          PHYSICAL_PRESENCE_VARIABLE,\r
                          &gEfiPhysicalPresenceGuid,\r
                          NULL,\r
@@ -115,7 +115,7 @@ LockTpmPhysicalPresence (
 /**\r
   Entry point of this module.\r
 \r
-  It installs lock physical presence PPI. \r
+  It installs lock physical presence PPI.\r
 \r
   @param[in] FileHandle   Handle of the file being invoked.\r
   @param[in] PeiServices  Describes the list of possible PEI Services.\r
index cac1abea348c96a7c28388a222f6d4a7f7a83f54..f4c0e059e7b863e8dd04f44a0d6759921928435f 100644 (file)
@@ -2,10 +2,10 @@
 #  Produces a PPI to indicate whether to lock TPM in PEI phase\r
 #\r
 #  This module produces PEI_LOCK_PHYSICAL_PRESENCE_PPI to indicate whether\r
-#  TPM physical presence needs to be locked. It can be replaced by a \r
+#  TPM physical presence needs to be locked. It can be replaced by a\r
 #  platform specific module.\r
 #\r
-# Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPhysicalPresence  ## SOMETIMES_CONSUMES\r
 \r
-[Depex] \r
+[Depex]\r
   gEfiPeiMemoryDiscoveredPpiGuid AND\r
   gEfiPeiReadOnlyVariable2PpiGuid AND\r
   gPeiTpmInitializedPpiGuid\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   PhysicalPresencePeiExtra.uni\r
-  
\ No newline at end of file
+\r
index 0fb38dba82c691eb318acffe8a993f1b0fed60c4..6a5d663ee4e2e266e3f540eaedfdf5e5eb26b554 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // PhysicalPresencePei Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Physical Presence PEI"\r
 \r
 \r
index 1d44c99109d5f0f1a648d705ada5fcd97450ec89..015ab4544599ab5605f7df83868a7d0b04eefac6 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   VFR file used by the TCG2 configuration component.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -19,7 +19,7 @@ formset
   title     = STRING_TOKEN(STR_TCG2_TITLE),\r
   help      = STRING_TOKEN(STR_TCG2_HELP),\r
   classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID,\r
-  \r
+\r
   efivarstore TCG2_CONFIGURATION_INFO,\r
     varid = TCG2_CONFIGURATION_INFO_VARSTORE_ID,\r
     attribute = 0x02,  // EFI variable attribures  EFI_VARIABLE_BOOTSERVICE_ACCESS\r
@@ -154,7 +154,7 @@ formset
             option text = STRING_TOKEN(STR_TCG2_LOG_ALL_DIGESTS), value = TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS, flags = RESET_REQUIRED;\r
             option text = STRING_TOKEN(STR_TCG2_DISABLE_ENDORSEMENT_ENABLE_STORAGE_HIERARCHY), value = TCG2_PHYSICAL_PRESENCE_DISABLE_ENDORSEMENT_ENABLE_STORAGE_HIERARCHY, flags = RESET_REQUIRED;\r
     endoneof;\r
-    \r
+\r
     suppressif NOT questionref(Tpm2Operation) == TCG2_PHYSICAL_PRESENCE_SET_PCR_BANKS;\r
     numeric name = Tpm2OperationParameter,\r
             questionid = KEY_TPM2_OPERATION_PARAMETER,\r
index 9c590dcb74acded0b829c260c545768e47ad3947..4caeef19397826c5c6d872786f2b14e4f95ca115 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The module entry point for Tcg2 configuration module.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -277,7 +277,7 @@ Tcg2ConfigDriverEntryPoint (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   //\r
   // Create a private data structure.\r
   //\r
@@ -286,7 +286,7 @@ Tcg2ConfigDriverEntryPoint (
   mTcg2ConfigPrivateDate = PrivateData;\r
   //\r
   // Install private GUID.\r
-  //    \r
+  //\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &ImageHandle,\r
                   &gEfiCallerIdGuid,\r
@@ -398,7 +398,7 @@ Tcg2ConfigDriverEntryPoint (
                                      );\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
-  \r
+\r
   //\r
   // Install Tcg2 configuration form\r
   //\r
@@ -414,8 +414,8 @@ Tcg2ConfigDriverEntryPoint (
 ErrorExit:\r
   if (PrivateData != NULL) {\r
     UninstallTcg2ConfigForm (PrivateData);\r
-  }  \r
-  \r
+  }\r
+\r
   return Status;\r
 }\r
 \r
@@ -441,11 +441,11 @@ Tcg2ConfigDriverUnload (
                   ImageHandle,\r
                   &gEfiCallerIdGuid,\r
                   (VOID **) &PrivateData\r
-                  );  \r
+                  );\r
   if (EFI_ERROR (Status)) {\r
-    return Status;  \r
+    return Status;\r
   }\r
-  \r
+\r
   ASSERT (PrivateData->Signature == TCG2_CONFIG_PRIVATE_DATA_SIGNATURE);\r
 \r
   gBS->UninstallMultipleProtocolInterfaces (\r
@@ -454,7 +454,7 @@ Tcg2ConfigDriverUnload (
          PrivateData,\r
          NULL\r
          );\r
-  \r
+\r
   UninstallTcg2ConfigForm (PrivateData);\r
 \r
   return EFI_SUCCESS;\r
index a52709669ac64aa915ec2241d8fa0fff01bbf614..2343ab49aa79dbbcdbb120d5015ac97de225fa8b 100644 (file)
@@ -1,6 +1,6 @@
 ## @file\r
 #  TPM device configuration for TPM 2.0\r
-#  \r
+#\r
 #  By this module, user may select TPM device, clear TPM state, etc.\r
 #  NOTE: This module is only for reference only, each platform should have its own setup page.\r
 #\r
@@ -87,6 +87,6 @@
   gEfiHiiDatabaseProtocolGuid       AND\r
   gEfiVariableArchProtocolGuid      AND\r
   gEfiVariableWriteArchProtocolGuid\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   Tcg2ConfigDxeExtra.uni\r
index 37f81e17bdf3a8464e66f197a00f0f769b045b6c..b70db239707dc9a4df235f6a2dfa1b7a7e666752 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Tcg2ConfigDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG2 (Trusted Computing Group) Configuration DXE"\r
 \r
 \r
index af97628e2cdbf765c38cee15b3d2f3dafca52f9f..24ce3d29e18f3120396f3d56bb4db43d3a1b02b4 100644 (file)
@@ -4,12 +4,12 @@
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -53,7 +53,7 @@ HII_VENDOR_DEVICE_PATH          mTcg2HiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -66,7 +66,7 @@ UINT8  mCurrentPpRequest;
   Return if PTP CRB is supported.\r
 \r
   @param[in] Register                Pointer to PTP register.\r
-  \r
+\r
   @retval TRUE  PTP CRB is supported.\r
   @retval FALSE PTP CRB is unsupported.\r
 **/\r
@@ -94,7 +94,7 @@ IsPtpCrbSupported (
   Return if PTP FIFO is supported.\r
 \r
   @param[in] Register                Pointer to PTP register.\r
-  \r
+\r
   @retval TRUE  PTP FIFO is supported.\r
   @retval FALSE PTP FIFO is unsupported.\r
 **/\r
@@ -124,7 +124,7 @@ IsPtpFifoSupported (
 \r
   @param[in] Register                Pointer to PTP register.\r
   @param[in] PtpInterface            PTP interface type.\r
-  \r
+\r
   @retval EFI_SUCCESS                PTP interface type is set.\r
   @retval EFI_INVALID_PARAMETER      PTP interface type is invalid.\r
   @retval EFI_UNSUPPORTED            PTP interface type is unsupported.\r
@@ -299,7 +299,7 @@ SaveTcg2PCRBanksRequest (
   } else {\r
     mTcg2ConfigPrivateDate->PCRBanksDesired &= ~(0x1 << PCRBankIndex);\r
   }\r
-  \r
+\r
   ReturnCode = Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (TCG2_PHYSICAL_PRESENCE_SET_PCR_BANKS, mTcg2ConfigPrivateDate->PCRBanksDesired);\r
   if (ReturnCode == TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS) {\r
     Status = EFI_SUCCESS;\r
@@ -580,7 +580,7 @@ Tcg2Callback (
       }\r
     }\r
   }\r
-  \r
+\r
   if (Action == EFI_BROWSER_ACTION_CHANGED) {\r
     if (QuestionId == KEY_TPM_DEVICE) {\r
       return EFI_SUCCESS;\r
@@ -829,11 +829,11 @@ InstallTcg2ConfigForm (
            &gEfiHiiConfigAccessProtocolGuid,\r
            ConfigAccess,\r
            NULL\r
-           );  \r
+           );\r
 \r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   PrivateData->HiiHandle = HiiHandle;\r
 \r
   //\r
@@ -962,7 +962,7 @@ InstallTcg2ConfigForm (
     DEBUG ((EFI_D_ERROR, "Tcg2ConfigDriver: Fail to set TCG2_STORAGE_INFO_NAME\n"));\r
   }\r
 \r
-  return EFI_SUCCESS;  \r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -998,6 +998,6 @@ UninstallTcg2ConfigForm (
            );\r
     PrivateData->DriverHandle = NULL;\r
   }\r
-  \r
+\r
   FreePool (PrivateData);\r
 }\r
index 504212baa8dbd5e9d03915f1d0e1942821878b11..617ce3d4192f1d16294d6d92cacb80fb4913d549 100644 (file)
@@ -2,13 +2,13 @@
   The header file of HII Config Access protocol implementation of TCG2\r
   configuration module.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -62,7 +62,7 @@ typedef struct {
 \r
   EFI_HII_CONFIG_ACCESS_PROTOCOL    ConfigAccess;\r
   EFI_HII_HANDLE                    HiiHandle;\r
-  EFI_HANDLE                        DriverHandle;  \r
+  EFI_HANDLE                        DriverHandle;\r
 \r
   UINT8                             TpmDeviceDetected;\r
   EFI_TCG2_PROTOCOL                 *Tcg2Protocol;\r
index 5960446421e38d4b7fe5138c91cb9ccaff907585..8f36d44c6a80deacebec55ecbb4a3f7d11c47104 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Header file for NV data structure definition.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -65,7 +65,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_TCG2_EVENT_LOG_FORMAT_DEFAULT    EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2\r
 \r
 #define TCG2_PPI_VERSION_1_2                    0x322E31  // "1.2"\r
-#define TCG2_PPI_VERSION_1_3                    0x332E31  // "1.3" \r
+#define TCG2_PPI_VERSION_1_3                    0x332E31  // "1.3"\r
 \r
 //\r
 // Nv Data structure referenced by IFR, TPM device user desired\r
index 8dd0b63e48b112a2274b5f6f9e4c2ede7c212c1f..0d151ba019197ce49b3684bf0457eb7fef81f570 100644 (file)
@@ -4,7 +4,7 @@
 #  This module initializes TPM device type based on variable and detection.\r
 #  NOTE: This module is only for reference only, each platform should have its own setup page.\r
 #\r
-# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid                 ## PRODUCES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy         ## PRODUCES\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdTpmAutoDetection                ## CONSUMES \r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmAutoDetection                ## CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress                  ## SOMETIMES_CONSUMES\r
 \r
 [Depex]\r
   gEfiPeiMasterBootModePpiGuid AND\r
   gEfiPeiReadOnlyVariable2PpiGuid\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   Tcg2ConfigPeiExtra.uni\r
index 37f81e17bdf3a8464e66f197a00f0f769b045b6c..b70db239707dc9a4df235f6a2dfa1b7a7e666752 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Tcg2ConfigDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG2 (Trusted Computing Group) Configuration DXE"\r
 \r
 \r
index 004c7efe70b61b7e3068d63ad9f1986597df485e..c68aab35dbad4ff776f7c9031a32c56622fc55b2 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The module entry point for Tcg2 configuration module.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index a7d62bcbe646677ca6bdb5c717e9d0440f7383dc..69abe13f245ea589b630dfd265e5c901e0586d34 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   String definitions for TCG2 configuration form.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 7e6ca44205a64b9b87a87be508e3e0228655339b..12bb0947a10407f131cba9c74183fd46c6375987 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   TPM1.2/dTPM2.0 auto detection.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 8ee34a702ecb02456ff8805389c8cd2bac7f3a31..29da2d70e699793cdb448c71c408b1576df1692d 100644 (file)
@@ -1,18 +1,18 @@
 /** @file\r
   This module implements measuring PeCoff image for Tcg2 Protocol.\r
-  \r
+\r
   Caution: This file requires additional review when modified.\r
   This driver will have external input - PE/COFF image.\r
   This external input must be validated carefully to avoid security issue like\r
   buffer overflow, integer overflow.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -183,8 +183,8 @@ MeasurePeImageAndExtend (
   //\r
   if (Hdr.Pe32->FileHeader.Machine == IMAGE_FILE_MACHINE_IA64 && Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
     //\r
-    // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value \r
-    //       in the PE/COFF Header. If the MachineType is Itanium(IA64) and the \r
+    // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value\r
+    //       in the PE/COFF Header. If the MachineType is Itanium(IA64) and the\r
     //       Magic value in the OptionalHeader is EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC\r
     //       then override the magic value to EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC\r
     //\r
@@ -195,7 +195,7 @@ MeasurePeImageAndExtend (
     //\r
     Magic = Hdr.Pe32->OptionalHeader.Magic;\r
   }\r
-  \r
+\r
   //\r
   // 3.  Calculate the distance from the base of the image header to the image checksum address.\r
   // 4.  Hash the image header from its base to beginning of the image checksum.\r
@@ -218,7 +218,7 @@ MeasurePeImageAndExtend (
   Status = HashUpdate (HashHandle, HashBase, HashSize);\r
   if (EFI_ERROR (Status)) {\r
     goto Finish;\r
-  }  \r
+  }\r
 \r
   //\r
   // 5.  Skip over the image checksum (it occupies a single ULONG).\r
@@ -247,7 +247,7 @@ MeasurePeImageAndExtend (
       if (EFI_ERROR (Status)) {\r
         goto Finish;\r
       }\r
-    }    \r
+    }\r
   } else {\r
     //\r
     // 7.  Hash everything from the end of the checksum to the start of the Cert Directory.\r
@@ -261,7 +261,7 @@ MeasurePeImageAndExtend (
     } else {\r
       //\r
       // Use PE32+ offset\r
-      //    \r
+      //\r
       HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32);\r
       HashSize = (UINTN) (&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY]) - (UINTN) HashBase;\r
     }\r
@@ -290,7 +290,7 @@ MeasurePeImageAndExtend (
       HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY + 1];\r
       HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress);\r
     }\r
-    \r
+\r
     if (HashSize != 0) {\r
       Status  = HashUpdate (HashHandle, HashBase, HashSize);\r
       if (EFI_ERROR (Status)) {\r
index e2f346217aab9e276a5c06d6e9a618ec0fe5cfa6..aa463b287e79819d1f20cdc9f0d27795b8cbd3c8 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   This module implements Tcg2 Protocol.\r
-  \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -372,11 +372,11 @@ GetProcessorsCpuLocation (
 \r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-                                 The ProtocolCapability variable will not be populated. \r
+                                 The ProtocolCapability variable will not be populated.\r
   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
                                  The ProtocolCapability variable will not be populated.\r
   @retval EFI_BUFFER_TOO_SMALL   The ProtocolCapability variable is too small to hold the full response.\r
-                                 It will be partially populated (required Size field will be set). \r
+                                 It will be partially populated (required Size field will be set).\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -390,7 +390,7 @@ Tcg2GetCapability (
   if ((This == NULL) || (ProtocolCapability == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   DEBUG ((DEBUG_VERBOSE, "Size - 0x%x\n", ProtocolCapability->Size));\r
   DEBUG ((DEBUG_VERBOSE, " 1.1 - 0x%x, 1.0 - 0x%x\n", sizeof(EFI_TCG2_BOOT_SERVICE_CAPABILITY), sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0)));\r
 \r
@@ -398,7 +398,7 @@ Tcg2GetCapability (
     //\r
     // Handle the case that firmware support 1.1 but OS only support 1.0.\r
     //\r
-    if ((mTcgDxeData.BsCap.ProtocolVersion.Major > 0x01) || \r
+    if ((mTcgDxeData.BsCap.ProtocolVersion.Major > 0x01) ||\r
         ((mTcgDxeData.BsCap.ProtocolVersion.Major == 0x01) && ((mTcgDxeData.BsCap.ProtocolVersion.Minor > 0x00)))) {\r
       if (ProtocolCapability->Size >= sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0)) {\r
         CopyMem (ProtocolCapability, &mTcgDxeData.BsCap, sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0));\r
@@ -563,7 +563,7 @@ DumpEvent2 (
 \r
 /**\r
   This function returns size of TCG PCR event 2.\r
-  \r
+\r
   @param[in]  TcgPcrEvent2     TCG PCR event 2 structure.\r
 \r
   @return size of TCG PCR event 2.\r
@@ -623,7 +623,7 @@ DumpEventLog (
   UINTN                     NumberOfEvents;\r
 \r
   DEBUG ((EFI_D_INFO, "EventLogFormat: (0x%x)\n", EventLogFormat));\r
-  \r
+\r
   switch (EventLogFormat) {\r
   case EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2:\r
     EventHdr = (TCG_PCR_EVENT_HDR *)(UINTN)EventLogLocation;\r
@@ -647,7 +647,7 @@ DumpEventLog (
     break;\r
   case EFI_TCG2_EVENT_LOG_FORMAT_TCG_2:\r
     //\r
-    // Dump first event        \r
+    // Dump first event\r
     //\r
     EventHdr = (TCG_PCR_EVENT_HDR *)(UINTN)EventLogLocation;\r
     DumpEvent (EventHdr);\r
@@ -682,7 +682,7 @@ DumpEventLog (
 \r
 /**\r
   The EFI_TCG2_PROTOCOL Get Event Log function call allows a caller to\r
-  retrieve the address of a given event log and its last entry. \r
+  retrieve the address of a given event log and its last entry.\r
 \r
   @param[in]  This               Indicates the calling context\r
   @param[in]  EventLogFormat     The type of the event log for which the information is requested.\r
@@ -780,14 +780,14 @@ Tcg2GetEventLog (
 /**\r
   Add a new entry to the Event Log.\r
 \r
-  @param[in, out] EventLogPtr     Pointer to the Event Log data.  \r
-  @param[in, out] LogSize         Size of the Event Log.  \r
+  @param[in, out] EventLogPtr     Pointer to the Event Log data.\r
+  @param[in, out] LogSize         Size of the Event Log.\r
   @param[in]      MaxSize         Maximum size of the Event Log.\r
-  @param[in]      NewEventHdr     Pointer to a TCG_PCR_EVENT_HDR/TCG_PCR_EVENT_EX data structure.  \r
+  @param[in]      NewEventHdr     Pointer to a TCG_PCR_EVENT_HDR/TCG_PCR_EVENT_EX data structure.\r
   @param[in]      NewEventHdrSize New event header size.\r
-  @param[in]      NewEventData    Pointer to the new event data.  \r
+  @param[in]      NewEventData    Pointer to the new event data.\r
   @param[in]      NewEventSize    New event data size.\r
-  \r
+\r
   @retval EFI_SUCCESS           The new event log entry was added.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
 \r
@@ -838,9 +838,9 @@ TcgCommLogEvent (
   Add a new entry to the Event Log.\r
 \r
   @param[in] EventLogFormat  The type of the event log for which the information is requested.\r
-  @param[in] NewEventHdr     Pointer to a TCG_PCR_EVENT_HDR/TCG_PCR_EVENT_EX data structure.  \r
+  @param[in] NewEventHdr     Pointer to a TCG_PCR_EVENT_HDR/TCG_PCR_EVENT_EX data structure.\r
   @param[in] NewEventHdrSize New event header size.\r
-  @param[in] NewEventData    Pointer to the new event data.  \r
+  @param[in] NewEventData    Pointer to the new event data.\r
   @param[in] NewEventSize    New event data size.\r
 \r
   @retval EFI_SUCCESS           The new event log entry was added.\r
@@ -859,7 +859,7 @@ TcgDxeLogEvent (
   EFI_STATUS                Status;\r
   UINTN                     Index;\r
   TCG_EVENT_LOG_AREA_STRUCT *EventLogAreaStruct;\r
-  \r
+\r
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); Index++) {\r
     if (EventLogFormat == mTcg2EventInfo[Index].LogFormat) {\r
       break;\r
@@ -889,7 +889,7 @@ TcgDxeLogEvent (
              NewEventData,\r
              NewEventSize\r
              );\r
-  \r
+\r
   if (Status == EFI_OUT_OF_RESOURCES) {\r
     EventLogAreaStruct->EventLogTruncated = TRUE;\r
     return EFI_VOLUME_FULL;\r
@@ -1122,11 +1122,11 @@ TcgDxeLogHashEvent (
   and add an entry to the Event Log.\r
 \r
   @param[in]      Flags         Bitmap providing additional information.\r
-  @param[in]      HashData      Physical address of the start of the data buffer \r
+  @param[in]      HashData      Physical address of the start of the data buffer\r
                                 to be hashed, extended, and logged.\r
   @param[in]      HashDataLen   The length, in bytes, of the buffer referenced by HashData\r
-  @param[in, out] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.  \r
-  @param[in]      NewEventData  Pointer to the new event data.  \r
+  @param[in, out] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.\r
+  @param[in]      NewEventData  Pointer to the new event data.\r
 \r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
@@ -1176,13 +1176,13 @@ TcgDxeHashLogExtendEvent (
 /**\r
   The EFI_TCG2_PROTOCOL HashLogExtendEvent function call provides callers with\r
   an opportunity to extend and optionally log events without requiring\r
-  knowledge of actual TPM commands. \r
+  knowledge of actual TPM commands.\r
   The extend operation will occur even if this function cannot create an event\r
-  log entry (e.g. due to the event log being full). \r
+  log entry (e.g. due to the event log being full).\r
 \r
   @param[in]  This               Indicates the calling context\r
   @param[in]  Flags              Bitmap providing additional information.\r
-  @param[in]  DataToHash         Physical address of the start of the data buffer to be hashed. \r
+  @param[in]  DataToHash         Physical address of the start of the data buffer to be hashed.\r
   @param[in]  DataToHashLen      The length in bytes of the buffer referenced by DataToHash.\r
   @param[in]  Event              Pointer to data buffer containing information about the event.\r
 \r
@@ -1272,7 +1272,7 @@ Tcg2HashLogExtendEvent (
   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.\r
   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.\r
   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small. \r
+  @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1322,7 +1322,7 @@ Tcg2SubmitCommand (
   @param[out] ActivePcrBanks  Pointer to the variable receiving the bitmap of currently active PCR banks.\r
 \r
   @retval EFI_SUCCESS           The bitmap of active PCR banks was stored in the ActivePcrBanks parameter.\r
-  @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect. \r
+  @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1412,7 +1412,7 @@ Tcg2GetResultOfSetActivePcrBanks (
   if ((OperationPresent == NULL) || (Response == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   ReturnCode = Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (OperationPresent, Response);\r
   if (ReturnCode == TCG_PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS) {\r
     return EFI_SUCCESS;\r
@@ -1485,7 +1485,7 @@ SetupEventLog (
       mTcgDxeData.EventLogAreaStruct[Index].Lasa = Lasa;\r
       mTcgDxeData.EventLogAreaStruct[Index].Laml = PcdGet32 (PcdTcgLogAreaMinLen);\r
       //\r
-      // To initialize them as 0xFF is recommended \r
+      // To initialize them as 0xFF is recommended\r
       // because the OS can know the last entry for that.\r
       //\r
       SetMem ((VOID *)(UINTN)Lasa, PcdGet32 (PcdTcgLogAreaMinLen), 0xFF);\r
@@ -1631,7 +1631,7 @@ SetupEventLog (
         mTcgDxeData.FinalEventLogAreaStruct[Index].EventLogTruncated = FALSE;\r
 \r
         //\r
-        // Install to configuration table for EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 \r
+        // Install to configuration table for EFI_TCG2_EVENT_LOG_FORMAT_TCG_2\r
         //\r
         Status = gBS->InstallConfigurationTable (&gEfiTcg2FinalEventsTableGuid, (VOID *)mTcgDxeData.FinalEventsTable[Index]);\r
         if (EFI_ERROR (Status)) {\r
@@ -1652,7 +1652,7 @@ SetupEventLog (
       }\r
     }\r
   }\r
-  \r
+\r
   //\r
   // 3. Sync data from PEI to DXE\r
   //\r
@@ -1661,7 +1661,7 @@ SetupEventLog (
     if ((mTcgDxeData.BsCap.SupportedEventLogs & mTcg2EventInfo[Index].LogFormat) != 0) {\r
       GuidHob.Raw = GetHobList ();\r
       Status = EFI_SUCCESS;\r
-      while (!EFI_ERROR (Status) && \r
+      while (!EFI_ERROR (Status) &&\r
              (GuidHob.Raw = GetNextGuidHob (mTcg2EventInfo[Index].EventGuid, GuidHob.Raw)) != NULL) {\r
         TcgEvent    = AllocateCopyPool (GET_GUID_HOB_DATA_SIZE (GuidHob.Guid), GET_GUID_HOB_DATA (GuidHob.Guid));\r
         ASSERT (TcgEvent != NULL);\r
@@ -1729,8 +1729,8 @@ SetupEventLog (
   Measure and log an action string, and extend the measurement result into PCR[PCRIndex].\r
 \r
   @param[in] PCRIndex         PCRIndex to extend\r
-  @param[in] String           A specific string that indicates an Action event.  \r
-  \r
+  @param[in] String           A specific string that indicates an Action event.\r
+\r
   @retval EFI_SUCCESS         Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR    The operation was unsuccessful.\r
 \r
@@ -1778,7 +1778,7 @@ MeasureHandoffTables (
 \r
   if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_SERVER) {\r
     //\r
-    // Tcg Server spec. \r
+    // Tcg Server spec.\r
     // Measure each processor EFI_CPU_PHYSICAL_LOCATION with EV_TABLE_OF_DEVICES to PCR[1]\r
     //\r
     Status = GetProcessorsCpuLocation(&ProcessorLocBuf, &ProcessorNum);\r
@@ -1810,7 +1810,7 @@ MeasureHandoffTables (
 /**\r
   Measure and log Separator event, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in] PCRIndex         PCR index.  \r
+  @param[in] PCRIndex         PCR index.\r
 \r
   @retval EFI_SUCCESS         Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR    The operation was unsuccessful.\r
@@ -1842,13 +1842,13 @@ MeasureSeparatorEvent (
 /**\r
   Measure and log an EFI variable, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in]  PCRIndex          PCR Index.  \r
-  @param[in]  EventType         Event type.  \r
+  @param[in]  PCRIndex          PCR Index.\r
+  @param[in]  EventType         Event type.\r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -1928,13 +1928,13 @@ MeasureVariable (
 /**\r
   Read then Measure and log an EFI variable, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in]  PCRIndex          PCR Index.  \r
-  @param[in]  EventType         Event type.  \r
+  @param[in]  PCRIndex          PCR Index.\r
+  @param[in]  EventType         Event type.\r
   @param[in]   VarName          A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]   VendorGuid       A unique identifier for the vendor.\r
-  @param[out]  VarSize          The size of the variable data.  \r
-  @param[out]  VarData          Pointer to the content of the variable.  \r
\r
+  @param[out]  VarSize          The size of the variable data.\r
+  @param[out]  VarData          Pointer to the content of the variable.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -1987,9 +1987,9 @@ according to TCG PC Client PFP spec 0021 Section 2.4.4.2
 \r
   @param[in]   VarName          A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]   VendorGuid       A unique identifier for the vendor.\r
-  @param[out]  VarSize          The size of the variable data.  \r
-  @param[out]  VarData          Pointer to the content of the variable.  \r
\r
+  @param[out]  VarSize          The size of the variable data.\r
+  @param[out]  VarData          Pointer to the content of the variable.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -2018,9 +2018,9 @@ ReadAndMeasureBootVariable (
 \r
   @param[in]   VarName          A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]   VendorGuid       A unique identifier for the vendor.\r
-  @param[out]  VarSize          The size of the variable data.  \r
-  @param[out]  VarData          Pointer to the content of the variable.  \r
\r
+  @param[out]  VarSize          The size of the variable data.\r
+  @param[out]  VarData          Pointer to the content of the variable.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -2477,7 +2477,7 @@ OnResetNotificationInstall (
 \r
 /**\r
   The function install Tcg2 protocol.\r
-  \r
+\r
   @retval EFI_SUCCESS     Tcg2 protocol is installed.\r
   @retval other           Some error occurs.\r
 **/\r
@@ -2502,9 +2502,9 @@ InstallTcg2 (
 /**\r
   The driver's entry point. It publishes EFI Tcg2 Protocol.\r
 \r
-  @param[in] ImageHandle  The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable  A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS     The entry point is executed successfully.\r
   @retval other           Some error occurs when executing this entry point.\r
 **/\r
@@ -2537,18 +2537,18 @@ DriverEntry (
     DEBUG ((EFI_D_ERROR, "TPM2 error!\n"));\r
     return EFI_DEVICE_ERROR;\r
   }\r
-  \r
+\r
   Status = Tpm2RequestUseTpm ();\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "TPM2 not detected!\n"));\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Fill information\r
   //\r
   ASSERT (TCG_EVENT_LOG_AREA_COUNT_MAX == sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]));\r
-  \r
+\r
   mTcgDxeData.BsCap.Size = sizeof(EFI_TCG2_BOOT_SERVICE_CAPABILITY);\r
   mTcgDxeData.BsCap.ProtocolVersion.Major = 1;\r
   mTcgDxeData.BsCap.ProtocolVersion.Minor = 1;\r
@@ -2655,7 +2655,7 @@ DriverEntry (
                     );\r
 \r
     //\r
-    // Measure Exit Boot Service failed \r
+    // Measure Exit Boot Service failed\r
     //\r
     Status = gBS->CreateEventEx (\r
                     EVT_NOTIFY_SIGNAL,\r
index 59d6dc3dfb5483947757c087a8f5288faf98e631..2bc45bddf58dffa7b04099209da1a1bb3c1830aa 100644 (file)
@@ -14,7 +14,7 @@
 #  This external input must be validated carefully to avoid security issue like\r
 #  buffer overflow, integer overflow.\r
 #\r
-# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -78,7 +78,7 @@
   ## SOMETIMES_CONSUMES      ## Variable:L"db"\r
   ## SOMETIMES_CONSUMES      ## Variable:L"dbx"\r
   gEfiImageSecurityDatabaseGuid\r
-    \r
+\r
   gTcgEventEntryHobGuid                              ## SOMETIMES_CONSUMES  ## HOB\r
   gTpmErrorHobGuid                                   ## SOMETIMES_CONSUMES  ## HOB\r
   gEfiEventExitBootServicesGuid                      ## CONSUMES            ## Event\r
index dadcd1a79ea505648e92d7e0201cb42db4722a18..9e14a4e3fd24494df04323d8faa2258b4a31c8d2 100644 (file)
@@ -2,13 +2,13 @@
 // Produces TCG2 protocol and measure boot environment\r
 //\r
 // This module will produce TCG2 protocol and measure boot environment.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - PE/COFF image.\r
 // This external input must be validated carefully to avoid security issue like\r
 // buffer overflow, integer overflow.\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index 1cd59a33a3b15c05b04349bada841ab325eaf828..d772c567970ac7e84402c25cff070b19d7a7e829 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Tcg2Dxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,6 +12,6 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG2 (Trusted Computing Group) DXE"\r
index 3758fc6a41fbdbb64416d37cc9428503409cb188..74cdd1fa88f0a182d1ca4964b41f882a99e5b4a3 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Initialize TPM2 device and measure FVs before handing off control to DXE.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2017, Microsoft Corporation.  All rights reserved. <BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -119,12 +119,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR           mNotifyList[] = {
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   },\r
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfo2PpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   },\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
@@ -136,7 +136,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR           mNotifyList[] = {
 \r
 /**\r
   Record all measured Firmware Volum Information into a Guid Hob\r
-  Guid Hob payload layout is \r
+  Guid Hob payload layout is\r
 \r
      UINT32 *************************** FIRMWARE_BLOB number\r
      EFI_PLATFORM_FIRMWARE_BLOB******** BLOB Array\r
@@ -156,13 +156,13 @@ EndofPeiSignalNotifyCallBack (
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
   )\r
-{  \r
+{\r
   MEASURED_HOB_DATA *MeasuredHobData;\r
 \r
   MeasuredHobData = NULL;\r
 \r
   //\r
-  // Create a Guid hob to save all measured Fv \r
+  // Create a Guid hob to save all measured Fv\r
   //\r
   MeasuredHobData = BuildGuidHob(\r
                       &gMeasuredFvHobGuid,\r
@@ -358,11 +358,11 @@ LogHashEvent (
   added into the Event Log.\r
 \r
   @param[in]      Flags         Bitmap providing additional information.\r
-  @param[in]      HashData      Physical address of the start of the data buffer \r
+  @param[in]      HashData      Physical address of the start of the data buffer\r
                                 to be hashed, extended, and logged.\r
   @param[in]      HashDataLen   The length, in bytes, of the buffer referenced by HashData.\r
-  @param[in]      NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.  \r
-  @param[in]      NewEventData  Pointer to the new event data.  \r
+  @param[in]      NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.\r
+  @param[in]      NewEventData  Pointer to the new event data.\r
 \r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
@@ -396,7 +396,7 @@ HashLogExtendEvent (
       Status = LogHashEvent (&DigestList, NewEventHdr, NewEventData);\r
     }\r
   }\r
-  \r
+\r
   if (Status == EFI_DEVICE_ERROR) {\r
     DEBUG ((EFI_D_ERROR, "HashLogExtendEvent - %r. Disable TPM.\n", Status));\r
     BuildGuidHob (&gTpmErrorHobGuid,0);\r
@@ -443,13 +443,13 @@ MeasureCRTMVersion (
 }\r
 \r
 /**\r
-  Measure FV image. \r
-  Add it into the measured FV list after the FV is measured successfully. \r
+  Measure FV image.\r
+  Add it into the measured FV list after the FV is measured successfully.\r
 \r
   @param[in]  FvBase            Base address of FV image.\r
   @param[in]  FvLength          Length of FV image.\r
 \r
-  @retval EFI_SUCCESS           Fv image is measured successfully \r
+  @retval EFI_SUCCESS           Fv image is measured successfully\r
                                 or it has been already measured.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
   @retval EFI_DEVICE_ERROR      The command was unsuccessful.\r
@@ -705,21 +705,21 @@ FirmwareVolmeInfoPpiNotifyCallback (
   // The PEI Core can not dispatch or load files from memory mapped FVs that do not support FvPpi.\r
   //\r
   Status = PeiServicesLocatePpi (\r
-             &Fv->FvFormat, \r
-             0, \r
+             &Fv->FvFormat,\r
+             0,\r
              NULL,\r
              (VOID**)&FvPpi\r
              );\r
   if (EFI_ERROR (Status)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // This is an FV from an FFS file, and the parent FV must have already been measured,\r
   // No need to measure twice, so just record the FV and return\r
   //\r
   if (Fv->ParentFvName != NULL || Fv->ParentFileName != NULL ) {\r
-    \r
+\r
     ASSERT (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported));\r
     if (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
       //\r
@@ -761,7 +761,7 @@ PeimEntryMP (
   ASSERT (mMeasuredBaseFvInfo != NULL);\r
   mMeasuredChildFvInfo = (EFI_PLATFORM_FIRMWARE_BLOB *) AllocateZeroPool (sizeof (EFI_PLATFORM_FIRMWARE_BLOB) * PcdGet32 (PcdPeiCoreMaxFvSupported));\r
   ASSERT (mMeasuredChildFvInfo != NULL);\r
-  \r
+\r
   if (PcdGet8 (PcdTpm2ScrtmPolicy) == 1) {\r
     Status = MeasureCRTMVersion ();\r
   }\r
@@ -785,7 +785,7 @@ PeimEntryMP (
 /**\r
   Measure and log Separator event with error, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in] PCRIndex         PCR index.  \r
+  @param[in] PCRIndex         PCR index.\r
 \r
   @retval EFI_SUCCESS         Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR    The operation was unsuccessful.\r
@@ -885,7 +885,7 @@ PeimEntryMA (
         goto Done;\r
       }\r
     }\r
-    \r
+\r
     //\r
     // Update Tpm2HashMask according to PCR bank.\r
     //\r
index dea6dcc0e3bb1310d88058d05a1cbd9596f78a0b..848b8b4d6d8692becbc4fca7b6b6cbdf8796e4a9 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Tcg2Pei Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG2 (Trusted Computing Group) PEI"\r
 \r
 \r
index 26f1fbdf8cdb8fcf5eb9f15b648bd4e0a120e495..21b1014a3bc7de6a5a5db2c1377a4675bcf2823c 100644 (file)
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -82,7 +82,7 @@ PhysicalPresenceCallback (
     mTcgNvs->PhysicalPresence.LastRequest = MostRecentRequest;\r
     mTcgNvs->PhysicalPresence.Response = Response;\r
     return EFI_SUCCESS;\r
-  } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS) \r
+  } else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)\r
           || (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {\r
 \r
     OperationRequest = mTcgNvs->PhysicalPresence.Request;\r
@@ -163,7 +163,7 @@ MemoryClearCallback (
                            DataSize,\r
                            &MorControl\r
                            );\r
-  if (EFI_ERROR (Status)) { \r
+  if (EFI_ERROR (Status)) {\r
     mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;\r
     DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));\r
   }\r
@@ -201,7 +201,7 @@ AssignOpRegion (
   for (OpRegion  = (AML_OP_REGION_32_8 *) (Table + 1);\r
        OpRegion <= (AML_OP_REGION_32_8 *) ((UINT8 *) Table + Table->Length);\r
        OpRegion  = (AML_OP_REGION_32_8 *) ((UINT8 *) OpRegion + 1)) {\r
-    if ((OpRegion->OpRegionOp  == AML_EXT_REGION_OP) && \r
+    if ((OpRegion->OpRegionOp  == AML_EXT_REGION_OP) &&\r
         (OpRegion->NameString  == Name) &&\r
         (OpRegion->DWordPrefix == AML_DWORD_PREFIX) &&\r
         (OpRegion->BytePrefix  == AML_BYTE_PREFIX)) {\r
@@ -219,7 +219,7 @@ AssignOpRegion (
 }\r
 \r
 /**\r
-  Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM \r
+  Patch version string of Physical Presence interface supported by platform. The initial string tag in TPM\r
 ACPI table is "$PV".\r
 \r
   @param[in, out] Table          The TPM item in ACPI table.\r
@@ -536,7 +536,7 @@ UpdateHID (
   if (!EFI_ERROR(Status)) {\r
     DEBUG((EFI_D_INFO, "TPM_PT_MANUFACTURER 0x%08x\n", ManufacturerID));\r
     //\r
-    // ManufacturerID defined in TCG Vendor ID Registry \r
+    // ManufacturerID defined in TCG Vendor ID Registry\r
     // may tailed with 0x00 or 0x20\r
     //\r
     if ((ManufacturerID >> 24) == 0x00 || ((ManufacturerID >> 24) == 0x20)) {\r
@@ -571,7 +571,7 @@ UpdateHID (
     } else {\r
       AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));\r
     }\r
-    \r
+\r
   } else {\r
     DEBUG ((EFI_D_ERROR, "Get TPM_PT_FIRMWARE_VERSION_X failed %x!\n", Status));\r
     ASSERT(FALSE);\r
@@ -742,7 +742,7 @@ PublishTpm2 (
 \r
   //\r
   // PlatformClass is only valid for version 4 and above\r
-  //    BIT0~15:  PlatformClass \r
+  //    BIT0~15:  PlatformClass\r
   //    BIT16~31: Reserved\r
   //\r
   if (mTpm2AcpiTemplate.Header.Revision >= EFI_TPM2_ACPI_TABLE_REVISION_4) {\r
@@ -808,12 +808,12 @@ PublishTpm2 (
 /**\r
   The driver's entry point.\r
 \r
-  It install callbacks for TPM physical presence and MemoryClear, and locate \r
+  It install callbacks for TPM physical presence and MemoryClear, and locate\r
   SMM variable to be used in the callback function.\r
 \r
-  @param[in] ImageHandle  The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable  A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS     The entry point is executed successfully.\r
   @retval Others          Some error occurs when executing this entry point.\r
 \r
@@ -858,7 +858,7 @@ InitializeTcgSmm (
     return Status;\r
   }\r
   mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;\r
-  \r
+\r
   //\r
   // Locate SmmVariableProtocol.\r
   //\r
index e3a14e8339bc83482a6003d74d344c837ef23654..176a8d59f0925edf5c118d0839a963fc1fd62c22 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for Tcg2 SMM driver.\r
-  \r
+\r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index 168f9779e65138a51a64759cf6f580eb19a62d06..142941e269b3e820e5dc80ae3a94e92ec311f5ed 100644 (file)
@@ -8,8 +8,8 @@
 #    TPM2.0 ACPI device object\r
 #     "TCG PC Client Platform Firmware Profile Specification for TPM Family 2.0 Level 00 Revision 00.21"\r
 #\r
-#  This driver implements TPM 2.0 definition block in ACPI table and \r
-#  registers SMI callback functions for Tcg2 physical presence and \r
+#  This driver implements TPM 2.0 definition block in ACPI table and\r
+#  registers SMI callback functions for Tcg2 physical presence and\r
 #  MemoryClear to handle the requests from ACPI method.\r
 #\r
 #  Caution: This module requires additional review when modified.\r
@@ -62,9 +62,9 @@
 \r
 [Guids]\r
   ## SOMETIMES_PRODUCES ## Variable:L"MemoryOverwriteRequestControl"\r
-  ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"  \r
+  ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"\r
   gEfiMemoryOverwriteControlDataGuid\r
-  \r
+\r
   gEfiTpmDeviceInstanceTpm20DtpmGuid                            ## PRODUCES           ## GUID       # TPM device identifier\r
 \r
 [Protocols]\r
index 297e71a06d123533948fe882b658b285e9966d97..11f47fa5e82c87f4048c74cd4e2bd82c4496f46f 100644 (file)
@@ -4,12 +4,12 @@
 // This driver implements TPM 2.0 definition block in ACPI table and\r
 // registers SMI callback functions for TCG2 physical presence and\r
 // MemoryClear to handle the requests from ACPI method.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - variable and ACPINvs data in SMM mode.\r
 // This external input must be validated carefully to avoid security issue.\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index e2a7b1d02f9748caa20f2576dc1101f772d1b1bc..caef3f37e87641741ccce8ae5a3b69f85b496dd2 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // Tcg2Smm Localized Strings and Content\r
 //\r
-// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG2 (Trusted Computing Group) SMM"\r
 \r
 \r
index f58efca1443de177d451849b29ccf5535fa5c139..50dea0ab9ad4f82fd3257dc7365fe1c3da79da5a 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
-  The TPM2 definition block in ACPI table for TCG2 physical presence  \r
+  The TPM2 definition block in ACPI table for TCG2 physical presence\r
   and MemoryClear.\r
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (c)Copyright 2016 HP Development Company, L.P.<BR>\r
 Copyright (c) 2017, Microsoft Corporation.  All rights reserved. <BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -49,7 +49,7 @@ DefinitionBlock (
       //\r
       OperationRegion (SMIP, SystemIO, 0xB2, 1)\r
       Field (SMIP, ByteAcc, NoLock, Preserve)\r
-      { \r
+      {\r
           IOB2, 8\r
       }\r
 \r
@@ -247,12 +247,12 @@ DefinitionBlock (
       }\r
 \r
       Method (PTS, 1, Serialized)\r
-      {  \r
+      {\r
         //\r
         // Detect Sx state for MOR, only S4, S5 need to handle\r
         //\r
         If (LAnd (LLess (Arg0, 6), LGreater (Arg0, 3)))\r
-        {   \r
+        {\r
           //\r
           // Bit4 -- DisableAutoDetect. 0 -- Firmware MAY autodetect.\r
           //\r
@@ -262,7 +262,7 @@ DefinitionBlock (
             // Triggle the SMI through ACPI _PTS method.\r
             //\r
             Store (0x02, MCIP)\r
-              \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -270,7 +270,7 @@ DefinitionBlock (
           }\r
         }\r
         Return (0)\r
-      }   \r
+      }\r
 \r
       Method (_STA, 0)\r
       {\r
@@ -320,12 +320,12 @@ DefinitionBlock (
       }\r
 \r
       Name(TPM2, Package (0x02){\r
-        Zero, \r
+        Zero,\r
         Zero\r
       })\r
 \r
       Name(TPM3, Package (0x03){\r
-        Zero, \r
+        Zero,\r
         Zero,\r
         Zero\r
       })\r
@@ -334,7 +334,7 @@ DefinitionBlock (
       // TCG Physical Presence Interface\r
       //\r
       Method (TPPI, 3, Serialized, 0, {BuffObj, PkgObj, IntObj, StrObj}, {UnknownObj, UnknownObj, UnknownObj}) // IntObj, IntObj, PkgObj\r
-      {        \r
+      {\r
         //\r
         // Switch by function index\r
         //\r
@@ -359,11 +359,11 @@ DefinitionBlock (
             //\r
             // b) Submit TPM Operation Request to Pre-OS Environment\r
             //\r
-                  \r
+\r
             Store (DerefOf (Index (Arg2, 0x00)), PPRQ)\r
             Store (0, PPRM)\r
             Store (0x02, PPIP)\r
-              \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -377,7 +377,7 @@ DefinitionBlock (
             //\r
             // c) Get Pending TPM Operation Requested By the OS\r
             //\r
-                  \r
+\r
             Store (PPRQ, Index (TPM2, 0x01))\r
             Return (TPM2)\r
           }\r
@@ -394,12 +394,12 @@ DefinitionBlock (
             // e) Return TPM Operation Response to OS Environment\r
             //\r
             Store (0x05, PPIP)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
             Store (PPIN, IOB2)\r
-                  \r
+\r
             Store (LPPR, Index (TPM3, 0x01))\r
             Store (PPRP, Index (TPM3, 0x02))\r
 \r
@@ -426,11 +426,11 @@ DefinitionBlock (
             If (LEqual (PPRQ, 23)) {\r
               Store (DerefOf (Index (Arg2, 0x01)), PPRM)\r
             }\r
-                \r
+\r
             //\r
-            // Triggle the SMI interrupt \r
+            // Triggle the SMI interrupt\r
             //\r
-            Store (PPIN, IOB2)  \r
+            Store (PPIN, IOB2)\r
             Return (FRET)\r
           }\r
           Case (8)\r
@@ -440,12 +440,12 @@ DefinitionBlock (
             //\r
             Store (8, PPIP)\r
             Store (DerefOf (Index (Arg2, 0x00)), UCRQ)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
             Store (PPIN, IOB2)\r
-                  \r
+\r
             Return (FRET)\r
           }\r
 \r
@@ -474,12 +474,12 @@ DefinitionBlock (
             // Save the Operation Value of the Request to MORD (reserved memory)\r
             //\r
             Store (DerefOf (Index (Arg2, 0x00)), MORD)\r
-                  \r
+\r
             //\r
             // Triggle the SMI through ACPI _DSM method.\r
             //\r
             Store (0x01, MCIP)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -488,7 +488,7 @@ DefinitionBlock (
           }\r
           Default {BreakPoint}\r
         }\r
-        Return (1)        \r
+        Return (1)\r
       }\r
 \r
       Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})\r
index 94e3229e883a4061fb7ada7f78c12439d247a2d8..b0a7bf6f478a39a500a5d9cceb5a6af4078496b2 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   VFR file used by the TCG configuration component.\r
 \r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -53,7 +53,7 @@ formset
             option text = STRING_TOKEN(STR_TPM_DEACTIVATE_DISABLE), value = PHYSICAL_PRESENCE_DEACTIVATE_DISABLE, flags = 0;\r
           endif\r
           //\r
-          // Clear (TPM_ORD_ForceClear) command is not available when disabled or deactivated. \r
+          // Clear (TPM_ORD_ForceClear) command is not available when disabled or deactivated.\r
           //\r
           suppressif ideqval TCG_CONFIGURATION.TpmEnable == 0 OR\r
                      ideqval TCG_CONFIGURATION.TpmActivate == 0;\r
@@ -62,7 +62,7 @@ formset
           endif\r
 \r
           option text = STRING_TOKEN(STR_ENABLE), value = PHYSICAL_PRESENCE_ENABLE, flags = DEFAULT;\r
-          option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE, flags = 0;          \r
+          option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE, flags = 0;\r
           option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR, flags = 0;\r
           option text = STRING_TOKEN(STR_TPM_ENABLE_ACTIVATE_CLEAR_E_A), value = PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE, flags = 0;\r
     endoneof;\r
index a9d310545630a1b8f941fb59bb8578fb0e16979a..22e586bd19e24ab41120ffffd8052536995f9eb1 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The module entry point for Tcg configuration module.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -53,7 +53,7 @@ TcgConfigDriverEntryPoint (
   if (EFI_ERROR (Status)) {\r
     TcgProtocol = NULL;\r
   }\r
-  \r
+\r
   Status = gBS->OpenProtocol (\r
                   ImageHandle,\r
                   &gEfiCallerIdGuid,\r
@@ -65,7 +65,7 @@ TcgConfigDriverEntryPoint (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   //\r
   // Create a private data structure.\r
   //\r
@@ -92,7 +92,7 @@ TcgConfigDriverEntryPoint (
 \r
   //\r
   // Install private GUID.\r
-  //    \r
+  //\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &ImageHandle,\r
                   &gEfiCallerIdGuid,\r
@@ -109,8 +109,8 @@ TcgConfigDriverEntryPoint (
 ErrorExit:\r
   if (PrivateData != NULL) {\r
     UninstallTcgConfigForm (PrivateData);\r
-  }  \r
-  \r
+  }\r
+\r
   return Status;\r
 }\r
 \r
@@ -136,11 +136,11 @@ TcgConfigDriverUnload (
                   ImageHandle,\r
                   &gEfiCallerIdGuid,\r
                   (VOID **) &PrivateData\r
-                  );  \r
+                  );\r
   if (EFI_ERROR (Status)) {\r
-    return Status;  \r
+    return Status;\r
   }\r
-  \r
+\r
   ASSERT (PrivateData->Signature == TCG_CONFIG_PRIVATE_DATA_SIGNATURE);\r
 \r
   gBS->UninstallMultipleProtocolInterfaces (\r
@@ -149,7 +149,7 @@ TcgConfigDriverUnload (
          PrivateData,\r
          NULL\r
          );\r
-  \r
+\r
   UninstallTcgConfigForm (PrivateData);\r
 \r
   return EFI_SUCCESS;\r
index 82fc35eea00f79c88b8cdc2c5e9d20f21d1a7309..22ff80aae2ff41dcab81c9bad906f04d923892e6 100644 (file)
@@ -2,7 +2,7 @@
 #  Provides the capability to update TPM state setup browser\r
 #  By this module, user may enable/disable/activate/deactivate/clear TPM, etc.\r
 #\r
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -58,7 +58,7 @@
   ## SOMETIMES_PRODUCES ## Variable:L"PhysicalPresence"\r
   ## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresence"\r
   gEfiPhysicalPresenceGuid\r
-  \r
+\r
   gEfiIfrTianoGuid                                    ## SOMETIMES_PRODUCES  ## GUID       # HII opcode\r
   ## PRODUCES            ## HII\r
   ## CONSUMES            ## HII\r
@@ -78,6 +78,6 @@
   gEfiHiiDatabaseProtocolGuid       AND\r
   gEfiVariableArchProtocolGuid      AND\r
   gEfiVariableWriteArchProtocolGuid\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   TcgConfigDxeExtra.uni\r
index 2856bf1d4068c85f96b3da8f21663afbe764fc13..6b9928feeeb62b8f2f7e82cd342cfcb251cebfee 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgConfigDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) Config DXE"\r
 \r
 \r
index 7fa5611cfd9476f3d0010df977216f9e6ca6fab0..a306bbbb5c96f6f231b8c62f7d540d497a778362 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   HII Config Access protocol implementation of TCG configuration module.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -40,7 +40,7 @@ HII_VENDOR_DEVICE_PATH          mTcgHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -73,7 +73,7 @@ GetTpmState (
   UINT8                         CmdBuf[64];\r
 \r
   ASSERT (TcgProtocol != NULL);\r
-  \r
+\r
   //\r
   // Get TPM Permanent flags (TpmEnable, TpmActivate)\r
   //\r
@@ -82,7 +82,7 @@ GetTpmState (
     *(UINT16*)&CmdBuf[0]  = SwapBytes16 (TPM_TAG_RQU_COMMAND);\r
     *(UINT32*)&CmdBuf[2]  = SwapBytes32 (TpmSendSize);\r
     *(UINT32*)&CmdBuf[6]  = SwapBytes32 (TPM_ORD_GetCapability);\r
-  \r
+\r
     *(UINT32*)&CmdBuf[10] = SwapBytes32 (TPM_CAP_FLAG);\r
     *(UINT32*)&CmdBuf[14] = SwapBytes32 (sizeof (TPM_CAP_FLAG_PERMANENT));\r
     *(UINT32*)&CmdBuf[18] = SwapBytes32 (TPM_CAP_FLAG_PERMANENT);\r
@@ -93,12 +93,12 @@ GetTpmState (
                             CmdBuf,\r
                             sizeof (CmdBuf),\r
                             CmdBuf\r
-                            ); \r
+                            );\r
     TpmRsp = (TPM_RSP_COMMAND_HDR *) &CmdBuf[0];\r
     if (EFI_ERROR (Status) || (TpmRsp->tag != SwapBytes16 (TPM_TAG_RSP_COMMAND)) || (TpmRsp->returnCode != 0)) {\r
       return EFI_DEVICE_ERROR;\r
     }\r
-  \r
+\r
     TpmPermanentFlags = (TPM_PERMANENT_FLAGS *) &CmdBuf[sizeof (TPM_RSP_COMMAND_HDR) + sizeof (UINT32)];\r
 \r
     if (TpmEnable != NULL) {\r
@@ -109,8 +109,8 @@ GetTpmState (
       *TpmActivate = (BOOLEAN) !TpmPermanentFlags->deactivated;\r
     }\r
   }\r
\r
-  return EFI_SUCCESS;  \r
+\r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -175,7 +175,7 @@ TcgExtractConfig (
 \r
   //\r
   // Convert buffer data to <ConfigResp> by helper function BlockToConfig()\r
-  //  \r
+  //\r
   PrivateData->Configuration->TpmOperation = PHYSICAL_PRESENCE_ENABLE;\r
 \r
   //\r
@@ -321,8 +321,8 @@ SavePpRequest (
                   );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
-  }                \r
-                  \r
+  }\r
+\r
   PpData.PPRequest = PpRequest;\r
   Status = gRT->SetVariable (\r
                   PHYSICAL_PRESENCE_VARIABLE,\r
@@ -400,7 +400,7 @@ TcgCallback (
 \r
   SavePpRequest (Value->u8);\r
   *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -458,14 +458,14 @@ InstallTcgConfigForm (
            &gEfiHiiConfigAccessProtocolGuid,\r
            ConfigAccess,\r
            NULL\r
-           );  \r
+           );\r
 \r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   PrivateData->HiiHandle = HiiHandle;\r
 \r
-  return EFI_SUCCESS;  \r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
index a03abaa1ddef429c77d3c5c68ace8adfd4c9ccdd..6d26a188be7f0522c066231421eaf682b6b0e23d 100644 (file)
@@ -2,13 +2,13 @@
   The header file of HII Config Access protocol implementation of TCG\r
   configuration module.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -59,7 +59,7 @@ typedef struct {
 \r
   EFI_HII_CONFIG_ACCESS_PROTOCOL    ConfigAccess;\r
   EFI_HII_HANDLE                    HiiHandle;\r
-  EFI_HANDLE                        DriverHandle;  \r
+  EFI_HANDLE                        DriverHandle;\r
 \r
   TCG_CONFIGURATION                 *Configuration;\r
   EFI_TCG_PROTOCOL                  *TcgProtocol;\r
index eaa6fe801862dd945c84513f7e29c6eee0f2f24e..d821a7218be765eaec3824754023c814409ee511 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Header file for NV data structure definition.\r
 \r
-Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index fd8458dc00fd3f36728ffa1eae7504271706eac4..7a84462a6ea7b346a304e7b03a22e7b6f2bff9b8 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   String definitions for TCG configuration form.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -37,4 +37,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_NULL                           #language en-US ""\r
 \r
 #string STR_HIDE_TPM_PROMPT                #language en-US "Hide TPM"\r
-#string STR_HIDE_TPM_HELP                  #language en-US "Check to hide TPM in OS"
\ No newline at end of file
+#string STR_HIDE_TPM_HELP                  #language en-US "Check to hide TPM in OS"\r
index 4a90c5ccef1632edc5967fd9cce2469f975ffcc9..21837fe3d3506d66a5b0a8b8785fd3047b9088f9 100644 (file)
@@ -1,6 +1,6 @@
-/** @file  \r
+/** @file\r
   This module implements TCG EFI Protocol.\r
\r
+\r
 Caution: This module requires additional review when modified.\r
 This driver will have external input - TcgDxePassThroughToTpm\r
 This external input must be validated carefully to avoid security issue like\r
@@ -8,14 +8,14 @@ buffer overflow, integer overflow.
 \r
 TcgDxePassThroughToTpm() will receive untrusted input and do basic validation.\r
 \r
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -86,8 +86,8 @@ EFI_TCG_CLIENT_ACPI_TABLE           mTcgClientAcpiTemplate = {
 //\r
 // The following EFI_TCG_SERVER_ACPI_TABLE default setting is just one example,\r
 // the TPM device connectes to LPC, and also defined the ACPI _UID as 0xFF,\r
-// this _UID can be changed and should match with the _UID setting of the TPM \r
-// ACPI device object  \r
+// this _UID can be changed and should match with the _UID setting of the TPM\r
+// ACPI device object\r
 //\r
 EFI_TCG_SERVER_ACPI_TABLE           mTcgServerAcpiTemplate = {\r
   {\r
@@ -209,26 +209,26 @@ GetProcessorsCpuLocation (
 }\r
 \r
 /**\r
-  This service provides EFI protocol capability information, state information \r
+  This service provides EFI protocol capability information, state information\r
   about the TPM, and Event Log state information.\r
 \r
   @param[in]  This               Indicates the calling context\r
-  @param[out] ProtocolCapability The callee allocates memory for a TCG_BOOT_SERVICE_CAPABILITY \r
-                                 structure and fills in the fields with the EFI protocol \r
+  @param[out] ProtocolCapability The callee allocates memory for a TCG_BOOT_SERVICE_CAPABILITY\r
+                                 structure and fills in the fields with the EFI protocol\r
                                  capability information and the current TPM state information.\r
-  @param[out] TCGFeatureFlags    This is a pointer to the feature flags. No feature \r
-                                 flags are currently defined so this parameter \r
-                                 MUST be set to 0. However, in the future, \r
-                                 feature flags may be defined that, for example, \r
+  @param[out] TCGFeatureFlags    This is a pointer to the feature flags. No feature\r
+                                 flags are currently defined so this parameter\r
+                                 MUST be set to 0. However, in the future,\r
+                                 feature flags may be defined that, for example,\r
                                  enable hash algorithm agility.\r
   @param[out] EventLogLocation   This is a pointer to the address of the event log in memory.\r
-  @param[out] EventLogLastEntry  If the Event Log contains more than one entry, \r
-                                 this is a pointer to the address of the start of \r
-                                 the last entry in the event log in memory. \r
+  @param[out] EventLogLastEntry  If the Event Log contains more than one entry,\r
+                                 this is a pointer to the address of the start of\r
+                                 the last entry in the event log in memory.\r
 \r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER  ProtocolCapability does not match TCG capability.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -307,21 +307,21 @@ TpmCommHashAll (
 \r
 /**\r
   This service abstracts the capability to do a hash operation on a data buffer.\r
-  \r
+\r
   @param[in]      This             Indicates the calling context\r
   @param[in]      HashData         Pointer to the data buffer to be hashed\r
   @param[in]      HashDataLen      Length of the data buffer to be hashed\r
   @param[in]      AlgorithmId      Identification of the Algorithm to use for the hashing operation\r
   @param[in, out] HashedDataLen    Resultant length of the hashed data\r
-  @param[in, out] HashedDataResult Resultant buffer of the hashed data  \r
-  \r
+  @param[in, out] HashedDataResult Resultant buffer of the hashed data\r
+\r
   @retval EFI_SUCCESS              Operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER    HashDataLen is NULL.\r
   @retval EFI_INVALID_PARAMETER    HashDataLenResult is NULL.\r
   @retval EFI_OUT_OF_RESOURCES     Cannot allocate buffer of size *HashedDataLen.\r
   @retval EFI_UNSUPPORTED          AlgorithmId not supported.\r
   @retval EFI_BUFFER_TOO_SMALL     *HashedDataLen < sizeof (TCG_DIGEST).\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -356,7 +356,7 @@ TcgDxeHashAll (
 \r
       if (*HashedDataResult == NULL) {\r
         *HashedDataResult = AllocatePool ((UINTN) *HashedDataLen);\r
-      } \r
+      }\r
 \r
       return TpmCommHashAll (\r
                HashData,\r
@@ -419,9 +419,9 @@ TpmCommLogEvent (
   Add a new entry to the Event Log.\r
 \r
   @param[in] TcgData       TCG_DXE_DATA structure.\r
-  @param[in] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.  \r
-  @param[in] NewEventData  Pointer to the new event data.  \r
-  \r
+  @param[in] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.\r
+  @param[in] NewEventData  Pointer to the new event data.\r
+\r
   @retval EFI_SUCCESS           The new event log entry was added.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
 \r
@@ -459,18 +459,18 @@ TcgDxeLogEventI (
   This service abstracts the capability to add an entry to the Event Log.\r
 \r
   @param[in]      This           Indicates the calling context\r
-  @param[in]      TCGLogData     Pointer to the start of the data buffer containing \r
-                                 the TCG_PCR_EVENT data structure. All fields in \r
+  @param[in]      TCGLogData     Pointer to the start of the data buffer containing\r
+                                 the TCG_PCR_EVENT data structure. All fields in\r
                                  this structure are properly filled by the caller.\r
   @param[in, out] EventNumber    The event number of the event just logged\r
-  @param[in]      Flags          Indicate additional flags. Only one flag has been \r
-                                 defined at this time, which is 0x01 and means the \r
-                                 extend operation should not be performed. All \r
-                                 other bits are reserved. \r
\r
+  @param[in]      Flags          Indicate additional flags. Only one flag has been\r
+                                 defined at this time, which is 0x01 and means the\r
+                                 extend operation should not be performed. All\r
+                                 other bits are reserved.\r
+\r
   @retval EFI_SUCCESS            Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES   Insufficient memory in the event log to complete this action.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -488,7 +488,7 @@ TcgDxeLogEvent (
   }\r
 \r
   TcgData = TCG_DXE_DATA_FROM_THIS (This);\r
-  \r
+\r
   if (TcgData->BsCap.TPMDeactivatedFlag || (!TcgData->BsCap.TPMPresentFlag)) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
@@ -512,7 +512,7 @@ TcgDxeLogEvent (
   @retval     EFI_INVALID_PARAMETER       Invalid ordinal.\r
   @retval     EFI_UNSUPPORTED             Current Task Priority Level  >= EFI_TPL_CALLBACK.\r
   @retval     EFI_TIMEOUT                 The TIS timed-out.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -524,8 +524,8 @@ TcgDxePassThroughToTpm (
   IN      UINT8                     *TpmOutputParameterBlock\r
   )\r
 {\r
-  if (TpmInputParameterBlock == NULL || \r
-      TpmOutputParameterBlock == NULL || \r
+  if (TpmInputParameterBlock == NULL ||\r
+      TpmOutputParameterBlock == NULL ||\r
       TpmInputParameterBlockSize == 0 ||\r
       TpmOutputParameterBlockSize == 0) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -544,11 +544,11 @@ TcgDxePassThroughToTpm (
   and add an entry to the Event Log.\r
 \r
   @param[in]      TcgData       TCG_DXE_DATA structure.\r
-  @param[in]      HashData      Physical address of the start of the data buffer \r
+  @param[in]      HashData      Physical address of the start of the data buffer\r
                                 to be hashed, extended, and logged.\r
   @param[in]      HashDataLen   The length, in bytes, of the buffer referenced by HashData\r
-  @param[in, out] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.  \r
-  @param[in]      NewEventData  Pointer to the new event data.  \r
+  @param[in, out] NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.\r
+  @param[in]      NewEventData  Pointer to the new event data.\r
 \r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
@@ -611,24 +611,24 @@ Done:
   extend a specific TPM PCR with the hash result, and add an entry to the Event Log\r
 \r
   @param[in]      This               Indicates the calling context\r
-  @param[in]      HashData           Physical address of the start of the data buffer \r
+  @param[in]      HashData           Physical address of the start of the data buffer\r
                                      to be hashed, extended, and logged.\r
   @param[in]      HashDataLen        The length, in bytes, of the buffer referenced by HashData\r
   @param[in]      AlgorithmId        Identification of the Algorithm to use for the hashing operation\r
-  @param[in, out] TCGLogData         The physical address of the start of the data \r
+  @param[in, out] TCGLogData         The physical address of the start of the data\r
                                      buffer containing the TCG_PCR_EVENT data structure.\r
   @param[in, out] EventNumber        The event number of the event just logged.\r
-  @param[out]     EventLogLastEntry  Physical address of the first byte of the entry \r
-                                     just placed in the Event Log. If the Event Log was \r
-                                     empty when this function was called then this physical \r
-                                     address will be the same as the physical address of \r
+  @param[out]     EventLogLastEntry  Physical address of the first byte of the entry\r
+                                     just placed in the Event Log. If the Event Log was\r
+                                     empty when this function was called then this physical\r
+                                     address will be the same as the physical address of\r
                                      the start of the Event Log.\r
 \r
   @retval EFI_SUCCESS                Operation completed successfully.\r
   @retval EFI_UNSUPPORTED            AlgorithmId != TPM_ALG_SHA.\r
   @retval EFI_UNSUPPORTED            Current TPL >= EFI_TPL_CALLBACK.\r
   @retval EFI_DEVICE_ERROR           The command was unsuccessful.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -650,15 +650,15 @@ TcgDxeHashLogExtendEvent (
   }\r
 \r
   TcgData = TCG_DXE_DATA_FROM_THIS (This);\r
-  \r
+\r
   if (TcgData->BsCap.TPMDeactivatedFlag || (!TcgData->BsCap.TPMPresentFlag)) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
-    \r
+\r
   if (AlgorithmId != TPM_ALG_SHA) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   if (HashData == 0 && HashDataLen > 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -717,10 +717,10 @@ SetupEventLog (
   TCG_PCR_EVENT         *TcgEvent;\r
   EFI_PEI_HOB_POINTERS  GuidHob;\r
   EFI_PHYSICAL_ADDRESS  Lasa;\r
-  \r
+\r
   if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_CLIENT) {\r
     Lasa = mTcgClientAcpiTemplate.Lasa;\r
-  \r
+\r
     Status = gBS->AllocatePages (\r
                     AllocateMaxAddress,\r
                     EfiACPIMemoryNVS,\r
@@ -732,15 +732,15 @@ SetupEventLog (
     }\r
     mTcgClientAcpiTemplate.Lasa = Lasa;\r
     //\r
-    // To initialize them as 0xFF is recommended \r
+    // To initialize them as 0xFF is recommended\r
     // because the OS can know the last entry for that.\r
     //\r
     SetMem ((VOID *)(UINTN)mTcgClientAcpiTemplate.Lasa, PcdGet32 (PcdTcgLogAreaMinLen), 0xFF);\r
     mTcgClientAcpiTemplate.Laml = PcdGet32 (PcdTcgLogAreaMinLen);\r
-  \r
+\r
   } else {\r
     Lasa = mTcgServerAcpiTemplate.Lasa;\r
-  \r
+\r
     Status = gBS->AllocatePages (\r
                     AllocateMaxAddress,\r
                     EfiACPIMemoryNVS,\r
@@ -752,7 +752,7 @@ SetupEventLog (
     }\r
     mTcgServerAcpiTemplate.Lasa = Lasa;\r
     //\r
-    // To initialize them as 0xFF is recommended \r
+    // To initialize them as 0xFF is recommended\r
     // because the OS can know the last entry for that.\r
     //\r
     SetMem ((VOID *)(UINTN)mTcgServerAcpiTemplate.Lasa, PcdGet32 (PcdTcgLogAreaMinLen), 0xFF);\r
@@ -760,7 +760,7 @@ SetupEventLog (
   }\r
 \r
   GuidHob.Raw = GetHobList ();\r
-  while (!EFI_ERROR (Status) && \r
+  while (!EFI_ERROR (Status) &&\r
          (GuidHob.Raw = GetNextGuidHob (&gTcgEventEntryHobGuid, GuidHob.Raw)) != NULL) {\r
     TcgEvent    = GET_GUID_HOB_DATA (GuidHob.Guid);\r
     GuidHob.Raw = GET_NEXT_HOB (GuidHob);\r
@@ -777,8 +777,8 @@ SetupEventLog (
 /**\r
   Measure and log an action string, and extend the measurement result into PCR[5].\r
 \r
-  @param[in] String           A specific string that indicates an Action event.  \r
-  \r
+  @param[in] String           A specific string that indicates an Action event.\r
+\r
   @retval EFI_SUCCESS         Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR    The operation was unsuccessful.\r
 \r
@@ -827,7 +827,7 @@ MeasureHandoffTables (
 \r
   if (PcdGet8 (PcdTpmPlatformClass) == TCG_PLATFORM_TYPE_SERVER) {\r
     //\r
-    // Tcg Server spec. \r
+    // Tcg Server spec.\r
     // Measure each processor EFI_CPU_PHYSICAL_LOCATION with EV_TABLE_OF_DEVICES to PCR[1]\r
     //\r
     Status = GetProcessorsCpuLocation(&ProcessorLocBuf, &ProcessorNum);\r
@@ -859,7 +859,7 @@ MeasureHandoffTables (
 /**\r
   Measure and log Separator event, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in] PCRIndex         PCR index.  \r
+  @param[in] PCRIndex         PCR index.\r
 \r
   @retval EFI_SUCCESS         Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR    The operation was unsuccessful.\r
@@ -895,7 +895,7 @@ MeasureSeparatorEvent (
 \r
   @param[in]  VarName     A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid  A unique identifier for the vendor.\r
-  @param[out] VarSize     The size of the variable data.  \r
+  @param[out] VarSize     The size of the variable data.\r
 \r
   @return A pointer to the buffer to return the contents of the variable.Otherwise NULL.\r
 \r
@@ -944,13 +944,13 @@ ReadVariable (
 /**\r
   Measure and log an EFI variable, and extend the measurement result into a specific PCR.\r
 \r
-  @param[in]  PCRIndex          PCR Index.  \r
-  @param[in]  EventType         Event type.  \r
+  @param[in]  PCRIndex          PCR Index.\r
+  @param[in]  EventType         Event type.\r
   @param[in]  VarName           A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]  VendorGuid        A unique identifier for the vendor.\r
-  @param[in]  VarData           The content of the variable data.  \r
-  @param[in]  VarSize           The size of the variable data.  \r
\r
+  @param[in]  VarData           The content of the variable data.\r
+  @param[in]  VarSize           The size of the variable data.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -1013,9 +1013,9 @@ MeasureVariable (
 \r
   @param[in]   VarName          A Null-terminated string that is the name of the vendor's variable.\r
   @param[in]   VendorGuid       A unique identifier for the vendor.\r
-  @param[out]  VarSize          The size of the variable data.  \r
-  @param[out]  VarData          Pointer to the content of the variable.  \r
\r
+  @param[out]  VarSize          The size of the variable data.\r
+  @param[out]  VarData          Pointer to the content of the variable.\r
+\r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
   @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
@@ -1197,9 +1197,9 @@ OnReadyToBoot (
 /**\r
   Install TCG ACPI Table when ACPI Table Protocol is available.\r
 \r
-  A system's firmware uses an ACPI table to identify the system's TCG capabilities \r
-  to the Post-Boot environment. The information in this ACPI table is not guaranteed \r
-  to be valid until the Host Platform transitions from pre-boot state to post-boot state.  \r
+  A system's firmware uses an ACPI table to identify the system's TCG capabilities\r
+  to the Post-Boot environment. The information in this ACPI table is not guaranteed\r
+  to be valid until the Host Platform transitions from pre-boot state to post-boot state.\r
 \r
   @param[in]  Event     Event whose notification function is being invoked\r
   @param[in]  Context   Pointer to the notification function's context\r
@@ -1230,7 +1230,7 @@ InstallAcpiTable (
     mTcgClientAcpiTemplate.Header.CreatorId        = PcdGet32 (PcdAcpiDefaultCreatorId);\r
     mTcgClientAcpiTemplate.Header.CreatorRevision  = PcdGet32 (PcdAcpiDefaultCreatorRevision);\r
     //\r
-    // The ACPI table must be checksumed before calling the InstallAcpiTable() \r
+    // The ACPI table must be checksumed before calling the InstallAcpiTable()\r
     // service of the ACPI table protocol to install it.\r
     //\r
     Checksum = CalculateCheckSum8 ((UINT8 *)&mTcgClientAcpiTemplate, sizeof (mTcgClientAcpiTemplate));\r
@@ -1250,7 +1250,7 @@ InstallAcpiTable (
     mTcgServerAcpiTemplate.Header.CreatorId        = PcdGet32 (PcdAcpiDefaultCreatorId);\r
     mTcgServerAcpiTemplate.Header.CreatorRevision  = PcdGet32 (PcdAcpiDefaultCreatorRevision);\r
     //\r
-    // The ACPI table must be checksumed before calling the InstallAcpiTable() \r
+    // The ACPI table must be checksumed before calling the InstallAcpiTable()\r
     // service of the ACPI table protocol to install it.\r
     //\r
     Checksum = CalculateCheckSum8 ((UINT8 *)&mTcgServerAcpiTemplate, sizeof (mTcgServerAcpiTemplate));\r
@@ -1341,7 +1341,7 @@ OnExitBootServicesFailed (
 /**\r
   Get TPM Deactivated state.\r
 \r
-  @param[out] TPMDeactivatedFlag   Returns TPM Deactivated state.  \r
+  @param[out] TPMDeactivatedFlag   Returns TPM Deactivated state.\r
 \r
   @retval EFI_SUCCESS              Operation completed successfully.\r
   @retval EFI_DEVICE_ERROR         The operation was unsuccessful.\r
@@ -1368,9 +1368,9 @@ GetTpmStatus (
 \r
   It publishes EFI TCG Protocol.\r
 \r
-  @param[in] ImageHandle  The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable  A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS     The entry point is executed successfully.\r
   @retval other           Some error occurs when executing this entry point.\r
 \r
@@ -1444,7 +1444,7 @@ DriverEntry (
                     );\r
 \r
     //\r
-    // Measure Exit Boot Service failed \r
+    // Measure Exit Boot Service failed\r
     //\r
     Status = gBS->CreateEventEx (\r
                     EVT_NOTIFY_SIGNAL,\r
@@ -1460,6 +1460,6 @@ DriverEntry (
   // Install ACPI Table\r
   //\r
   EfiCreateProtocolNotifyEvent (&gEfiAcpiTableProtocolGuid, TPL_CALLBACK, InstallAcpiTable, NULL, &Registration);\r
-  \r
+\r
   return Status;\r
 }\r
index 1b96ecbe2a77db9d6cb1e9f47455bae070c3bd77..320f55210a437c513b78c77c6f37c9d9b0c1a3b8 100644 (file)
@@ -2,7 +2,7 @@
 #  Produces TCG protocol and measures boot environment\r
 #  This module will produce TCG protocol and measure boot environment.\r
 #\r
-# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -65,7 +65,7 @@
   gEfiTcgProtocolGuid                                ## PRODUCES\r
   gEfiAcpiTableProtocolGuid                          ## NOTIFY\r
   gEfiMpServiceProtocolGuid                          ## SOMETIMES_CONSUMES\r
-  \r
+\r
 [Pcd]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmPlatformClass              ## SOMETIMES_CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid               ## CONSUMES\r
@@ -83,4 +83,4 @@
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   TcgDxeExtra.uni\r
-  
\ No newline at end of file
+\r
index f6f8b634e036f143a871cf6ac2ef00e67a5dad89..1d83daddfb8100854415606968af4b26c15c90c2 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) DXE"\r
 \r
 \r
index 63807f44ff6963811879957fea182baf86837047..1ed11a1b2964bd50357d0cf7065e32fcdae73452 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Initialize TPM device and measure FVs before handing off control to DXE.\r
 \r
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -129,12 +129,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR           mNotifyList[] = {
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   },\r
   {\r
     EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
     &gEfiPeiFirmwareVolumeInfo2PpiGuid,\r
-    FirmwareVolmeInfoPpiNotifyCallback \r
+    FirmwareVolmeInfoPpiNotifyCallback\r
   },\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
@@ -145,7 +145,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR           mNotifyList[] = {
 \r
 /**\r
   Record all measured Firmware Volum Information into a Guid Hob\r
-  Guid Hob payload layout is \r
+  Guid Hob payload layout is\r
 \r
      UINT32 *************************** FIRMWARE_BLOB number\r
      EFI_PLATFORM_FIRMWARE_BLOB******** BLOB Array\r
@@ -165,13 +165,13 @@ EndofPeiSignalNotifyCallBack (
   IN EFI_PEI_NOTIFY_DESCRIPTOR     *NotifyDescriptor,\r
   IN VOID                          *Ppi\r
   )\r
-{  \r
+{\r
   MEASURED_HOB_DATA *MeasuredHobData;\r
 \r
   MeasuredHobData = NULL;\r
 \r
   //\r
-  // Create a Guid hob to save all measured Fv \r
+  // Create a Guid hob to save all measured Fv\r
   //\r
   MeasuredHobData = BuildGuidHob(\r
                       &gMeasuredFvHobGuid,\r
@@ -238,11 +238,11 @@ TpmCommHashAll (
   added into the Event Log.\r
 \r
   @param[in]      PeiServices   Describes the list of possible PEI Services.\r
-  @param[in]      HashData      Physical address of the start of the data buffer \r
+  @param[in]      HashData      Physical address of the start of the data buffer\r
                                 to be hashed, extended, and logged.\r
   @param[in]      HashDataLen   The length, in bytes, of the buffer referenced by HashData.\r
-  @param[in]      NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.  \r
-  @param[in]      NewEventData  Pointer to the new event data.  \r
+  @param[in]      NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data structure.\r
+  @param[in]      NewEventData  Pointer to the new event data.\r
 \r
   @retval EFI_SUCCESS           Operation completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
@@ -260,7 +260,7 @@ HashLogExtendEvent (
 {\r
   EFI_STATUS                        Status;\r
   VOID                              *HobData;\r
-  \r
+\r
   if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
@@ -349,13 +349,13 @@ MeasureCRTMVersion (
 }\r
 \r
 /**\r
-  Measure FV image. \r
-  Add it into the measured FV list after the FV is measured successfully. \r
+  Measure FV image.\r
+  Add it into the measured FV list after the FV is measured successfully.\r
 \r
   @param[in]  FvBase            Base address of FV image.\r
   @param[in]  FvLength          Length of FV image.\r
 \r
-  @retval EFI_SUCCESS           Fv image is measured successfully \r
+  @retval EFI_SUCCESS           Fv image is measured successfully\r
                                 or it has been already measured.\r
   @retval EFI_OUT_OF_RESOURCES  No enough memory to log the new event.\r
   @retval EFI_DEVICE_ERROR      The command was unsuccessful.\r
@@ -394,7 +394,7 @@ MeasureFvImage (
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Measure and record the FV to the TPM\r
   //\r
@@ -450,7 +450,7 @@ MeasureMainBios (
   EFI_PEI_FV_HANDLE                 VolumeHandle;\r
   EFI_FV_INFO                       VolumeInfo;\r
   EFI_PEI_FIRMWARE_VOLUME_PPI       *FvPpi;\r
-  \r
+\r
   FvInstances    = 0;\r
   while (TRUE) {\r
     //\r
@@ -462,7 +462,7 @@ MeasureMainBios (
     if (EFI_ERROR (Status)) {\r
       break;\r
     }\r
-  \r
+\r
     //\r
     // Measure and record the firmware volume that is dispatched by PeiCore\r
     //\r
@@ -472,8 +472,8 @@ MeasureMainBios (
     // Locate the corresponding FV_PPI according to founded FV's format guid\r
     //\r
     Status = PeiServicesLocatePpi (\r
-               &VolumeInfo.FvFormat, \r
-               0, \r
+               &VolumeInfo.FvFormat,\r
+               0,\r
                NULL,\r
                (VOID**)&FvPpi\r
                );\r
@@ -517,21 +517,21 @@ FirmwareVolmeInfoPpiNotifyCallback (
   // The PEI Core can not dispatch or load files from memory mapped FVs that do not support FvPpi.\r
   //\r
   Status = PeiServicesLocatePpi (\r
-             &Fv->FvFormat, \r
-             0, \r
+             &Fv->FvFormat,\r
+             0,\r
              NULL,\r
              (VOID**)&FvPpi\r
              );\r
   if (EFI_ERROR (Status)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // This is an FV from an FFS file, and the parent FV must have already been measured,\r
   // No need to measure twice, so just record the FV and return\r
   //\r
   if (Fv->ParentFvName != NULL || Fv->ParentFileName != NULL ) {\r
-    \r
+\r
     ASSERT (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported));\r
     if (mMeasuredChildFvIndex < PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
       //\r
@@ -588,7 +588,7 @@ PhysicalPresencePpiNotifyCallback (
   //\r
   if (PcdGetBool (PcdPhysicalPresenceLifetimeLock) && !TpmPermanentFlags.physicalPresenceLifetimeLock) {\r
     //\r
-    // Lock TPM LifetimeLock is required, and LifetimeLock is not locked yet. \r
+    // Lock TPM LifetimeLock is required, and LifetimeLock is not locked yet.\r
     //\r
     PhysicalPresenceValue = TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK;\r
     TpmPermanentFlags.physicalPresenceLifetimeLock = TRUE;\r
@@ -605,8 +605,8 @@ PhysicalPresencePpiNotifyCallback (
       PhysicalPresenceValue |= TPM_PHYSICAL_PRESENCE_HW_ENABLE;\r
     } else {\r
       PhysicalPresenceValue |= TPM_PHYSICAL_PRESENCE_HW_DISABLE;\r
-    }      \r
-     \r
+    }\r
+\r
     Status = Tpm12PhysicalPresence (\r
                PhysicalPresenceValue\r
                );\r
@@ -614,7 +614,7 @@ PhysicalPresencePpiNotifyCallback (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // 2. Lock physical presence if it is required.\r
   //\r
@@ -645,7 +645,7 @@ PhysicalPresencePpiNotifyCallback (
 \r
   //\r
   // Lock physical presence\r
-  // \r
+  //\r
   Status = Tpm12PhysicalPresence (\r
               TPM_PHYSICAL_PRESENCE_LOCK\r
               );\r
@@ -695,8 +695,8 @@ PeimEntryMP (
   EFI_STATUS                        Status;\r
 \r
   Status = PeiServicesLocatePpi (\r
-               &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid, \r
-               0, \r
+               &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid,\r
+               0,\r
                NULL,\r
                (VOID**)&mMeasurementExcludedFvPpi\r
                );\r
@@ -718,13 +718,13 @@ PeimEntryMP (
     }\r
 \r
     Status = MeasureMainBios (PeiServices);\r
-  }  \r
+  }\r
 \r
   //\r
   // Post callbacks:\r
   // 1). for the FvInfoPpi services to measure and record\r
   // the additional Fvs to TPM\r
-  // 2). for the OperatorPresencePpi service to determine whether to \r
+  // 2). for the OperatorPresencePpi service to determine whether to\r
   // lock the TPM\r
   //\r
   Status = PeiServicesNotifyPpi (&mNotifyList[0]);\r
index 57ce7263e909ac5928edb0f43e665eac205fe24f..2573cd37d75d65551cc8e5cb5ffcb39bc280c851 100644 (file)
@@ -4,7 +4,7 @@
 #  This module will initialize TPM device, measure reported FVs and BIOS version.\r
 #  This module may also lock TPM physical presence and physicalPresenceLifetimeLock.\r
 #\r
-# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -73,8 +73,8 @@
   gEfiEndOfPeiSignalPpiGuid                                           ## SOMETIMES_CONSUMES     ## NOTIFY\r
 \r
 [Pcd]\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceLifetimeLock       ## SOMETIMES_CONSUMES \r
-  gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceCmdEnable          ## SOMETIMES_CONSUMES \r
+  gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceLifetimeLock       ## SOMETIMES_CONSUMES\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceCmdEnable          ## SOMETIMES_CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdPhysicalPresenceHwEnable           ## SOMETIMES_CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString             ## SOMETIMES_CONSUMES\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid                    ## CONSUMES\r
@@ -89,4 +89,4 @@
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   TcgPeiExtra.uni\r
-  
\ No newline at end of file
+\r
index e469d984c8d3094c49788212dcacc27f54a118b2..c4395a6595fb2a875d82eaae1e9a90aa45472321 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgPei Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) PEI"\r
 \r
 \r
index 589bab694b3ad4affbb6aa0bbf322d21653f910e..0b8a002a4d193f1461a0a6a30a94799bf8daa70b 100644 (file)
@@ -8,13 +8,13 @@
 \r
   PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -80,7 +80,7 @@ PhysicalPresenceCallback (
     mTcgNvs->PhysicalPresence.ReturnCode  = PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS;\r
     mTcgNvs->PhysicalPresence.LastRequest = PpData.LastPPRequest;\r
     mTcgNvs->PhysicalPresence.Response    = PpData.PPResponse;\r
-  } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS) \r
+  } else if ((mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)\r
           || (mTcgNvs->PhysicalPresence.Parameter == ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {\r
     if (EFI_ERROR (Status)) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
@@ -107,7 +107,7 @@ PhysicalPresenceCallback (
                                );\r
     }\r
 \r
-    if (EFI_ERROR (Status)) { \r
+    if (EFI_ERROR (Status)) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;\r
       return EFI_SUCCESS;\r
     }\r
@@ -186,7 +186,7 @@ PhysicalPresenceCallback (
         if ((Flags.PPFlags & TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_CLEAR) != 0 && (Flags.PPFlags & TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_PROVISION) != 0) {\r
           RequestConfirmed = TRUE;\r
         }\r
-        break;  \r
+        break;\r
 \r
       case PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE:\r
       case PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE:\r
@@ -199,7 +199,7 @@ PhysicalPresenceCallback (
         //\r
         // This command requires UI to prompt user for Auth data\r
         //\r
-        mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED; \r
+        mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;\r
         return EFI_SUCCESS;\r
       default:\r
         break;\r
@@ -209,11 +209,11 @@ PhysicalPresenceCallback (
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED;\r
     } else {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED;\r
-    }    \r
+    }\r
     if (mTcgNvs->PhysicalPresence.Request >= TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {\r
       mTcgNvs->PhysicalPresence.ReturnCode = TcgPpVendorLibGetUserConfirmationStatusFunction (mTcgNvs->PhysicalPresence.Request, Flags.PPFlags);\r
     }\r
-  } \r
+  }\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -281,7 +281,7 @@ MemoryClearCallback (
                            DataSize,\r
                            &MorControl\r
                            );\r
-  if (EFI_ERROR (Status)) { \r
+  if (EFI_ERROR (Status)) {\r
     mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;\r
     DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));\r
   }\r
@@ -319,7 +319,7 @@ AssignOpRegion (
   for (OpRegion  = (AML_OP_REGION_32_8 *) (Table + 1);\r
        OpRegion <= (AML_OP_REGION_32_8 *) ((UINT8 *) Table + Table->Length);\r
        OpRegion  = (AML_OP_REGION_32_8 *) ((UINT8 *) OpRegion + 1)) {\r
-    if ((OpRegion->OpRegionOp  == AML_EXT_REGION_OP) && \r
+    if ((OpRegion->OpRegionOp  == AML_EXT_REGION_OP) &&\r
         (OpRegion->NameString  == Name) &&\r
         (OpRegion->DWordPrefix == AML_DWORD_PREFIX) &&\r
         (OpRegion->BytePrefix  == AML_BYTE_PREFIX)) {\r
@@ -403,12 +403,12 @@ PublishAcpiTable (
 /**\r
   The driver's entry point.\r
 \r
-  It install callbacks for TPM physical presence and MemoryClear, and locate \r
+  It install callbacks for TPM physical presence and MemoryClear, and locate\r
   SMM variable to be used in the callback function.\r
 \r
-  @param[in] ImageHandle  The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle  The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable  A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS     The entry point is executed successfully.\r
   @retval Others          Some error occurs when executing this entry point.\r
 \r
@@ -453,7 +453,7 @@ InitializeTcgSmm (
     return Status;\r
   }\r
   mTcgNvs->MemoryClear.SoftwareSmi = (UINT8) SwContext.SwSmiInputValue;\r
-  \r
+\r
   //\r
   // Locate SmmVariableProtocol.\r
   //\r
index 21e4ad96d2bd7220a0a13fbc983b6739d10991a1..0aff3e3c4f6ceac0fa66de4296923681afe9beca 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for TCG SMM driver.\r
-  \r
-Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index be7a96bc62d7401b2d5c72cfdd23b535a5341aac..806b8f9b4e103fcba9437d12fbb9a7d7c77c4797 100644 (file)
@@ -1,15 +1,15 @@
 ## @file\r
 #  Implements ACPI metholds for the TCG feature\r
 #\r
-#  This driver implements TPM definition block in ACPI table and registers SMI \r
-#  callback functions for physical presence and MemoryClear to handle the requests \r
+#  This driver implements TPM definition block in ACPI table and registers SMI\r
+#  callback functions for physical presence and MemoryClear to handle the requests\r
 #  from ACPI method.\r
 #\r
 #  Caution: This module requires additional review when modified.\r
 #  This driver will have external input - variable and ACPINvs data in SMM mode.\r
 #  This external input must be validated carefully to avoid security issue.\r
 #\r
-# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -60,7 +60,7 @@
   ## SOMETIMES_PRODUCES ## Variable:L"MemoryOverwriteRequestControl"\r
   ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"\r
   gEfiMemoryOverwriteControlDataGuid\r
-  \r
+\r
   gEfiTpmDeviceInstanceTpm12Guid                        ## PRODUCES           ## GUID       # TPM device identifier\r
 \r
 [Protocols]\r
@@ -77,7 +77,7 @@
   gEfiSmmSwDispatch2ProtocolGuid AND\r
   gEfiSmmVariableProtocolGuid AND\r
   gEfiTcgProtocolGuid\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   TcgSmmExtra.uni\r
-  
\ No newline at end of file
+\r
index 81f7f8d53a3ec6c203ef67681de230adcf8b51e9..8494332295072594d498bee3fa3c551e2fba4a89 100644 (file)
@@ -4,12 +4,12 @@
 // This driver implements TPM definition block in ACPI table and registers SMI\r
 // callback functions for physical presence and MemoryClear to handle the requests\r
 // from ACPI method.\r
-// \r
+//\r
 // Caution: This module requires additional review when modified.\r
 // This driver will have external input - variable and ACPINvs data in SMM mode.\r
 // This external input must be validated carefully to avoid security issue.\r
 //\r
-// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
index b9ca98bb6ed6a21a3fe8a2d08c94cee4c5bd02c4..42d21474d8f70f3ed7f007899af02484ef5cf67e 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // TcgSmm Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "TCG (Trusted Computing Group) SMM"\r
 \r
 \r
index b5449d98b4c4ec7acdf1faa64e54fa79cd440af6..12f24f399677e4593c3bca81eed562f32dd27e39 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  The TPM definition block in ACPI table for physical presence  \r
+  The TPM definition block in ACPI table for physical presence\r
   and MemoryClear.\r
 \r
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -49,7 +49,7 @@ DefinitionBlock (
       //\r
       OperationRegion (SMIP, SystemIO, 0xB2, 1)\r
       Field (SMIP, ByteAcc, NoLock, Preserve)\r
-      { \r
+      {\r
           IOB2, 8\r
       }\r
 \r
@@ -79,16 +79,16 @@ DefinitionBlock (
         MCIP,   32, //   Used for save the Mor paramter\r
         MORD,   32, //   Memory Overwrite Request Data\r
         MRET,   32, //   Memory Overwrite function return code\r
-        UCRQ,   32  //   Phyical Presence request operation to Get User Confirmation Status \r
+        UCRQ,   32  //   Phyical Presence request operation to Get User Confirmation Status\r
       }\r
 \r
       Method (PTS, 1, Serialized)\r
-      {  \r
+      {\r
         //\r
         // Detect Sx state for MOR, only S4, S5 need to handle\r
         //\r
         If (LAnd (LLess (Arg0, 6), LGreater (Arg0, 3)))\r
-        {   \r
+        {\r
           //\r
           // Bit4 -- DisableAutoDetect. 0 -- Firmware MAY autodetect.\r
           //\r
@@ -98,7 +98,7 @@ DefinitionBlock (
             // Triggle the SMI through ACPI _PTS method.\r
             //\r
             Store (0x02, MCIP)\r
-              \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -106,7 +106,7 @@ DefinitionBlock (
           }\r
         }\r
         Return (0)\r
-      }   \r
+      }\r
 \r
       Method (_STA, 0)\r
       {\r
@@ -156,12 +156,12 @@ DefinitionBlock (
       }\r
 \r
       Name(TPM2, Package (0x02){\r
-        Zero, \r
+        Zero,\r
         Zero\r
       })\r
 \r
       Name(TPM3, Package (0x03){\r
-        Zero, \r
+        Zero,\r
         Zero,\r
         Zero\r
       })\r
@@ -170,7 +170,7 @@ DefinitionBlock (
       // TCG Physical Presence Interface\r
       //\r
       Method (TPPI, 3, Serialized, 0, {BuffObj, PkgObj, IntObj, StrObj}, {UnknownObj, UnknownObj, UnknownObj}) // IntObj, IntObj, PkgObj\r
-      {        \r
+      {\r
         //\r
         // Switch by function index\r
         //\r
@@ -195,10 +195,10 @@ DefinitionBlock (
             //\r
             // b) Submit TPM Operation Request to Pre-OS Environment\r
             //\r
-                  \r
+\r
             Store (DerefOf (Index (Arg2, 0x00)), PPRQ)\r
             Store (0x02, PPIP)\r
-              \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -212,7 +212,7 @@ DefinitionBlock (
             //\r
             // c) Get Pending TPM Operation Requested By the OS\r
             //\r
-                  \r
+\r
             Store (PPRQ, Index (TPM2, 0x01))\r
             Return (TPM2)\r
           }\r
@@ -229,12 +229,12 @@ DefinitionBlock (
             // e) Return TPM Operation Response to OS Environment\r
             //\r
             Store (0x05, PPIP)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
             Store (PPIN, IOB2)\r
-                  \r
+\r
             Store (LPPR, Index (TPM3, 0x01))\r
             Store (PPRP, Index (TPM3, 0x02))\r
 \r
@@ -257,11 +257,11 @@ DefinitionBlock (
             //\r
             Store (7, PPIP)\r
             Store (DerefOf (Index (Arg2, 0x00)), PPRQ)\r
-                \r
+\r
             //\r
-            // Triggle the SMI interrupt \r
+            // Triggle the SMI interrupt\r
             //\r
-            Store (PPIN, IOB2)  \r
+            Store (PPIN, IOB2)\r
             Return (FRET)\r
           }\r
           Case (8)\r
@@ -271,12 +271,12 @@ DefinitionBlock (
             //\r
             Store (8, PPIP)\r
             Store (DerefOf (Index (Arg2, 0x00)), UCRQ)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
             Store (PPIN, IOB2)\r
-                  \r
+\r
             Return (FRET)\r
           }\r
 \r
@@ -305,12 +305,12 @@ DefinitionBlock (
             // Save the Operation Value of the Request to MORD (reserved memory)\r
             //\r
             Store (DerefOf (Index (Arg2, 0x00)), MORD)\r
-                  \r
+\r
             //\r
             // Triggle the SMI through ACPI _DSM method.\r
             //\r
             Store (0x01, MCIP)\r
-                  \r
+\r
             //\r
             // Triggle the SMI interrupt\r
             //\r
@@ -319,7 +319,7 @@ DefinitionBlock (
           }\r
           Default {BreakPoint}\r
         }\r
-        Return (1)        \r
+        Return (1)\r
       }\r
 \r
       Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})\r
index ec1e3893fc04b2b8ba7455ee32dd310a8681c4bc..52fc68b5eeaaec596a7068315c1c6a249c55de7b 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   Password Credential Provider driver implementation.\r
-    \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -98,10 +98,10 @@ ExpandTableSize (
   // Create new credential table.\r
   //\r
   NewTable = (CREDENTIAL_TABLE *) AllocateZeroPool (\r
-                                    sizeof (CREDENTIAL_TABLE) + \r
+                                    sizeof (CREDENTIAL_TABLE) +\r
                                     (Count - 1) * sizeof (PASSWORD_INFO)\r
                                     );\r
-  ASSERT (NewTable != NULL); \r
+  ASSERT (NewTable != NULL);\r
 \r
   NewTable->MaxCount    = Count;\r
   NewTable->Count       = mPwdTable->Count;\r
@@ -110,8 +110,8 @@ ExpandTableSize (
   // Copy old entries\r
   //\r
   CopyMem (\r
-    &NewTable->UserInfo, \r
-    &mPwdTable->UserInfo, \r
+    &NewTable->UserInfo,\r
+    &mPwdTable->UserInfo,\r
     mPwdTable->Count * sizeof (PASSWORD_INFO)\r
     );\r
   FreePool (mPwdTable);\r
@@ -123,8 +123,8 @@ ExpandTableSize (
   Add, update or delete info in table, and sync with NV variable.\r
 \r
   @param[in]  Index     The index of the password in table. If index is found in\r
-                        table, update the info, else add the into to table. \r
-  @param[in]  Info      The new password info to add into table.If Info is NULL, \r
+                        table, update the info, else add the into to table.\r
+  @param[in]  Info      The new password info to add into table.If Info is NULL,\r
                         delete the info by Index.\r
 \r
   @retval EFI_INVALID_PARAMETER  Info is NULL when save the info.\r
@@ -151,7 +151,7 @@ ModifyTable (
       mPwdTable->Count--;\r
       if (Index != mPwdTable->Count) {\r
         NewPasswordInfo = &mPwdTable->UserInfo[mPwdTable->Count];\r
-      } \r
+      }\r
     } else {\r
       //\r
       // Update the specified entry.\r
@@ -214,9 +214,9 @@ InitCredentialTable (
   VarSize = 0;\r
   Var     = NULL;\r
   Status  = gRT->GetVariable (\r
-                   L"PwdCredential", \r
-                   &gPwdCredentialProviderGuid, \r
-                   NULL, \r
+                   L"PwdCredential",\r
+                   &gPwdCredentialProviderGuid,\r
+                   NULL,\r
                    &VarSize,\r
                    Var\r
                    );\r
@@ -226,9 +226,9 @@ InitCredentialTable (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
     Status = gRT->GetVariable (\r
-                    L"PwdCredential", \r
-                    &gPwdCredentialProviderGuid, \r
-                    NULL, \r
+                    L"PwdCredential",\r
+                    &gPwdCredentialProviderGuid,\r
+                    NULL,\r
                     &VarSize,\r
                     Var\r
                     );\r
@@ -236,13 +236,13 @@ InitCredentialTable (
   if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Create the password credential table.\r
   //\r
   mPwdTable = AllocateZeroPool (\r
                 sizeof (CREDENTIAL_TABLE) - sizeof (PASSWORD_INFO) +\r
-                PASSWORD_TABLE_INC * sizeof (PASSWORD_INFO) + \r
+                PASSWORD_TABLE_INC * sizeof (PASSWORD_INFO) +\r
                 VarSize\r
                 );\r
   if (mPwdTable == NULL) {\r
@@ -270,7 +270,7 @@ InitCredentialTable (
 \r
   @retval      TRUE           Hash the password successfully.\r
   @retval      FALSE          Failed to hash the password.\r
-                 \r
+\r
 **/\r
 BOOLEAN\r
 GenerateCredential (\r
@@ -282,23 +282,23 @@ GenerateCredential (
   BOOLEAN           Status;\r
   UINTN             HashSize;\r
   VOID              *Hash;\r
-  \r
+\r
   HashSize = Sha1GetContextSize ();\r
   Hash     = AllocatePool (HashSize);\r
   ASSERT (Hash != NULL);\r
-  \r
+\r
   Status = Sha1Init (Hash);\r
   if (!Status) {\r
     goto Done;\r
   }\r
-  \r
+\r
   Status = Sha1Update (Hash, Password, PasswordSize);\r
   if (!Status) {\r
     goto Done;\r
   }\r
-  \r
+\r
   Status = Sha1Final (Hash, Credential);\r
-  \r
+\r
 Done:\r
   FreePool (Hash);\r
   return Status;\r
@@ -325,7 +325,7 @@ GetPassword (
   UINTN         PasswordLen;\r
   CHAR16        *QuestionStr;\r
   CHAR16        *LineStr;\r
-  \r
+\r
   PasswordLen = 0;\r
   while (TRUE) {\r
     PasswordMask[PasswordLen]     = L'_';\r
@@ -346,7 +346,7 @@ GetPassword (
       );\r
     FreePool (QuestionStr);\r
     FreePool (LineStr);\r
-    \r
+\r
     //\r
     // Check key stroke\r
     //\r
@@ -357,8 +357,8 @@ GetPassword (
         if (PasswordLen > 0) {\r
           PasswordLen--;\r
         }\r
-      } else if ((Key.UnicodeChar == CHAR_NULL) || \r
-                 (Key.UnicodeChar == CHAR_TAB) || \r
+      } else if ((Key.UnicodeChar == CHAR_NULL) ||\r
+                 (Key.UnicodeChar == CHAR_TAB) ||\r
                  (Key.UnicodeChar == CHAR_LINEFEED)) {\r
         continue;\r
       } else {\r
@@ -371,7 +371,7 @@ GetPassword (
       }\r
     }\r
   }\r
-  \r
+\r
   PasswordLen = PasswordLen * sizeof (CHAR16);\r
   GenerateCredential (Password, PasswordLen, (UINT8 *)Credential);\r
 }\r
@@ -392,7 +392,7 @@ CheckPassword (
 {\r
   UINTN      Index;\r
   CHAR8      *Pwd;\r
-  \r
+\r
   //\r
   // Check password credential.\r
   //\r
@@ -412,16 +412,16 @@ CheckPassword (
 /**\r
   Find a user infomation record by the information record type.\r
 \r
-  This function searches all user information records of User from beginning \r
+  This function searches all user information records of User from beginning\r
   until either the information is found, or there are no more user infomation\r
   records. A match occurs when a Info.InfoType field matches the user information\r
   record type.\r
 \r
-  @param[in]     User      Points to the user profile record to search.                          \r
+  @param[in]     User      Points to the user profile record to search.\r
   @param[in]     InfoType  The infomation type to be searched.\r
   @param[out]    Info      Points to the user info found, the caller is responsible\r
                            to free.\r
-  \r
+\r
   @retval EFI_SUCCESS      Find the user information successfully.\r
   @retval Others           Fail to find the user information.\r
 \r
@@ -438,7 +438,7 @@ FindUserInfoByType (
   UINTN                      UserInfoSize;\r
   EFI_USER_INFO_HANDLE       UserInfoHandle;\r
   EFI_USER_MANAGER_PROTOCOL  *UserManager;\r
-  \r
+\r
   //\r
   // Find user information by information type.\r
   //\r
@@ -501,7 +501,7 @@ FindUserInfoByType (
     if (UserInfo->InfoType == InfoType) {\r
       *Info = UserInfo;\r
       return EFI_SUCCESS;\r
-    }    \r
+    }\r
   }\r
 \r
   if (UserInfo != NULL) {\r
@@ -570,7 +570,7 @@ CredentialDriverCallback (
         return Status;\r
       }\r
       *ActionRequest  = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
-    }    \r
+    }\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -716,24 +716,24 @@ InitFormBrowser (
 /**\r
   Enroll a user on a credential provider.\r
 \r
-  This function enrolls a user on this credential provider. If the user exists on \r
-  this credential provider, update the user information on this credential provider; \r
+  This function enrolls a user on this credential provider. If the user exists on\r
+  this credential provider, update the user information on this credential provider;\r
   otherwise add the user information on credential provider.\r
-  \r
+\r
   @param[in] This                Points to this instance of EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in] User                The user profile to enroll.\r
\r
+\r
   @retval EFI_SUCCESS            User profile was successfully enrolled.\r
   @retval EFI_ACCESS_DENIED      Current user profile does not permit enrollment on the\r
                                  user profile handle. Either the user profile cannot enroll\r
-                                 on any user profile or cannot enroll on a user profile \r
+                                 on any user profile or cannot enroll on a user profile\r
                                  other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support enrollment in\r
                                  the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be created because of a device\r
                                  error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -769,12 +769,12 @@ CredentialEnroll (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  CopyMem (PwdInfo.UserId, (UINT8 *) (UserInfo + 1), sizeof (EFI_USER_INFO_IDENTIFIER)); \r
+  CopyMem (PwdInfo.UserId, (UINT8 *) (UserInfo + 1), sizeof (EFI_USER_INFO_IDENTIFIER));\r
   FreePool (UserInfo);\r
 \r
   //\r
   // Get password from user.\r
-  //  \r
+  //\r
   while (TRUE) {\r
     //\r
     // Input password.\r
@@ -791,10 +791,10 @@ CredentialEnroll (
     //\r
     if (CompareMem (PwdInfo.Password, Password, CREDENTIAL_LEN) == 0) {\r
       break;\r
-    } \r
+    }\r
 \r
     QuestionStr = GetStringById (STRING_TOKEN (STR_PASSWORD_MISMATCH));\r
-    PromptStr   = GetStringById (STRING_TOKEN (STR_INPUT_PASSWORD_AGAIN));    \r
+    PromptStr   = GetStringById (STRING_TOKEN (STR_INPUT_PASSWORD_AGAIN));\r
     CreatePopUp (\r
       EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
       &Key,\r
@@ -809,17 +809,17 @@ CredentialEnroll (
 \r
   //\r
   // Check whether User is ever enrolled in the provider.\r
-  // \r
+  //\r
   for (Index = 0; Index < mPwdTable->Count; Index++) {\r
     UserId = (UINT8 *) &mPwdTable->UserInfo[Index].UserId;\r
     if (CompareMem (UserId, (UINT8 *) &PwdInfo.UserId, sizeof (EFI_USER_INFO_IDENTIFIER)) == 0) {\r
       //\r
       // User already exists, update the password.\r
-      //      \r
+      //\r
       break;\r
     }\r
   }\r
-   \r
+\r
   //\r
   // Enroll the User to the provider.\r
   //\r
@@ -837,7 +837,7 @@ CredentialEnroll (
 \r
   This function returns information about the form used when interacting with the\r
   user during user identification. The form is the first enabled form in the form-set\r
-  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If \r
+  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If\r
   the user credential provider does not require a form to identify the user, then this\r
   function should return EFI_NOT_FOUND.\r
 \r
@@ -845,13 +845,13 @@ CredentialEnroll (
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] FormSetId  On return, holds the identifier of the form set which contains\r
                          the form used during user identification.\r
-  @param[out] FormId     On return, holds the identifier of the form used during user \r
+  @param[out] FormId     On return, holds the identifier of the form used during user\r
                          identification.\r
-                         \r
+\r
   @retval EFI_SUCCESS            Form returned successfully.\r
   @retval EFI_NOT_FOUND          Form not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or FormSetId is NULL or FormId is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -862,7 +862,7 @@ CredentialForm (
   OUT       EFI_FORM_ID                         *FormId\r
   )\r
 {\r
-  if ((This == NULL) || (Hii == NULL) || \r
+  if ((This == NULL) || (Hii == NULL) ||\r
       (FormSetId == NULL) || (FormId == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -870,7 +870,7 @@ CredentialForm (
   *Hii       = mCallbackInfo->HiiHandle;\r
   *FormId    = FORMID_GET_PASSWORD_FORM;\r
   CopyGuid (FormSetId, &gPwdCredentialProviderGuid);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -880,22 +880,22 @@ CredentialForm (
 \r
   This optional function returns a bitmap that is less than or equal to the number\r
   of pixels specified by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND\r
-  is returned. \r
+  is returned.\r
 \r
   @param[in]      This    Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in, out] Width   On entry, points to the desired bitmap width. If NULL then no \r
-                          bitmap information will be returned. On exit, points to the \r
+  @param[in, out] Width   On entry, points to the desired bitmap width. If NULL then no\r
+                          bitmap information will be returned. On exit, points to the\r
                           width of the bitmap returned.\r
   @param[in, out] Height  On entry, points to the desired bitmap height. If NULL then no\r
-                          bitmap information will be returned. On exit, points to the \r
+                          bitmap information will be returned. On exit, points to the\r
                           height of the bitmap returned\r
-  @param[out]     Hii     On return, holds the HII database handle. \r
-  @param[out]     Image   On return, holds the HII image identifier. \r
\r
+  @param[out]     Hii     On return, holds the HII database handle.\r
+  @param[out]     Image   On return, holds the HII image identifier.\r
+\r
   @retval EFI_SUCCESS            Image identifier returned successfully.\r
   @retval EFI_NOT_FOUND          Image identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or Image is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -906,7 +906,7 @@ CredentialTile (
       OUT    EFI_HII_HANDLE                      *Hii,\r
       OUT    EFI_IMAGE_ID                        *Image\r
   )\r
-{  \r
+{\r
   if ((This == NULL) || (Hii == NULL) || (Image == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -918,16 +918,16 @@ CredentialTile (
   Returns string used to describe the credential provider type.\r
 \r
   This function returns a string which describes the credential provider. If no\r
-  such string exists, then EFI_NOT_FOUND is returned. \r
+  such string exists, then EFI_NOT_FOUND is returned.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] String     On return, holds the HII string identifier.\r
\r
+\r
   @retval EFI_SUCCESS            String identifier returned successfully.\r
   @retval EFI_NOT_FOUND          String identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or String is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -940,7 +940,7 @@ CredentialTitle (
   if ((This == NULL) || (Hii == NULL) || (String == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Set Hii handle and String ID.\r
   //\r
@@ -955,23 +955,23 @@ CredentialTitle (
   Return the user identifier associated with the currently authenticated user.\r
 \r
   This function returns the user identifier of the user authenticated by this credential\r
-  provider. This function is called after the credential-related information has been \r
+  provider. This function is called after the credential-related information has been\r
   submitted on a form, OR after a call to Default() has returned that this credential is\r
   ready to log on.\r
 \r
   @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]  User           The user profile handle of the user profile currently being \r
+  @param[in]  User           The user profile handle of the user profile currently being\r
                              considered by the user identity manager. If NULL, then no user\r
                              profile is currently under consideration.\r
-  @param[out] Identifier     On return, points to the user identifier. \r
\r
+  @param[out] Identifier     On return, points to the user identifier.\r
+\r
   @retval EFI_SUCCESS            User identifier returned successfully.\r
   @retval EFI_NOT_READY          No user identifier can be returned.\r
   @retval EFI_ACCESS_DENIED      The user has been locked out of this user credential.\r
   @retval EFI_INVALID_PARAMETER  This is NULL, or Identifier is NULL.\r
   @retval EFI_NOT_FOUND          User is not NULL, and the specified user handle can't be\r
                                  found in user profile database\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1000,19 +1000,19 @@ CredentialUser (
     //\r
     return EFI_NOT_READY;\r
   }\r
-  \r
+\r
   if (User == NULL) {\r
     //\r
     // Return the user ID whose password matches the input password.\r
-    // \r
+    //\r
     CopyMem (\r
-      Identifier, \r
-      &mPwdTable->UserInfo[mPwdTable->ValidIndex - 1].UserId, \r
+      Identifier,\r
+      &mPwdTable->UserInfo[mPwdTable->ValidIndex - 1].UserId,\r
       sizeof (EFI_USER_INFO_IDENTIFIER)\r
-      );    \r
+      );\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Get the User's ID.\r
   //\r
@@ -1024,7 +1024,7 @@ CredentialUser (
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the input password matches one in PwdTable.\r
   //\r
@@ -1038,11 +1038,11 @@ CredentialUser (
         CopyMem (Identifier, UserId, sizeof (EFI_USER_INFO_IDENTIFIER));\r
         FreePool (UserInfo);\r
         return EFI_SUCCESS;\r
-      } \r
+      }\r
     }\r
   }\r
 \r
-  FreePool (UserInfo);  \r
+  FreePool (UserInfo);\r
   return EFI_NOT_READY;\r
 }\r
 \r
@@ -1050,17 +1050,17 @@ CredentialUser (
 /**\r
   Indicate that user interface interaction has begun for the specified credential.\r
 \r
-  This function is called when a credential provider is selected by the user. If \r
+  This function is called when a credential provider is selected by the user. If\r
   AutoLogon returns FALSE, then the user interface will be constructed by the User\r
-  Identity Manager. \r
+  Identity Manager.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[out] AutoLogon  On return, points to the credential provider's capabilities \r
-                         after the credential provider has been selected by the user. \r
\r
+  @param[out] AutoLogon  On return, points to the credential provider's capabilities\r
+                         after the credential provider has been selected by the user.\r
+\r
   @retval EFI_SUCCESS            Credential provider successfully selected.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1084,9 +1084,9 @@ CredentialSelect (
   This function is called when a credential provider is deselected by the user.\r
 \r
   @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
\r
+\r
   @retval EFI_SUCCESS    Credential provider successfully deselected.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1104,15 +1104,15 @@ CredentialDeselect (
 /**\r
   Return the default logon behavior for this user credential.\r
 \r
-  This function reports the default login behavior regarding this credential provider.  \r
+  This function reports the default login behavior regarding this credential provider.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, holds whether the credential provider should be used\r
-                         by default to automatically log on the user.  \r
\r
+                         by default to automatically log on the user.\r
+\r
   @retval EFI_SUCCESS            Default information successfully returned.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1125,7 +1125,7 @@ CredentialDefault (
     return EFI_INVALID_PARAMETER;\r
   }\r
   *AutoLogon = 0;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -1133,24 +1133,24 @@ CredentialDefault (
 /**\r
   Return information attached to the credential provider.\r
 \r
-  This function returns user information. \r
+  This function returns user information.\r
 \r
   @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]      UserInfo      Handle of the user information data record. \r
+  @param[in]      UserInfo      Handle of the user information data record.\r
   @param[out]     Info          On entry, points to a buffer of at least *InfoSize bytes. On\r
                                 exit, holds the user information. If the buffer is too small\r
                                 to hold the information, then EFI_BUFFER_TOO_SMALL is returned\r
                                 and InfoSize is updated to contain the number of bytes actually\r
                                 required.\r
-  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the \r
-                                size of the user information. \r
\r
+  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the\r
+                                size of the user information.\r
+\r
   @retval EFI_SUCCESS           Information returned successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  The size specified by InfoSize is too small to hold all of the\r
                                 user information. The size required is returned in *InfoSize.\r
   @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r
-  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle. \r
-                                \r
+  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1163,7 +1163,7 @@ CredentialGetInfo (
 {\r
   EFI_USER_INFO            *CredentialInfo;\r
   UINTN                    Index;\r
-  \r
+\r
   if ((This == NULL) || (InfoSize == NULL) || (Info == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1171,7 +1171,7 @@ CredentialGetInfo (
   if ((UserInfo == NULL) || (mPwdInfoHandle == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Find information handle in credential info table.\r
   //\r
@@ -1185,11 +1185,11 @@ CredentialGetInfo (
         *InfoSize = CredentialInfo->InfoSize;\r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
-      CopyMem (Info, CredentialInfo, CredentialInfo->InfoSize);      \r
-      return EFI_SUCCESS; \r
+      CopyMem (Info, CredentialInfo, CredentialInfo->InfoSize);\r
+      return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -1200,17 +1200,17 @@ CredentialGetInfo (
   This function returns the next user information record. To retrieve the first user\r
   information record handle, point UserInfo at a NULL. Each subsequent call will retrieve\r
   another user information record handle until there are no more, at which point UserInfo\r
-  will point to NULL. \r
+  will point to NULL.\r
 \r
   @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] UserInfo On entry, points to the previous user information handle or NULL\r
                            to start enumeration. On exit, points to the next user information\r
                            handle or NULL if there is no more user information.\r
\r
+\r
   @retval EFI_SUCCESS            User information returned.\r
   @retval EFI_NOT_FOUND          No more user information found.\r
   @retval EFI_INVALID_PARAMETER  UserInfo is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1224,7 +1224,7 @@ CredentialGetNextInfo (
   UINTN                    InfoLen;\r
   UINTN                    Index;\r
   UINTN                    ProvStrLen;\r
-    \r
+\r
   if ((This == NULL) || (UserInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1246,13 +1246,13 @@ CredentialGetNextInfo (
     InfoLen = sizeof (EFI_USER_INFO) + sizeof (EFI_GUID);\r
     Info    = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);\r
     CopyGuid ((EFI_GUID *)(Info + 1), &gPwdCredentialProviderGuid);\r
-    \r
+\r
     mPwdInfoHandle->Info[0] = Info;\r
     mPwdInfoHandle->Count++;\r
 \r
@@ -1264,7 +1264,7 @@ CredentialGetNextInfo (
     InfoLen     = sizeof (EFI_USER_INFO) + ProvStrLen;\r
     Info        = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
@@ -1281,16 +1281,16 @@ CredentialGetNextInfo (
     InfoLen = sizeof (EFI_USER_INFO) + sizeof (EFI_GUID);\r
     Info    = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-      \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_TYPE_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);\r
     CopyGuid ((EFI_GUID *)(Info + 1), &gEfiUserCredentialClassPasswordGuid);\r
-    \r
+\r
     mPwdInfoHandle->Info[2] = Info;\r
     mPwdInfoHandle->Count++;\r
\r
+\r
     //\r
     // The fourth information, Credential Provider type name info.\r
     //\r
@@ -1299,18 +1299,18 @@ CredentialGetNextInfo (
     InfoLen     = sizeof (EFI_USER_INFO) + ProvStrLen;\r
     Info        = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gPwdCredentialProviderGuid);\r
     CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);\r
     FreePool (ProvNameStr);\r
-    \r
+\r
     mPwdInfoHandle->Info[3] = Info;\r
     mPwdInfoHandle->Count++;\r
   }\r
-  \r
+\r
   if (*UserInfo == NULL) {\r
     //\r
     // Return the first info handle.\r
@@ -1318,7 +1318,7 @@ CredentialGetNextInfo (
     *UserInfo = (EFI_USER_INFO_HANDLE) mPwdInfoHandle->Info[0];\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Find information handle in credential info table.\r
   //\r
@@ -1335,10 +1335,10 @@ CredentialGetNextInfo (
         *UserInfo = NULL;\r
         return EFI_NOT_FOUND;\r
       }\r
-    \r
+\r
       Index++;\r
       *UserInfo = (EFI_USER_INFO_HANDLE)mPwdInfoHandle->Info[Index];\r
-      return EFI_SUCCESS;            \r
+      return EFI_SUCCESS;\r
     }\r
   }\r
 \r
@@ -1349,15 +1349,15 @@ CredentialGetNextInfo (
 /**\r
   Delete a user on this credential provider.\r
 \r
-  This function deletes a user on this credential provider. \r
+  This function deletes a user on this credential provider.\r
 \r
   @param[in]     This            Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]     User            The user profile handle to delete.\r
 \r
   @retval EFI_SUCCESS            User profile was successfully deleted.\r
-  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle. \r
-                                 Either the user profile cannot delete on any user profile or cannot delete \r
-                                 on a user profile other than the current user profile. \r
+  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle.\r
+                                 Either the user profile cannot delete on any user profile or cannot delete\r
+                                 on a user profile other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support deletion in the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be deleted because of a device error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
@@ -1374,7 +1374,7 @@ CredentialDelete (
   UINT8                     *UserId;\r
   UINT8                     *NewUserId;\r
   UINTN                     Index;\r
-  \r
+\r
   if ((This == NULL) || (User == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1394,7 +1394,7 @@ CredentialDelete (
 \r
   //\r
   // Find the user by user identifier in mPwdTable.\r
-  // \r
+  //\r
   for (Index = 0; Index < mPwdTable->Count; Index++) {\r
     UserId    = (UINT8 *) &mPwdTable->UserInfo[Index].UserId;\r
     NewUserId = (UINT8 *) (UserInfo + 1);\r
@@ -1442,7 +1442,7 @@ PasswordProviderInit (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Init Form Browser.\r
   //\r
@@ -1450,7 +1450,7 @@ PasswordProviderInit (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Install protocol interfaces for the password credential provider.\r
   //\r
index 7a51e7d0781266c49a2174286ee293884e7e180b..fd782549fd57a5b418581e747bd6a68246ac8353 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Password Credential Provider driver header file.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -92,24 +92,24 @@ typedef struct {
 /**\r
   Enroll a user on a credential provider.\r
 \r
-  This function enrolls a user on this credential provider. If the user exists on \r
-  this credential provider, update the user information on this credential provider; \r
+  This function enrolls a user on this credential provider. If the user exists on\r
+  this credential provider, update the user information on this credential provider;\r
   otherwise delete the user information on credential provider.\r
-  \r
+\r
   @param[in] This                Points to this instance of EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in] User                The user profile to enroll.\r
\r
+\r
   @retval EFI_SUCCESS            User profile was successfully enrolled.\r
   @retval EFI_ACCESS_DENIED      Current user profile does not permit enrollment on the\r
                                  user profile handle. Either the user profile cannot enroll\r
-                                 on any user profile or cannot enroll on a user profile \r
+                                 on any user profile or cannot enroll on a user profile\r
                                  other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support enrollment in\r
                                  the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be created because of a device\r
                                  error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -123,7 +123,7 @@ CredentialEnroll (
 \r
   This function returns information about the form used when interacting with the\r
   user during user identification. The form is the first enabled form in the form-set\r
-  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If \r
+  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If\r
   the user credential provider does not require a form to identify the user, then this\r
   function should return EFI_NOT_FOUND.\r
 \r
@@ -131,13 +131,13 @@ CredentialEnroll (
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] FormSetId  On return, holds the identifier of the form set which contains\r
                          the form used during user identification.\r
-  @param[out] FormId     On return, holds the identifier of the form used during user \r
+  @param[out] FormId     On return, holds the identifier of the form used during user\r
                          identification.\r
-                         \r
+\r
   @retval EFI_SUCCESS            Form returned successfully.\r
   @retval EFI_NOT_FOUND          Form not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or FormSetId is NULL or FormId is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -153,22 +153,22 @@ CredentialForm (
 \r
   This optional function returns a bitmap which is less than or equal to the number\r
   of pixels specified by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND\r
-  is returned. \r
+  is returned.\r
 \r
   @param[in]      This    Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in, out] Width   On entry, points to the desired bitmap width. If NULL then no \r
-                          bitmap information will be returned. On exit, points to the \r
+  @param[in, out] Width   On entry, points to the desired bitmap width. If NULL then no\r
+                          bitmap information will be returned. On exit, points to the\r
                           width of the bitmap returned.\r
   @param[in, out] Height  On entry, points to the desired bitmap height. If NULL then no\r
-                          bitmap information will be returned. On exit, points to the \r
+                          bitmap information will be returned. On exit, points to the\r
                           height of the bitmap returned\r
-  @param[out]     Hii     On return, holds the HII database handle. \r
-  @param[out]     Image   On return, holds the HII image identifier. \r
\r
+  @param[out]     Hii     On return, holds the HII database handle.\r
+  @param[out]     Image   On return, holds the HII image identifier.\r
+\r
   @retval EFI_SUCCESS            Image identifier returned successfully.\r
   @retval EFI_NOT_FOUND          Image identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or Image is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -184,16 +184,16 @@ CredentialTile (
   Returns string used to describe the credential provider type.\r
 \r
   This function returns a string which describes the credential provider. If no\r
-  such string exists, then EFI_NOT_FOUND is returned. \r
+  such string exists, then EFI_NOT_FOUND is returned.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] String     On return, holds the HII string identifier.\r
\r
+\r
   @retval EFI_SUCCESS            String identifier returned successfully.\r
   @retval EFI_NOT_FOUND          String identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or String is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -207,23 +207,23 @@ CredentialTitle (
   Return the user identifier associated with the currently authenticated user.\r
 \r
   This function returns the user identifier of the user authenticated by this credential\r
-  provider. This function is called after the credential-related information has been \r
+  provider. This function is called after the credential-related information has been\r
   submitted on a form OR after a call to Default() has returned that this credential is\r
   ready to log on.\r
 \r
   @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]  User           The user profile handle of the user profile currently being \r
+  @param[in]  User           The user profile handle of the user profile currently being\r
                              considered by the user identity manager. If NULL, then no user\r
                              profile is currently under consideration.\r
-  @param[out] Identifier     On return, points to the user identifier. \r
\r
+  @param[out] Identifier     On return, points to the user identifier.\r
+\r
   @retval EFI_SUCCESS            User identifier returned successfully.\r
   @retval EFI_NOT_READY          No user identifier can be returned.\r
   @retval EFI_ACCESS_DENIED      The user has been locked out of this user credential.\r
   @retval EFI_INVALID_PARAMETER  This is NULL, or Identifier is NULL.\r
   @retval EFI_NOT_FOUND          User is not NULL, and the specified user handle can't be\r
                                  found in user profile database\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -236,17 +236,17 @@ CredentialUser (
 /**\r
   Indicate that user interface interaction has begun for the specified credential.\r
 \r
-  This function is called when a credential provider is selected by the user. If \r
+  This function is called when a credential provider is selected by the user. If\r
   AutoLogon returns FALSE, then the user interface will be constructed by the User\r
-  Identity Manager. \r
+  Identity Manager.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[out] AutoLogon  On return, points to the credential provider's capabilities \r
-                         after the credential provider has been selected by the user. \r
\r
+  @param[out] AutoLogon  On return, points to the credential provider's capabilities\r
+                         after the credential provider has been selected by the user.\r
+\r
   @retval EFI_SUCCESS            Credential provider successfully selected.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -261,9 +261,9 @@ CredentialSelect (
   This function is called when a credential provider is deselected by the user.\r
 \r
   @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
\r
+\r
   @retval EFI_SUCCESS    Credential provider successfully deselected.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -274,12 +274,12 @@ CredentialDeselect (
 /**\r
   Return the default logon behavior for this user credential.\r
 \r
-  This function reports the default login behavior regarding this credential provider.  \r
+  This function reports the default login behavior regarding this credential provider.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, holds whether the credential provider should be used\r
-                         by default to automatically log on the user.  \r
\r
+                         by default to automatically log on the user.\r
+\r
   @retval EFI_SUCCESS            Default information successfully returned.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
 \r
@@ -294,24 +294,24 @@ CredentialDefault (
 /**\r
   Return information attached to the credential provider.\r
 \r
-  This function returns user information. \r
+  This function returns user information.\r
 \r
   @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]      UserInfo      Handle of the user information data record. \r
+  @param[in]      UserInfo      Handle of the user information data record.\r
   @param[out]     Info          On entry, points to a buffer of at least *InfoSize bytes. On\r
                                 exit, holds the user information. If the buffer is too small\r
                                 to hold the information, then EFI_BUFFER_TOO_SMALL is returned\r
                                 and InfoSize is updated to contain the number of bytes actually\r
                                 required.\r
-  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the \r
-                                size of the user information. \r
\r
+  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the\r
+                                size of the user information.\r
+\r
   @retval EFI_SUCCESS           Information returned successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  The size specified by InfoSize is too small to hold all of the\r
                                 user information. The size required is returned in *InfoSize.\r
   @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r
-  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle. \r
-                                \r
+  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -329,17 +329,17 @@ CredentialGetInfo (
   This function returns the next user information record. To retrieve the first user\r
   information record handle, point UserInfo at a NULL. Each subsequent call will retrieve\r
   another user information record handle until there are no more, at which point UserInfo\r
-  will point to NULL. \r
+  will point to NULL.\r
 \r
   @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] UserInfo On entry, points to the previous user information handle or NULL\r
                            to start enumeration. On exit, points to the next user information\r
                            handle or NULL if there is no more user information.\r
\r
+\r
   @retval EFI_SUCCESS            User information returned.\r
   @retval EFI_NOT_FOUND          No more user information found.\r
   @retval EFI_INVALID_PARAMETER  UserInfo is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -351,15 +351,15 @@ CredentialGetNextInfo (
 /**\r
   Delete a user on this credential provider.\r
 \r
-  This function deletes a user on this credential provider. \r
+  This function deletes a user on this credential provider.\r
 \r
   @param[in]     This            Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]     User            The user profile handle to delete.\r
 \r
   @retval EFI_SUCCESS            User profile was successfully deleted.\r
-  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle. \r
-                                 Either the user profile cannot delete on any user profile or cannot delete \r
-                                 on a user profile other than the current user profile. \r
+  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle.\r
+                                 Either the user profile cannot delete on any user profile or cannot delete\r
+                                 on a user profile other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support deletion in the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be deleted because of a device error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
index feeffcc6df2cb67148c7eb379e3e960d44919eb6..31bdfe4c504288ce8c2189bf037bcc6a8939042f 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Data structure used by the Password Credential Provider driver.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -24,7 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 //\r
 // Key defination\r
-// \r
+//\r
 #define KEY_GET_PASSWORD              0x1000\r
 \r
 #endif\r
index 07e6163e8bf391af4408df6489ff4db94ebb553d..ab7ba2c913b77b6d05585487386b6887cdda5fd1 100644 (file)
@@ -2,7 +2,7 @@
 #  Provides a password credential provider implementation\r
 #  This module provides a password credential provider implementation.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
   HiiLib\r
   UefiLib\r
   BaseCryptLib\r
-  \r
+\r
 [Guids]\r
   gEfiUserCredentialClassPasswordGuid           ## SOMETIMES_CONSUMES          ## GUID\r
-  \r
+\r
   ## PRODUCES             ## Variable:L"PwdCredential"\r
   ## CONSUMES             ## Variable:L"PwdCredential"\r
   ## CONSUMES             ## HII\r
   ## SOMETIMES_CONSUMES   ## GUID               #  The credential provider identifier\r
   gPwdCredentialProviderGuid\r
-  \r
+\r
 [Protocols]\r
   gEfiDevicePathProtocolGuid                    ## PRODUCES\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
   gEfiUserCredential2ProtocolGuid               ## PRODUCES\r
   gEfiUserManagerProtocolGuid                   ## SOMETIMES_CONSUMES\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   PwdCredentialProviderExtra.uni\r
-  
\ No newline at end of file
+\r
index be332aa6818d289d32564869524e74269b58b746..bcc220a51d5e29a358be4603260a765ae4d46fca 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // PwdCredentialProvider Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Password Credential Provider"\r
 \r
 \r
index ca0e5669c094aef51fdfade3b2a012dbdfa8efe3..e7b3126f83e00235638a95efffcff127df0b1c2a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   String definitions for the Password Credential Provider.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,20 +15,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #langdef en-US "English"\r
 #langdef fr-FR  "Francais"\r
 \r
-#string STR_CREDENTIAL_TITLE                     #language en-US  "Password Credential Provider"\r
+#string STR_CREDENTIAL_TITLE                    #language en-US  "Password Credential Provider"\r
                                                   #language fr-FR  "Password Credential Provider (French)"\r
-#string STR_FORM_TITLE                                                                                                 #language en-US  "Get Password"\r
-                                                                                                                                                                                                       #language fr-FR  "Get Password(French)"\r
+#string STR_FORM_TITLE                            #language en-US  "Get Password"\r
+                                                  #language fr-FR  "Get Password(French)"\r
 #string STR_NULL_STRING                           #language en-US  ""\r
                                                   #language fr-FR  ""\r
-#string STR_INPUT_PASSWORD                                                                                       #language en-US  "Please Input Password"\r
-                                                                                                                                                                                                       #language fr-FR  "Please Input Password(French)"\r
-#string STR_PROVIDER_NAME                                #language en-US  "INTEL Password Credential Provider"\r
+#string STR_INPUT_PASSWORD                        #language en-US  "Please Input Password"\r
+                                                  #language fr-FR  "Please Input Password(French)"\r
+#string STR_PROVIDER_NAME                          #language en-US  "INTEL Password Credential Provider"\r
                                                   #language fr-FR  "INTEL Password Credential Provider(French)"\r
 #string STR_PROVIDER_TYPE_NAME                    #language en-US  "Password Credential Provider"\r
-                                                  #language fr-FR  "Password Credential Provider(French)"                                                  \r
+                                                  #language fr-FR  "Password Credential Provider(French)"\r
 #string STR_INPUT_PASSWORD_AGAIN                  #language en-US  "Input Password Again"\r
-                                                                                                                                                                   #language fr-FR  "Input Password Again (French)"                                                                                                                                                                \r
+                                                  #language fr-FR  "Input Password Again (French)"\r
 #string STR_DRAW_A_LINE                           #language en-US  "-----------------------------"\r
                                                   #language fr-FR  "------------------------------------"\r
 #string STR_PASSWORD_INCORRECT                    #language en-US  "     Incorrect Password!     "\r
index f623f48304d1e0ae250a5c8ce5ef48243df44fb8..841e9751035319cf9535a0f433d8587713692dee 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Usb Credential Provider driver implemenetation.\r
-    \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -78,7 +78,7 @@ ExpandTableSize (
                sizeof (CREDENTIAL_TABLE) - sizeof (USB_INFO) +\r
                Count * sizeof (USB_INFO)\r
                );\r
-  ASSERT (NewTable != NULL); \r
+  ASSERT (NewTable != NULL);\r
 \r
   NewTable->MaxCount = Count;\r
   NewTable->Count    = mUsbTable->Count;\r
@@ -87,8 +87,8 @@ ExpandTableSize (
   // Copy old entries.\r
   //\r
   CopyMem (\r
-    &NewTable->UserInfo, \r
-    &mUsbTable->UserInfo, \r
+    &NewTable->UserInfo,\r
+    &mUsbTable->UserInfo,\r
     mUsbTable->Count * sizeof (USB_INFO)\r
     );\r
   FreePool (mUsbTable);\r
@@ -100,8 +100,8 @@ ExpandTableSize (
   Add, update or delete info in table, and sync with NV variable.\r
 \r
   @param[in]  Index     The index of the password in table. If index is found in\r
-                        table, update the info, else add the into to table. \r
-  @param[in]  Info      The new credential info to add into table. If Info is NULL, \r
+                        table, update the info, else add the into to table.\r
+  @param[in]  Info      The new credential info to add into table. If Info is NULL,\r
                         delete the info by Index.\r
 \r
   @retval EFI_INVALID_PARAMETER  Info is NULL when save the info.\r
@@ -117,7 +117,7 @@ ModifyTable (
 {\r
   EFI_STATUS  Status;\r
   USB_INFO    *NewUsbInfo;\r
-  \r
+\r
   NewUsbInfo = NULL;\r
   if (Index < mUsbTable->Count) {\r
     if (Info == NULL) {\r
@@ -127,7 +127,7 @@ ModifyTable (
       mUsbTable->Count--;\r
       if (Index != mUsbTable->Count) {\r
         NewUsbInfo = &mUsbTable->UserInfo[mUsbTable->Count];\r
-      } \r
+      }\r
     } else {\r
       //\r
       // Update the specified entry.\r
@@ -190,9 +190,9 @@ InitCredentialTable (
   VarSize = 0;\r
   Var     = NULL;\r
   Status  = gRT->GetVariable (\r
-                   L"UsbCredential", \r
-                   &gUsbCredentialProviderGuid, \r
-                   NULL, \r
+                   L"UsbCredential",\r
+                   &gUsbCredentialProviderGuid,\r
+                   NULL,\r
                    &VarSize,\r
                    Var\r
                    );\r
@@ -202,9 +202,9 @@ InitCredentialTable (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
     Status = gRT->GetVariable (\r
-                    L"UsbCredential", \r
-                    &gUsbCredentialProviderGuid, \r
-                    NULL, \r
+                    L"UsbCredential",\r
+                    &gUsbCredentialProviderGuid,\r
+                    NULL,\r
                     &VarSize,\r
                     Var\r
                     );\r
@@ -212,13 +212,13 @@ InitCredentialTable (
   if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Init Usb credential table.\r
   //\r
   mUsbTable = AllocateZeroPool (\r
                 sizeof (CREDENTIAL_TABLE) - sizeof (USB_INFO) +\r
-                USB_TABLE_INC * sizeof (USB_INFO) + \r
+                USB_TABLE_INC * sizeof (USB_INFO) +\r
                 VarSize\r
                 );\r
   if (mUsbTable == NULL) {\r
@@ -306,7 +306,7 @@ GetFileData (
       if (EFI_ERROR (Status)) {\r
         continue;\r
       }\r
-    \r
+\r
       Status = SimpleFileSystem->OpenVolume (\r
                                    SimpleFileSystem,\r
                                    &RootFs\r
@@ -314,7 +314,7 @@ GetFileData (
       if (EFI_ERROR (Status)) {\r
         continue;\r
       }\r
-                                   \r
+\r
       Status = RootFs->Open (\r
                          RootFs,\r
                          &FileHandle,\r
@@ -324,7 +324,7 @@ GetFileData (
                          );\r
       if (!EFI_ERROR (Status)) {\r
         break;\r
-      }      \r
+      }\r
     }\r
   }\r
 \r
@@ -335,7 +335,7 @@ GetFileData (
     Status = EFI_NOT_FOUND;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Figure out how big the file is.\r
   //\r
@@ -352,7 +352,7 @@ GetFileData (
     goto Done;\r
   }\r
 \r
-  FileInfo = AllocateZeroPool (ScratchBufferSize);                                    \r
+  FileInfo = AllocateZeroPool (ScratchBufferSize);\r
   if (FileInfo == NULL) {\r
     DEBUG ((DEBUG_ERROR, "Can not allocate enough memory for the token file!\n"));\r
     Status = EFI_OUT_OF_RESOURCES;\r
@@ -370,18 +370,18 @@ GetFileData (
     Status = EFI_DEVICE_ERROR;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Allocate a buffer for the file.\r
   //\r
   *BufferSize = (UINT32) FileInfo->FileSize;\r
-  *Buffer     = AllocateZeroPool (*BufferSize); \r
+  *Buffer     = AllocateZeroPool (*BufferSize);\r
   if (*Buffer == NULL) {\r
     DEBUG ((DEBUG_ERROR, "Can not allocate a buffer for the file!\n"));\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Load file into the allocated memory.\r
   //\r
@@ -392,7 +392,7 @@ GetFileData (
     Status = EFI_DEVICE_ERROR;\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Close file.\r
   //\r
@@ -416,13 +416,13 @@ Done:
 /**\r
   Hash the data to get credential.\r
 \r
-  @param[in]   Buffer         Points to the data buffer \r
+  @param[in]   Buffer         Points to the data buffer\r
   @param[in]   BufferSize     The size of data in buffer, in bytes.\r
   @param[out]  Credential     Points to the hashed result\r
 \r
   @retval      TRUE           Hash the data successfully.\r
   @retval      FALSE          Failed to hash the data.\r
-                 \r
+\r
 **/\r
 BOOLEAN\r
 GenerateCredential (\r
@@ -434,23 +434,23 @@ GenerateCredential (
   BOOLEAN           Status;\r
   UINTN             HashSize;\r
   VOID              *Hash;\r
-  \r
+\r
   HashSize = Sha1GetContextSize ();\r
   Hash     = AllocatePool (HashSize);\r
   ASSERT (Hash != NULL);\r
-  \r
+\r
   Status = Sha1Init (Hash);\r
   if (!Status) {\r
     goto Done;\r
   }\r
-  \r
+\r
   Status = Sha1Update (Hash, Buffer, BufferSize);\r
   if (!Status) {\r
     goto Done;\r
   }\r
-  \r
+\r
   Status = Sha1Final (Hash, Credential);\r
-  \r
+\r
 Done:\r
   FreePool (Hash);\r
   return Status;\r
@@ -464,7 +464,7 @@ Done:
 \r
   @retval EFI_SUCCESS           Read a Token successfully.\r
   @retval Others                Fails to read a Token.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 GetToken (\r
@@ -484,14 +484,14 @@ GetToken (
     DEBUG ((DEBUG_ERROR, "Read file %s from USB error! Status=(%r)\n", TokenFile, Status));\r
     return Status;\r
   }\r
-  \r
+\r
   if (!GenerateCredential (Buffer, BufSize, Token)) {\r
     DEBUG ((DEBUG_ERROR, "Generate credential from read data failed!\n"));\r
     FreePool (Buffer);\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
-  \r
-  FreePool (Buffer);  \r
+\r
+  FreePool (Buffer);\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -499,16 +499,16 @@ GetToken (
 /**\r
   Find a user infomation record by the information record type.\r
 \r
-  This function searches all user information records of User from beginning \r
+  This function searches all user information records of User from beginning\r
   until either the information is found or there are no more user infomation\r
   record. A match occurs when a Info.InfoType field matches the user information\r
   record type.\r
 \r
-  @param[in]     User      Points to the user profile record to search.                          \r
+  @param[in]     User      Points to the user profile record to search.\r
   @param[in]     InfoType  The infomation type to be searched.\r
   @param[out]    Info      Points to the user info found, the caller is responsible\r
                            to free.\r
-  \r
+\r
   @retval EFI_SUCCESS      Find the user information successfully.\r
   @retval Others           Fail to find the user information.\r
 \r
@@ -525,7 +525,7 @@ FindUserInfoByType (
   UINTN                      UserInfoSize;\r
   EFI_USER_INFO_HANDLE       UserInfoHandle;\r
   EFI_USER_MANAGER_PROTOCOL  *UserManager;\r
-  \r
+\r
   //\r
   // Find user information by information type.\r
   //\r
@@ -588,7 +588,7 @@ FindUserInfoByType (
     if (UserInfo->InfoType == InfoType) {\r
       *Info = UserInfo;\r
       return EFI_SUCCESS;\r
-    }    \r
+    }\r
   }\r
 \r
   if (UserInfo != NULL) {\r
@@ -611,7 +611,7 @@ InitFormBrowser (
   )\r
 {\r
   USB_PROVIDER_CALLBACK_INFO  *CallbackInfo;\r
-    \r
+\r
   //\r
   // Initialize driver private data.\r
   //\r
@@ -619,7 +619,7 @@ InitFormBrowser (
   if (CallbackInfo == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
\r
+\r
   CallbackInfo->DriverHandle  = NULL;\r
 \r
   //\r
@@ -643,24 +643,24 @@ InitFormBrowser (
 /**\r
   Enroll a user on a credential provider.\r
 \r
-  This function enrolls a user on this credential provider. If the user exists on \r
-  this credential provider, update the user information on this credential provider; \r
+  This function enrolls a user on this credential provider. If the user exists on\r
+  this credential provider, update the user information on this credential provider;\r
   otherwise add the user information on credential provider.\r
-  \r
+\r
   @param[in] This                Points to this instance of EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in] User                The user profile to enroll.\r
\r
+\r
   @retval EFI_SUCCESS            User profile was successfully enrolled.\r
   @retval EFI_ACCESS_DENIED      Current user profile does not permit enrollment on the\r
                                  user profile handle. Either the user profile cannot enroll\r
-                                 on any user profile or cannot enroll on a user profile \r
+                                 on any user profile or cannot enroll on a user profile\r
                                  other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support enrollment in\r
                                  the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be created because of a device\r
                                  error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -681,7 +681,7 @@ CredentialEnroll (
   if ((This == NULL) || (User == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
\r
+\r
   //\r
   // Get User Identifier\r
   //\r
@@ -695,16 +695,16 @@ CredentialEnroll (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  CopyMem (UsbInfo.UserId, (UINT8 *) (UserInfo + 1), sizeof (EFI_USER_INFO_IDENTIFIER)); \r
+  CopyMem (UsbInfo.UserId, (UINT8 *) (UserInfo + 1), sizeof (EFI_USER_INFO_IDENTIFIER));\r
   FreePool (UserInfo);\r
-  \r
+\r
   //\r
   // Get Token and User ID to UsbInfo.\r
   //\r
   Status = GetToken (UsbInfo.Token);\r
   if (EFI_ERROR (Status)) {\r
     QuestionStr = GetStringById (STRING_TOKEN (STR_READ_USB_TOKEN_ERROR));\r
-    PromptStr   = GetStringById (STRING_TOKEN (STR_INSERT_USB_TOKEN)); \r
+    PromptStr   = GetStringById (STRING_TOKEN (STR_INSERT_USB_TOKEN));\r
     CreatePopUp (\r
       EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
       &Key,\r
@@ -716,21 +716,21 @@ CredentialEnroll (
     FreePool (QuestionStr);\r
     FreePool (PromptStr);\r
     return Status;\r
-  } \r
+  }\r
 \r
   //\r
   // Check whether User is ever enrolled in the provider.\r
-  // \r
+  //\r
   for (Index = 0; Index < mUsbTable->Count; Index++) {\r
     UserId = (UINT8 *) &mUsbTable->UserInfo[Index].UserId;\r
     if (CompareMem (UserId, (UINT8 *) &UsbInfo.UserId, sizeof (EFI_USER_INFO_IDENTIFIER)) == 0) {\r
       //\r
       // User already exists, update the password.\r
-      //      \r
+      //\r
       break;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Enroll the User to the provider.\r
   //\r
@@ -748,7 +748,7 @@ CredentialEnroll (
 \r
   This function returns information about the form used when interacting with the\r
   user during user identification. The form is the first enabled form in the form-set\r
-  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If \r
+  class EFI_HII_USER_CREDENTIAL_FORMSET_GUID installed on the HII handle HiiHandle. If\r
   the user credential provider does not require a form to identify the user, then this\r
   function should return EFI_NOT_FOUND.\r
 \r
@@ -756,13 +756,13 @@ CredentialEnroll (
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] FormSetId  On return, holds the identifier of the form set which contains\r
                          the form used during user identification.\r
-  @param[out] FormId     On return, holds the identifier of the form used during user \r
+  @param[out] FormId     On return, holds the identifier of the form used during user\r
                          identification.\r
-                         \r
+\r
   @retval EFI_SUCCESS            Form returned successfully.\r
   @retval EFI_NOT_FOUND          Form not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or FormSetId is NULL or FormId is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -773,7 +773,7 @@ CredentialForm (
   OUT       EFI_FORM_ID                         *FormId\r
   )\r
 {\r
-  if ((This == NULL) || (Hii == NULL) || \r
+  if ((This == NULL) || (Hii == NULL) ||\r
       (FormSetId == NULL) || (FormId == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -786,22 +786,22 @@ CredentialForm (
 \r
   This optional function returns a bitmap which is less than or equal to the number\r
   of pixels specified by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND\r
-  is returned. \r
+  is returned.\r
 \r
   @param[in]     This    Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in, out] Width  On entry, points to the desired bitmap width. If NULL then no \r
-                         bitmap information will be returned. On exit, points to the \r
+  @param[in, out] Width  On entry, points to the desired bitmap width. If NULL then no\r
+                         bitmap information will be returned. On exit, points to the\r
                          width of the bitmap returned.\r
   @param[in, out] Height On entry, points to the desired bitmap height. If NULL then no\r
-                         bitmap information will be returned. On exit, points to the \r
+                         bitmap information will be returned. On exit, points to the\r
                          height of the bitmap returned.\r
-  @param[out]    Hii     On return, holds the HII database handle. \r
-  @param[out]    Image   On return, holds the HII image identifier. \r
\r
+  @param[out]    Hii     On return, holds the HII database handle.\r
+  @param[out]    Image   On return, holds the HII image identifier.\r
+\r
   @retval EFI_SUCCESS            Image identifier returned successfully.\r
   @retval EFI_NOT_FOUND          Image identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or Image is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -824,16 +824,16 @@ CredentialTile (
   Returns string used to describe the credential provider type.\r
 \r
   This function returns a string which describes the credential provider. If no\r
-  such string exists, then EFI_NOT_FOUND is returned. \r
+  such string exists, then EFI_NOT_FOUND is returned.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] String     On return, holds the HII string identifier.\r
\r
+\r
   @retval EFI_SUCCESS            String identifier returned successfully.\r
   @retval EFI_NOT_FOUND          String identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or String is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -860,23 +860,23 @@ CredentialTitle (
   Return the user identifier associated with the currently authenticated user.\r
 \r
   This function returns the user identifier of the user authenticated by this credential\r
-  provider. This function is called after the credential-related information has been \r
+  provider. This function is called after the credential-related information has been\r
   submitted on a form OR after a call to Default() has returned that this credential is\r
   ready to log on.\r
 \r
   @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]  User           The user profile handle of the user profile currently being \r
+  @param[in]  User           The user profile handle of the user profile currently being\r
                              considered by the user identity manager. If NULL, then no user\r
                              profile is currently under consideration.\r
-  @param[out] Identifier     On return, points to the user identifier. \r
\r
+  @param[out] Identifier     On return, points to the user identifier.\r
+\r
   @retval EFI_SUCCESS            User identifier returned successfully.\r
   @retval EFI_NOT_READY          No user identifier can be returned.\r
   @retval EFI_ACCESS_DENIED      The user has been locked out of this user credential.\r
   @retval EFI_INVALID_PARAMETER  This is NULL, or Identifier is NULL.\r
   @retval EFI_NOT_FOUND          User is not NULL, and the specified user handle can't be\r
                                  found in user profile database.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -891,16 +891,16 @@ CredentialUser (
   EFI_USER_INFO *UserInfo;\r
   UINT8         *UserId;\r
   UINT8         *NewUserId;\r
-  UINT8         *UserToken; \r
+  UINT8         *UserToken;\r
   UINT8         ReadToken[HASHED_CREDENTIAL_LEN];\r
   EFI_INPUT_KEY Key;\r
   CHAR16        *QuestionStr;\r
   CHAR16        *PromptStr;\r
-  \r
+\r
   if ((This == NULL) || (Identifier == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
\r
+\r
   if (User == NULL) {\r
     //\r
     // Verify the auto logon user, get user id by matched token.\r
@@ -908,7 +908,7 @@ CredentialUser (
     if (mUsbTable->Count == 0) {\r
       return EFI_NOT_READY;\r
     }\r
-    \r
+\r
     //\r
     // No user selected, get token first and verify the user existed in user database.\r
     //\r
@@ -916,7 +916,7 @@ CredentialUser (
     if (EFI_ERROR (Status)) {\r
       return EFI_NOT_READY;\r
     }\r
-    \r
+\r
     for (Index = 0; Index < mUsbTable->Count; Index++) {\r
       //\r
       // find the specified credential in the Usb credential database.\r
@@ -929,15 +929,15 @@ CredentialUser (
       }\r
     }\r
 \r
-    return EFI_NOT_READY;  \r
+    return EFI_NOT_READY;\r
   }\r
-   \r
-  //  \r
-  // User is not NULL here. Read a token, and check whether the token matches with \r
-  // the selected user's Token. If not, try to find a token in token DB to matches \r
+\r
+  //\r
+  // User is not NULL here. Read a token, and check whether the token matches with\r
+  // the selected user's Token. If not, try to find a token in token DB to matches\r
   // with read token.\r
-  // \r
-  \r
+  //\r
+\r
   Status = GetToken (ReadToken);\r
   if (EFI_ERROR (Status)) {\r
     QuestionStr = GetStringById (STRING_TOKEN (STR_READ_USB_TOKEN_ERROR));\r
@@ -961,8 +961,8 @@ CredentialUser (
   Status = FindUserInfoByType (User, EFI_USER_INFO_IDENTIFIER_RECORD, &UserInfo);\r
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
-  } \r
-  \r
+  }\r
+\r
   //\r
   // Check the selected user's Token with the read token.\r
   //\r
@@ -981,12 +981,12 @@ CredentialUser (
         CopyMem (Identifier, UserId, sizeof (EFI_USER_INFO_IDENTIFIER));\r
         FreePool (UserInfo);\r
         return EFI_SUCCESS;\r
-      } \r
+      }\r
     }\r
   }\r
 \r
-  FreePool (UserInfo); \r
-    \r
+  FreePool (UserInfo);\r
+\r
   return EFI_NOT_READY;\r
 }\r
 \r
@@ -994,17 +994,17 @@ CredentialUser (
 /**\r
   Indicate that user interface interaction has begun for the specified credential.\r
 \r
-  This function is called when a credential provider is selected by the user. If \r
+  This function is called when a credential provider is selected by the user. If\r
   AutoLogon returns FALSE, then the user interface will be constructed by the User\r
-  Identity Manager. \r
+  Identity Manager.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[out] AutoLogon  On return, points to the credential provider's capabilities \r
-                         after the credential provider has been selected by the user. \r
\r
+  @param[out] AutoLogon  On return, points to the credential provider's capabilities\r
+                         after the credential provider has been selected by the user.\r
+\r
   @retval EFI_SUCCESS            Credential provider successfully selected.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1029,9 +1029,9 @@ CredentialSelect (
   This function is called when a credential provider is deselected by the user.\r
 \r
   @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
\r
+\r
   @retval EFI_SUCCESS    Credential provider successfully deselected.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1049,15 +1049,15 @@ CredentialDeselect (
 /**\r
   Return the default logon behavior for this user credential.\r
 \r
-  This function reports the default login behavior regarding this credential provider.  \r
+  This function reports the default login behavior regarding this credential provider.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, holds whether the credential provider should be used\r
-                         by default to automatically log on the user.  \r
\r
+                         by default to automatically log on the user.\r
+\r
   @retval EFI_SUCCESS            Default information successfully returned.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1078,24 +1078,24 @@ CredentialDefault (
 /**\r
   Return information attached to the credential provider.\r
 \r
-  This function returns user information. \r
+  This function returns user information.\r
 \r
   @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]      UserInfo      Handle of the user information data record. \r
+  @param[in]      UserInfo      Handle of the user information data record.\r
   @param[out]     Info          On entry, points to a buffer of at least *InfoSize bytes. On\r
                                 exit, holds the user information. If the buffer is too small\r
                                 to hold the information, then EFI_BUFFER_TOO_SMALL is returned\r
                                 and InfoSize is updated to contain the number of bytes actually\r
                                 required.\r
-  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the \r
-                                size of the user information. \r
\r
+  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the\r
+                                size of the user information.\r
+\r
   @retval EFI_SUCCESS           Information returned successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  The size specified by InfoSize is too small to hold all of the\r
                                 user information. The size required is returned in *InfoSize.\r
   @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r
-  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle. \r
-                                \r
+  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1108,7 +1108,7 @@ CredentialGetInfo (
 {\r
   EFI_USER_INFO            *CredentialInfo;\r
   UINTN                    Index;\r
-  \r
+\r
   if ((This == NULL) || (InfoSize == NULL) || (Info == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1116,7 +1116,7 @@ CredentialGetInfo (
   if ((UserInfo == NULL) || (mUsbInfoHandle == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Find information handle in credential info table.\r
   //\r
@@ -1130,12 +1130,12 @@ CredentialGetInfo (
         *InfoSize = CredentialInfo->InfoSize;\r
         return EFI_BUFFER_TOO_SMALL;\r
       }\r
-      \r
-      CopyMem (Info, CredentialInfo, CredentialInfo->InfoSize);      \r
-      return EFI_SUCCESS;            \r
+\r
+      CopyMem (Info, CredentialInfo, CredentialInfo->InfoSize);\r
+      return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -1146,17 +1146,17 @@ CredentialGetInfo (
   This function returns the next user information record. To retrieve the first user\r
   information record handle, point UserInfo at a NULL. Each subsequent call will retrieve\r
   another user information record handle until there are no more, at which point UserInfo\r
-  will point to NULL. \r
+  will point to NULL.\r
 \r
   @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] UserInfo On entry, points to the previous user information handle or NULL\r
                            to start enumeration. On exit, points to the next user information\r
                            handle or NULL if there is no more user information.\r
\r
+\r
   @retval EFI_SUCCESS            User information returned.\r
   @retval EFI_NOT_FOUND          No more user information found.\r
   @retval EFI_INVALID_PARAMETER  UserInfo is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -1170,7 +1170,7 @@ CredentialGetNextInfo (
   UINTN                    InfoLen;\r
   UINTN                    Index;\r
   UINTN                    ProvStrLen;\r
-    \r
+\r
   if ((This == NULL) || (UserInfo == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1192,13 +1192,13 @@ CredentialGetNextInfo (
     InfoLen = sizeof (EFI_USER_INFO) + sizeof (EFI_GUID);\r
     Info    = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);\r
     CopyGuid ((EFI_GUID *)(Info + 1), &gUsbCredentialProviderGuid);\r
-    \r
+\r
     mUsbInfoHandle->Info[0] = Info;\r
     mUsbInfoHandle->Count++;\r
 \r
@@ -1210,14 +1210,14 @@ CredentialGetNextInfo (
     InfoLen     = sizeof (EFI_USER_INFO) + ProvStrLen;\r
     Info        = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);\r
     CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);\r
     FreePool (ProvNameStr);\r
-    \r
+\r
     mUsbInfoHandle->Info[1] = Info;\r
     mUsbInfoHandle->Count++;\r
 \r
@@ -1227,16 +1227,16 @@ CredentialGetNextInfo (
     InfoLen = sizeof (EFI_USER_INFO) + sizeof (EFI_GUID);\r
     Info    = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-      \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_TYPE_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);\r
     CopyGuid ((EFI_GUID *)(Info + 1), &gEfiUserCredentialClassSecureCardGuid);\r
-    \r
+\r
     mUsbInfoHandle->Info[2] = Info;\r
     mUsbInfoHandle->Count++;\r
\r
+\r
     //\r
     // The fourth information, Credential Provider type name info.\r
     //\r
@@ -1245,18 +1245,18 @@ CredentialGetNextInfo (
     InfoLen     = sizeof (EFI_USER_INFO) + ProvStrLen;\r
     Info        = AllocateZeroPool (InfoLen);\r
     ASSERT (Info != NULL);\r
-    \r
+\r
     Info->InfoType    = EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD;\r
     Info->InfoSize    = (UINT32) InfoLen;\r
     Info->InfoAttribs = EFI_USER_INFO_PROTECTED;\r
     CopyGuid (&Info->Credential, &gUsbCredentialProviderGuid);\r
     CopyMem ((UINT8*)(Info + 1), ProvNameStr, ProvStrLen);\r
     FreePool (ProvNameStr);\r
-    \r
+\r
     mUsbInfoHandle->Info[3] = Info;\r
     mUsbInfoHandle->Count++;\r
   }\r
-  \r
+\r
   if (*UserInfo == NULL) {\r
     //\r
     // Return the first info handle.\r
@@ -1264,7 +1264,7 @@ CredentialGetNextInfo (
     *UserInfo = (EFI_USER_INFO_HANDLE) mUsbInfoHandle->Info[0];\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Find information handle in credential info table.\r
   //\r
@@ -1283,7 +1283,7 @@ CredentialGetNextInfo (
       }\r
       Index++;\r
       *UserInfo = (EFI_USER_INFO_HANDLE)mUsbInfoHandle->Info[Index];\r
-      return EFI_SUCCESS; \r
+      return EFI_SUCCESS;\r
     }\r
   }\r
 \r
@@ -1295,15 +1295,15 @@ CredentialGetNextInfo (
 /**\r
   Delete a user on this credential provider.\r
 \r
-  This function deletes a user on this credential provider. \r
+  This function deletes a user on this credential provider.\r
 \r
   @param[in]     This            Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]     User            The user profile handle to delete.\r
 \r
   @retval EFI_SUCCESS            User profile was successfully deleted.\r
-  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle. \r
-                                 Either the user profile cannot delete on any user profile or cannot delete \r
-                                 on a user profile other than the current user profile. \r
+  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle.\r
+                                 Either the user profile cannot delete on any user profile or cannot delete\r
+                                 on a user profile other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support deletion in the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be deleted because of a device error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
@@ -1320,7 +1320,7 @@ CredentialDelete (
   UINT8                     *UserId;\r
   UINT8                     *NewUserId;\r
   UINTN                     Index;\r
-  \r
+\r
   if ((This == NULL) || (User == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1340,7 +1340,7 @@ CredentialDelete (
 \r
   //\r
   // Find the user by user identifier in mPwdTable.\r
-  // \r
+  //\r
   for (Index = 0; Index < mUsbTable->Count; Index++) {\r
     UserId    = (UINT8 *) &mUsbTable->UserInfo[Index].UserId;\r
     NewUserId = (UINT8 *) (UserInfo + 1);\r
@@ -1388,7 +1388,7 @@ UsbProviderInit (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Init Form Browser\r
   //\r
@@ -1396,7 +1396,7 @@ UsbProviderInit (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Install protocol interfaces for the Usb Credential Provider.\r
   //\r
index 83f7f9e2ca4cc422547c337ae7c89a1b2d434bec..63f6576045b850841fd769e88f301bc01796d4be 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Usb Credential Provider driver header file.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -80,26 +80,26 @@ typedef struct {
 /**\r
   Enroll a user on a credential provider.\r
 \r
-  This function enrolls and deletes a user profile using this credential provider. \r
-  If a user profile is successfully enrolled, it calls the User Manager Protocol \r
-  function Notify() to notify the user manager driver that credential information \r
-  has changed. If an enrolled user does exist, delete the user on the credential \r
+  This function enrolls and deletes a user profile using this credential provider.\r
+  If a user profile is successfully enrolled, it calls the User Manager Protocol\r
+  function Notify() to notify the user manager driver that credential information\r
+  has changed. If an enrolled user does exist, delete the user on the credential\r
   provider.\r
 \r
   @param[in] This                Points to this instance of EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in] User                The user profile to enroll.\r
\r
+\r
   @retval EFI_SUCCESS            User profile was successfully enrolled.\r
   @retval EFI_ACCESS_DENIED      Current user profile does not permit enrollment on the\r
                                  user profile handle. Either the user profile cannot enroll\r
-                                 on any user profile or cannot enroll on a user profile \r
+                                 on any user profile or cannot enroll on a user profile\r
                                  other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support enrollment in\r
                                  the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be created because of a device\r
                                  error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -111,21 +111,21 @@ CredentialEnroll (
 /**\r
   Returns the user interface information used during user identification.\r
 \r
-  This function enrolls a user on this credential provider. If the user exists on \r
-  this credential provider, update the user information on this credential provider; \r
+  This function enrolls a user on this credential provider. If the user exists on\r
+  this credential provider, update the user information on this credential provider;\r
   otherwise delete the user information on credential provider.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] FormSetId  On return, holds the identifier of the form set which contains\r
                          the form used during user identification.\r
-  @param[out] FormId     On return, holds the identifier of the form used during user \r
+  @param[out] FormId     On return, holds the identifier of the form used during user\r
                          identification.\r
-                         \r
+\r
   @retval EFI_SUCCESS            Form returned successfully.\r
   @retval EFI_NOT_FOUND          Form not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or FormSetId is NULL or FormId is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -141,22 +141,22 @@ CredentialForm (
 \r
   This optional function returns a bitmap which is less than or equal to the number\r
   of pixels specified by Width and Height. If no such bitmap exists, then EFI_NOT_FOUND\r
-  is returned. \r
+  is returned.\r
 \r
   @param[in]     This    Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in, out] Width  On entry, points to the desired bitmap width. If NULL then no \r
-                         bitmap information will be returned. On exit, points to the \r
+  @param[in, out] Width  On entry, points to the desired bitmap width. If NULL then no\r
+                         bitmap information will be returned. On exit, points to the\r
                          width of the bitmap returned.\r
   @param[in, out] Height On entry, points to the desired bitmap height. If NULL then no\r
-                         bitmap information will be returned. On exit, points to the \r
+                         bitmap information will be returned. On exit, points to the\r
                          height of the bitmap returned.\r
-  @param[out]    Hii     On return, holds the HII database handle. \r
-  @param[out]    Image   On return, holds the HII image identifier. \r
\r
+  @param[out]    Hii     On return, holds the HII database handle.\r
+  @param[out]    Image   On return, holds the HII image identifier.\r
+\r
   @retval EFI_SUCCESS            Image identifier returned successfully.\r
   @retval EFI_NOT_FOUND          Image identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or Image is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -172,16 +172,16 @@ CredentialTile (
   Returns string used to describe the credential provider type.\r
 \r
   This function returns a string which describes the credential provider. If no\r
-  such string exists, then EFI_NOT_FOUND is returned. \r
+  such string exists, then EFI_NOT_FOUND is returned.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] Hii        On return, holds the HII database handle.\r
   @param[out] String     On return, holds the HII string identifier.\r
\r
+\r
   @retval EFI_SUCCESS            String identifier returned successfully.\r
   @retval EFI_NOT_FOUND          String identifier not returned.\r
   @retval EFI_INVALID_PARAMETER  Hii is NULL or String is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -195,23 +195,23 @@ CredentialTitle (
   Return the user identifier associated with the currently authenticated user.\r
 \r
   This function returns the user identifier of the user authenticated by this credential\r
-  provider. This function is called after the credential-related information has been \r
+  provider. This function is called after the credential-related information has been\r
   submitted on a form OR after a call to Default() has returned that this credential is\r
   ready to log on.\r
 \r
   @param[in]  This           Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]  User           The user profile handle of the user profile currently being \r
+  @param[in]  User           The user profile handle of the user profile currently being\r
                              considered by the user identity manager. If NULL, then no user\r
                              profile is currently under consideration.\r
-  @param[out] Identifier     On return, points to the user identifier. \r
\r
+  @param[out] Identifier     On return, points to the user identifier.\r
+\r
   @retval EFI_SUCCESS        User identifier returned successfully.\r
   @retval EFI_NOT_READY      No user identifier can be returned.\r
   @retval EFI_ACCESS_DENIED  The user has been locked out of this user credential.\r
   @retval EFI_INVALID_PARAMETER  This is NULL, or Identifier is NULL.\r
   @retval EFI_NOT_FOUND          User is not NULL, and the specified user handle can't be\r
                                  found in user profile database.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -224,17 +224,17 @@ CredentialUser (
 /**\r
   Indicate that user interface interaction has begun for the specified credential.\r
 \r
-  This function is called when a credential provider is selected by the user. If \r
+  This function is called when a credential provider is selected by the user. If\r
   AutoLogon returns FALSE, then the user interface will be constructed by the User\r
-  Identity Manager. \r
+  Identity Manager.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[out] AutoLogon  On return, points to the credential provider's capabilities \r
-                         after the credential provider has been selected by the user. \r
\r
+  @param[out] AutoLogon  On return, points to the credential provider's capabilities\r
+                         after the credential provider has been selected by the user.\r
+\r
   @retval EFI_SUCCESS            Credential provider successfully selected.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -249,9 +249,9 @@ CredentialSelect (
   This function is called when a credential provider is deselected by the user.\r
 \r
   @param[in] This        Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
\r
+\r
   @retval EFI_SUCCESS    Credential provider successfully deselected.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -262,12 +262,12 @@ CredentialDeselect (
 /**\r
   Return the default logon behavior for this user credential.\r
 \r
-  This function reports the default login behavior regarding this credential provider.  \r
+  This function reports the default login behavior regarding this credential provider.\r
 \r
   @param[in]  This       Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[out] AutoLogon  On return, holds whether the credential provider should be used\r
-                         by default to automatically log on the user.  \r
\r
+                         by default to automatically log on the user.\r
+\r
   @retval EFI_SUCCESS            Default information successfully returned.\r
   @retval EFI_INVALID_PARAMETER  AutoLogon is NULL.\r
 \r
@@ -282,24 +282,24 @@ CredentialDefault (
 /**\r
   Return information attached to the credential provider.\r
 \r
-  This function returns user information. \r
+  This function returns user information.\r
 \r
   @param[in]      This          Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
-  @param[in]      UserInfo      Handle of the user information data record. \r
+  @param[in]      UserInfo      Handle of the user information data record.\r
   @param[out]     Info          On entry, points to a buffer of at least *InfoSize bytes. On\r
                                 exit, holds the user information. If the buffer is too small\r
                                 to hold the information, then EFI_BUFFER_TOO_SMALL is returned\r
                                 and InfoSize is updated to contain the number of bytes actually\r
                                 required.\r
-  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the \r
-                                size of the user information. \r
\r
+  @param[in, out] InfoSize      On entry, points to the size of Info. On return, points to the\r
+                                size of the user information.\r
+\r
   @retval EFI_SUCCESS           Information returned successfully.\r
   @retval EFI_BUFFER_TOO_SMALL  The size specified by InfoSize is too small to hold all of the\r
                                 user information. The size required is returned in *InfoSize.\r
   @retval EFI_INVALID_PARAMETER Info is NULL or InfoSize is NULL.\r
-  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle. \r
-                                \r
+  @retval EFI_NOT_FOUND         The specified UserInfo does not refer to a valid user info handle.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -316,17 +316,17 @@ CredentialGetInfo (
   This function returns the next user information record. To retrieve the first user\r
   information record handle, point UserInfo at a NULL. Each subsequent call will retrieve\r
   another user information record handle until there are no more, at which point UserInfo\r
-  will point to NULL. \r
+  will point to NULL.\r
 \r
   @param[in]      This     Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in, out] UserInfo On entry, points to the previous user information handle or NULL\r
                            to start enumeration. On exit, points to the next user information\r
                            handle or NULL if there is no more user information.\r
\r
+\r
   @retval EFI_SUCCESS            User information returned.\r
   @retval EFI_NOT_FOUND          No more user information found.\r
   @retval EFI_INVALID_PARAMETER  UserInfo is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -338,15 +338,15 @@ CredentialGetNextInfo (
 /**\r
   Delete a user on this credential provider.\r
 \r
-  This function deletes a user on this credential provider. \r
+  This function deletes a user on this credential provider.\r
 \r
   @param[in]     This            Points to this instance of the EFI_USER_CREDENTIAL2_PROTOCOL.\r
   @param[in]     User            The user profile handle to delete.\r
 \r
   @retval EFI_SUCCESS            User profile was successfully deleted.\r
-  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle. \r
-                                 Either the user profile cannot delete on any user profile or cannot delete \r
-                                 on a user profile other than the current user profile. \r
+  @retval EFI_ACCESS_DENIED      Current user profile does not permit deletion on the user profile handle.\r
+                                 Either the user profile cannot delete on any user profile or cannot delete\r
+                                 on a user profile other than the current user profile.\r
   @retval EFI_UNSUPPORTED        This credential provider does not support deletion in the pre-OS.\r
   @retval EFI_DEVICE_ERROR       The new credential could not be deleted because of a device error.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile handle.\r
index 87a66fbea0a0c7cc8515eccdbc2ad4ffd153e92a..1e8e42332f011d8eab38d6baf531740c4bc9015f 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 #  Provides a USB credential provider implementation\r
 #\r
-#  This module reads a token from a token file that is saved in the root \r
+#  This module reads a token from a token file that is saved in the root\r
 #  folder of a USB stick. The token file name can be specified by the PCD\r
 #  PcdFixedUsbCredentialProviderTokenFileName.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
   HiiLib\r
   UefiLib\r
   BaseCryptLib\r
-  \r
+\r
 [Guids]\r
   ## PRODUCES             ## Variable:L"UsbCredential"\r
   ## CONSUMES             ## Variable:L"UsbCredential"\r
   ## CONSUMES             ## HII\r
   ## SOMETIMES_CONSUMES   ## GUID               # The credential provider identifier\r
   gUsbCredentialProviderGuid\r
-  \r
+\r
   gEfiFileInfoGuid                              ## SOMETIMES_CONSUMES         ## GUID\r
   gEfiUserCredentialClassSecureCardGuid         ## SOMETIMES_CONSUMES         ## GUID\r
 \r
 [Pcd]\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdFixedUsbCredentialProviderTokenFileName    ## SOMETIMES_CONSUMES \r
+  gEfiSecurityPkgTokenSpaceGuid.PcdFixedUsbCredentialProviderTokenFileName    ## SOMETIMES_CONSUMES\r
 \r
 [Protocols]\r
   gEfiUserCredential2ProtocolGuid               ## PRODUCES\r
   gEfiUserManagerProtocolGuid                   ## SOMETIMES_CONSUMES\r
   gEfiBlockIoProtocolGuid                       ## SOMETIMES_CONSUMES\r
   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   UsbCredentialProviderExtra.uni\r
-  
\ No newline at end of file
+\r
index 0fc955e477c5cbf9190d96a1d512408e9f595dc8..a20917d5f720d8cc03ee14ede1ec246d1fac759e 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // UsbCredentialProvider Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "USB Credential Provider"\r
 \r
 \r
index b91fe9ca066263aaeaed009c06208503085652c9..f306d50a4e2c58e7715143b87f7ffce36b62159a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   String definitions for the USB Credential Provider.\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,6 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_PROVIDER_TYPE_NAME                    #language en-US  "Secure Card Credential Provider"\r
                                                   #language fr-FR  "Secure Card Credential Provider (French)"\r
 #string STR_READ_USB_TOKEN_ERROR                  #language en-US  "Read USB Token File Error!"\r
-                                                                                                                                                                   #language fr-FR  "Read USB Token File Error! (French)"\r
+                                                  #language fr-FR  "Read USB Token File Error! (French)"\r
 #string STR_INSERT_USB_TOKEN                      #language en-US  "Please insert USB key with Token"\r
                                                   #language fr-FR  "Please insert USB key with Token (French)"\r
index da1201a5f9203e65982b82a5c8a93d7a69c11234..2cfe130db8ede201450015e06996b64fd0f92b65 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Load the deferred images after user is identified.\r
-    \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -39,7 +39,7 @@ LoadDeferredImage (
   UINTN                              DriverIndex;\r
   EFI_DEVICE_PATH_PROTOCOL           *ImageDevicePath;\r
   VOID                               *DriverImage;\r
-  UINTN                              ImageSize; \r
+  UINTN                              ImageSize;\r
   BOOLEAN                            BootOption;\r
   EFI_HANDLE                         ImageHandle;\r
   UINTN                              ExitDataSize;\r
@@ -77,16 +77,16 @@ LoadDeferredImage (
       // Load all the deferred images in this protocol instance.\r
       //\r
       Status = DeferredImage->GetImageInfo(\r
-                                DeferredImage, \r
-                                DriverIndex, \r
-                                &ImageDevicePath, \r
+                                DeferredImage,\r
+                                DriverIndex,\r
+                                &ImageDevicePath,\r
                                 (VOID **) &DriverImage,\r
-                                &ImageSize, \r
+                                &ImageSize,\r
                                 &BootOption\r
                                 );\r
       if (EFI_ERROR (Status)) {\r
         break;\r
-      } \r
+      }\r
 \r
       //\r
       // Load and start the image.\r
@@ -106,7 +106,7 @@ LoadDeferredImage (
         //\r
         gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00, NULL);\r
         Status = gBS->StartImage (ImageHandle, &ExitDataSize, &ExitData);\r
-    \r
+\r
         //\r
         // Clear the Watchdog Timer after the image returns.\r
         //\r
@@ -115,7 +115,7 @@ LoadDeferredImage (
       DriverIndex++;\r
     } while (TRUE);\r
   }\r
-  FreePool (HandleBuf); \r
+  FreePool (HandleBuf);\r
 }\r
 \r
 \r
@@ -134,7 +134,7 @@ LoadDeferredImageInit (
   EFI_EVENT     Event;\r
 \r
   mDeferredImageHandle = ImageHandle;\r
-  \r
+\r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_CALLBACK,\r
index f9743db84d88a18c8d40a32b4a4c169918f0053c..fd941792c1fe2c1dfd38c62ac3bfab28796a650e 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   This driver manages user information and produces user manager protocol.\r
-  \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -81,20 +81,20 @@ EFI_USER_MANAGER_PROTOCOL gUserIdentifyManager = {
 /**\r
   Find the specified user in the user database.\r
 \r
-  This function searches the specified user from the beginning of the user database. \r
-  And if NextUser is TRUE, return the next User in the user database.  \r
-  \r
-  @param[in, out] User         On entry, points to the user profile entry to search. \r
+  This function searches the specified user from the beginning of the user database.\r
+  And if NextUser is TRUE, return the next User in the user database.\r
+\r
+  @param[in, out] User         On entry, points to the user profile entry to search.\r
                                On return, points to the user profile entry or NULL if not found.\r
   @param[in]      NextUser     If FALSE, find the user in user profile database specifyed by User\r
-                               If TRUE, find the next user in user profile database specifyed \r
-                               by User. \r
-  @param[out]     ProfileIndex A pointer to the index of user profile database that matches the \r
+                               If TRUE, find the next user in user profile database specifyed\r
+                               by User.\r
+  @param[out]     ProfileIndex A pointer to the index of user profile database that matches the\r
                                user specifyed by User.\r
 \r
   @retval EFI_NOT_FOUND        User was NULL, or User was not found, or the next user was not found.\r
   @retval EFI_SUCCESS          User or the next user are found in user profile database\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 FindUserProfile (\r
@@ -111,7 +111,7 @@ FindUserProfile (
   if ((mUserProfileDb == NULL) || (User == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the user profile is in the user profile database.\r
   //\r
@@ -152,22 +152,22 @@ FindUserProfile (
 /**\r
   Find the specified user information record in the specified User profile.\r
 \r
-  This function searches the specified user information record from the beginning of the user \r
-  profile. And if NextInfo is TRUE, return the next info in the user profile.  \r
-  \r
-  @param[in]      User     Points to the user profile entry.                             \r
+  This function searches the specified user information record from the beginning of the user\r
+  profile. And if NextInfo is TRUE, return the next info in the user profile.\r
+\r
+  @param[in]      User     Points to the user profile entry.\r
   @param[in, out] Info     On entry, points to the user information record or NULL to start\r
                            searching with the first user information record.\r
-                           On return, points to the user information record or NULL if not found.                           \r
+                           On return, points to the user information record or NULL if not found.\r
   @param[in]      NextInfo If FALSE, find the user information record in profile specifyed by User.\r
-                           If TRUE, find the next user information record in profile specifyed \r
-                           by User. \r
+                           If TRUE, find the next user information record in profile specifyed\r
+                           by User.\r
   @param[out]     Offset   A pointer to the offset of the information record in the user profile.\r
 \r
   @retval EFI_INVALID_PARAMETER Info is NULL\r
   @retval EFI_NOT_FOUND         Info was not found, or the next Info was not found.\r
   @retval EFI_SUCCESS           Info or the next info are found in user profile.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 FindUserInfo (\r
@@ -184,7 +184,7 @@ FindUserInfo (
   if (Info == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check user profile entry\r
   //\r
@@ -207,7 +207,7 @@ FindUserInfo (
     }\r
     InfoLen += ALIGN_VARIABLE (UserInfo->InfoSize);\r
   }\r
-  \r
+\r
   //\r
   // Check whether to find the next user information.\r
   //\r
@@ -245,21 +245,21 @@ FindUserInfo (
 /**\r
   Find a user infomation record by the information record type.\r
 \r
-  This function searches all user information records of User. The search starts with the \r
-  user information record following Info and continues until either the information is found \r
+  This function searches all user information records of User. The search starts with the\r
+  user information record following Info and continues until either the information is found\r
   or there are no more user infomation record.\r
   A match occurs when a Info.InfoType field matches the user information record type.\r
 \r
-  @param[in]      User     Points to the user profile record to search.                          \r
+  @param[in]      User     Points to the user profile record to search.\r
   @param[in, out] Info     On entry, points to the user information record or NULL to start\r
                            searching with the first user information record.\r
                            On return, points to the user information record or NULL if not found.\r
   @param[in]      InfoType The infomation type to be searched.\r
 \r
   @retval EFI_SUCCESS           User information was found. Info points to the user information record.\r
-  @retval EFI_NOT_FOUND         User information was not found.                           \r
+  @retval EFI_NOT_FOUND         User information was not found.\r
   @retval EFI_INVALID_PARAMETER User is NULL or Info is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 FindUserInfoByType (\r
@@ -275,7 +275,7 @@ FindUserInfoByType (
   if (Info == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the user has the specified user information.\r
   //\r
@@ -289,7 +289,7 @@ FindUserInfoByType (
   if (EFI_ERROR (Status)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   while (InfoLen < User->UserProfileSize) {\r
     UserInfo = (EFI_USER_INFO *) (User->ProfileInfo + InfoLen);\r
     if (UserInfo->InfoType == InfoType) {\r
@@ -309,27 +309,27 @@ FindUserInfoByType (
 /**\r
   Find a user using a user information record.\r
 \r
-  This function searches all user profiles for the specified user information record. The \r
-  search starts with the user information record handle following UserInfo and continues \r
+  This function searches all user profiles for the specified user information record. The\r
+  search starts with the user information record handle following UserInfo and continues\r
   until either the information is found or there are no more user profiles.\r
-  A match occurs when the Info.InfoType field matches the user information record type and the \r
+  A match occurs when the Info.InfoType field matches the user information record type and the\r
   user information record data matches the portion of Info passed the EFI_USER_INFO header.\r
 \r
-  @param[in, out] User     On entry, points to the previously returned user profile record, \r
-                           or NULL to start searching with the first user profile. \r
+  @param[in, out] User     On entry, points to the previously returned user profile record,\r
+                           or NULL to start searching with the first user profile.\r
                            On return, points to the user profile entry, or NULL if not found.\r
-  @param[in, out] UserInfo On entry, points to the previously returned user information record, \r
-                           or NULL to start searching with the first. \r
+  @param[in, out] UserInfo On entry, points to the previously returned user information record,\r
+                           or NULL to start searching with the first.\r
                            On return, points to the user information record, or NULL if not found.\r
-  @param[in]      Info     Points to the buffer containing the user information to be compared \r
+  @param[in]      Info     Points to the buffer containing the user information to be compared\r
                            to the user information record.\r
   @param[in]      InfoSize The size of Info, in bytes. Same as Info->InfoSize.\r
 \r
-  @retval EFI_SUCCESS           User information was found. User points to the user profile record, \r
+  @retval EFI_SUCCESS           User information was found. User points to the user profile record,\r
                                 and UserInfo points to the user information record.\r
-  @retval EFI_NOT_FOUND         User information was not found.                           \r
+  @retval EFI_NOT_FOUND         User information was not found.\r
   @retval EFI_INVALID_PARAMETER User is NULL; Info is NULL; or, InfoSize is too small.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 FindUserProfileByInfo (\r
@@ -362,7 +362,7 @@ FindUserProfileByInfo (
   if (*User == NULL) {\r
     *User = mUserProfileDb->UserProfile[0];\r
   }\r
-  \r
+\r
   //\r
   // Check user profile handle.\r
   //\r
@@ -377,7 +377,7 @@ FindUserProfileByInfo (
       if (EFI_ERROR (Status)) {\r
         break;\r
       }\r
-      \r
+\r
       if (InfoSize == Info->InfoSize) {\r
         if (CompareMem ((UINT8 *) (InfoEntry + 1), (UINT8 *) (Info + 1), InfoSize - sizeof (EFI_USER_INFO)) == 0) {\r
           //\r
@@ -388,9 +388,9 @@ FindUserProfileByInfo (
           }\r
           return EFI_SUCCESS;\r
         }\r
-      }      \r
+      }\r
     }\r
-    \r
+\r
     //\r
     // Get next user profile.\r
     //\r
@@ -410,7 +410,7 @@ FindUserProfileByInfo (
 \r
   @retval TRUE     The policy is a valid access policy.\r
   @retval FALSE    The access policy is not a valid access policy.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckAccessPolicy (\r
@@ -430,7 +430,7 @@ CheckAccessPolicy (
     //\r
     // Check access policy according to type.\r
     //\r
-    CopyMem (&Access, PolicyInfo + TotalLen, sizeof (Access));    \r
+    CopyMem (&Access, PolicyInfo + TotalLen, sizeof (Access));\r
     ValueLen = Access.Size - sizeof (EFI_USER_INFO_ACCESS_CONTROL);\r
     switch (Access.Type) {\r
     case EFI_USER_INFO_ACCESS_FORBID_LOAD:\r
@@ -492,7 +492,7 @@ CheckAccessPolicy (
 \r
   @retval TRUE     The policy is a valid identity policy.\r
   @retval FALSE    The access policy is not a valid identity policy.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckIdentityPolicy (\r
@@ -602,7 +602,7 @@ CheckIdentityPolicy (
 \r
   @retval TRUE     The info is a valid user information record.\r
   @retval FALSE    The info is not a valid user information record.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckUserInfo (\r
@@ -697,7 +697,7 @@ CheckUserInfo (
 \r
   @retval TRUE     It is a valid user profile.\r
   @retval FALSE    It is not a valid user profile.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckProfileInfo (\r
@@ -711,7 +711,7 @@ CheckProfileInfo (
   if (UserProfileInfo == NULL) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Check user profile information length.\r
   //\r
@@ -742,10 +742,10 @@ CheckProfileInfo (
   @param[in]  RightType      Could be EFI_USER_INFO_ACCESS_MANAGE,\r
                              EFI_USER_INFO_ACCESS_ENROLL_OTHERS or\r
                              EFI_USER_INFO_ACCESS_ENROLL_SELF.\r
-  \r
+\r
   @retval TRUE     Find the specified RightType in current user profile.\r
   @retval FALSE    Can't find the right in the profile.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckCurrentUserAccessRight (\r
@@ -882,7 +882,7 @@ GenerateUserId (
 \r
   @retval TRUE     Success to expand user profile database.\r
   @retval FALSE    Fail to expand user profile database.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 ExpandUsermUserProfileDb (\r
@@ -935,11 +935,11 @@ ExpandUsermUserProfileDb (
   Expand user profile\r
 \r
   @param[in]  User                    Points to user profile.\r
-  @param[in]  ExpandSize              The size of user profile. \r
+  @param[in]  ExpandSize              The size of user profile.\r
 \r
   @retval TRUE     Success to expand user profile size.\r
   @retval FALSE    Fail to expand user profile size.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 ExpandUserProfile (\r
@@ -959,7 +959,7 @@ ExpandUserProfile (
   if (Info == NULL) {\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Copy exist information.\r
   //\r
@@ -981,7 +981,7 @@ ExpandUserProfile (
                            If FALSE, save the user profile.\r
   @retval EFI_SUCCESS      Save or delete user profile successfully.\r
   @retval Others           Fail to change the profile.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 SaveNvUserProfile (\r
@@ -998,7 +998,7 @@ SaveNvUserProfile (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Save the user profile to non-volatile memory.\r
   //\r
@@ -1040,7 +1040,7 @@ AddUserInfo (
   if ((Info == NULL) || (User == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check user profile handle.\r
   //\r
@@ -1048,7 +1048,7 @@ AddUserInfo (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Check user information memory size.\r
   //\r
@@ -1057,7 +1057,7 @@ AddUserInfo (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Add new user information.\r
   //\r
@@ -1083,9 +1083,9 @@ AddUserInfo (
 \r
   @param[in]      User            Point to the user profile.\r
   @param[in]      UserInfo        Point to the user information record to get.\r
-  @param[out]     Info            On entry, points to a buffer of at least *InfoSize bytes. \r
+  @param[out]     Info            On entry, points to a buffer of at least *InfoSize bytes.\r
                                   On exit, holds the user information.\r
-  @param[in, out] InfoSize        On entry, points to the size of Info. \r
+  @param[in, out] InfoSize        On entry, points to the size of Info.\r
                                   On return, points to the size of the user information.\r
   @param[in]      ChkRight        If TRUE, check the user info attribute.\r
                                   If FALSE, don't check the user info attribute.\r
@@ -1093,7 +1093,7 @@ AddUserInfo (
 \r
   @retval EFI_ACCESS_DENIED       The information cannot be accessed by the current user.\r
   @retval EFI_INVALID_PARAMETER   InfoSize is NULL or UserInfo is NULL.\r
-  @retval EFI_BUFFER_TOO_SMALL    The number of bytes specified by *InfoSize is too small to hold the \r
+  @retval EFI_BUFFER_TOO_SMALL    The number of bytes specified by *InfoSize is too small to hold the\r
                                   returned data. The actual size required is returned in *InfoSize.\r
   @retval EFI_SUCCESS             Information returned successfully.\r
 \r
@@ -1116,7 +1116,7 @@ GetUserInfo (
   if ((*InfoSize != 0) && (Info == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Find the user information to get.\r
   //\r
@@ -1124,7 +1124,7 @@ GetUserInfo (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Check information attributes.\r
   //\r
@@ -1145,7 +1145,7 @@ GetUserInfo (
       break;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Get user information.\r
   //\r
@@ -1197,7 +1197,7 @@ DelUserInfo (
   if (Info->InfoType == EFI_USER_INFO_IDENTIFIER_RECORD) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
-  \r
+\r
   //\r
   // Delete the specified user information.\r
   //\r
@@ -1220,7 +1220,7 @@ DelUserInfo (
 \r
   @param[in]      User           Point to the user profile.\r
   @param[in, out] UserInfo       On entry, points to the user information to modify,\r
-                                 or NULL to add a new UserInfo. \r
+                                 or NULL to add a new UserInfo.\r
                                  On return, points to the modified user information.\r
   @param[in]      Info           Points to the new user information.\r
   @param[in]      InfoSize       The size of Info,in bytes.\r
@@ -1249,14 +1249,14 @@ ModifyUserInfo (
   if (InfoSize < sizeof (EFI_USER_INFO) || InfoSize != Info->InfoSize) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check user information.\r
   //\r
   if (Info->InfoType == EFI_USER_INFO_IDENTIFIER_RECORD) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
-  \r
+\r
   if (!CheckUserInfo (Info)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1274,7 +1274,7 @@ ModifyUserInfo (
       }\r
       ASSERT (OldInfo != NULL);\r
 \r
-      if (((OldInfo->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) != 0) || \r
+      if (((OldInfo->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) != 0) ||\r
            ((Info->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) != 0)) {\r
         //\r
         //  Same type can not co-exist for exclusive information.\r
@@ -1292,7 +1292,7 @@ ModifyUserInfo (
       if (!CompareGuid (&OldInfo->Credential, &Info->Credential)) {\r
         continue;\r
       }\r
-  \r
+\r
       PayloadLen = Info->InfoSize - sizeof (EFI_USER_INFO);\r
       if (PayloadLen == 0) {\r
         continue;\r
@@ -1311,7 +1311,7 @@ ModifyUserInfo (
     Status = AddUserInfo (User, (UINT8 *) Info, InfoSize, UserInfo, TRUE);\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Modify existing user information.\r
   //\r
@@ -1319,11 +1319,11 @@ ModifyUserInfo (
   if (OldInfo->InfoType != Info->InfoType) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
-  if (((Info->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) != 0) && \r
+\r
+  if (((Info->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) != 0) &&\r
        (OldInfo->InfoAttribs & EFI_USER_INFO_EXCLUSIVE) == 0) {\r
     //\r
-    // Try to add exclusive attrib in new info. \r
+    // Try to add exclusive attrib in new info.\r
     // Check whether there is another information with the same type in profile.\r
     //\r
     OldInfo = NULL;\r
@@ -1339,7 +1339,7 @@ ModifyUserInfo (
         //\r
         return EFI_ACCESS_DENIED;\r
       }\r
-    } while (TRUE);    \r
+    } while (TRUE);\r
   }\r
 \r
   Status = DelUserInfo (User, *UserInfo, FALSE);\r
@@ -1358,7 +1358,7 @@ ModifyUserInfo (
 \r
   @retval EFI_SUCCESS      Delete user from the user profile successfully.\r
   @retval Others           Fail to delete user from user profile\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 DelUserProfile (\r
@@ -1375,14 +1375,14 @@ DelUserProfile (
   if (EFI_ERROR (Status)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check whether it is the current user.\r
   //\r
   if (User == mCurrentUser) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
-  \r
+\r
   //\r
   // Delete user profile from the non-volatile memory.\r
   //\r
@@ -1449,7 +1449,7 @@ AddUserProfile (
   if (!CheckProfileInfo (ProfileInfo, ProfileSize)) {\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
-  \r
+\r
   //\r
   // Create user profile entry.\r
   //\r
@@ -1468,9 +1468,9 @@ AddUserProfile (
   }\r
 \r
   UnicodeSPrint (\r
-    User->UserVarName, \r
+    User->UserVarName,\r
     sizeof (User->UserVarName),\r
-    L"User%04x", \r
+    L"User%04x",\r
     mUserProfileDb->UserProfileNum\r
     );\r
   User->UserProfileSize = 0;\r
@@ -1532,7 +1532,7 @@ CreateUserProfile (
   UserInfo->InfoSize    = sizeof (EFI_USER_INFO) + sizeof (EFI_USER_INFO_IDENTIFIER);\r
   UserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | EFI_USER_INFO_PUBLIC | EFI_USER_INFO_EXCLUSIVE;\r
   GenerateUserId ((UINT8 *) (UserInfo + 1));\r
-  \r
+\r
   //\r
   // Add user profile to the user profile database.\r
   //\r
@@ -1547,7 +1547,7 @@ CreateUserProfile (
 \r
   @retval EFI_SUCCESS             A default user profile is added successfully.\r
   @retval Others                  Fail to add a default user profile\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 AddDefaultUserProfile (\r
@@ -1562,7 +1562,7 @@ AddDefaultUserProfile (
   EFI_USER_INFO_USAGE_COUNT     UsageCount;\r
   EFI_USER_INFO_ACCESS_CONTROL  *Access;\r
   EFI_USER_INFO_IDENTITY_POLICY *Policy;\r
-  \r
+\r
   //\r
   // Create a user profile.\r
   //\r
@@ -1570,7 +1570,7 @@ AddDefaultUserProfile (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
\r
+\r
   //\r
   // Allocate a buffer to add all default user information.\r
   //\r
@@ -1591,7 +1591,7 @@ AddDefaultUserProfile (
   if (EFI_ERROR (Status)) {\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Add user profile create date record.\r
   //\r
@@ -1609,7 +1609,7 @@ AddDefaultUserProfile (
   if (EFI_ERROR (Status)) {\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Add user profile usage count record.\r
   //\r
@@ -1623,7 +1623,7 @@ AddDefaultUserProfile (
   if (EFI_ERROR (Status)) {\r
     goto Done;\r
   }\r
\r
+\r
   //\r
   // Add user access right.\r
   //\r
@@ -1638,7 +1638,7 @@ AddDefaultUserProfile (
   if (EFI_ERROR (Status)) {\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Add user identity policy.\r
   //\r
@@ -1646,7 +1646,7 @@ AddDefaultUserProfile (
   Info->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | EFI_USER_INFO_PRIVATE | EFI_USER_INFO_EXCLUSIVE;\r
   Policy            = (EFI_USER_INFO_IDENTITY_POLICY *) (Info + 1);\r
   Policy->Type      = EFI_USER_INFO_IDENTITY_TRUE;\r
-  Policy->Length    = sizeof (EFI_USER_INFO_IDENTITY_POLICY);  \r
+  Policy->Length    = sizeof (EFI_USER_INFO_IDENTITY_POLICY);\r
   Info->InfoSize    = sizeof (EFI_USER_INFO) + Policy->Length;\r
   NewInfo = NULL;\r
   Status  = ModifyUserInfo (User, &NewInfo, Info, Info->InfoSize);\r
@@ -1660,7 +1660,7 @@ Done:
 /**\r
   Publish current user information into EFI System Configuration Table.\r
 \r
-  By UEFI spec, the User Identity Manager will publish the current user profile \r
+  By UEFI spec, the User Identity Manager will publish the current user profile\r
   into the EFI System Configuration Table. Currently, only the user identifier and user\r
   name are published.\r
 \r
@@ -1685,7 +1685,7 @@ PublishUserTable (
              );\r
   if (!EFI_ERROR (Status)) {\r
     //\r
-    // The table existed! \r
+    // The table existed!\r
     //\r
     return EFI_SUCCESS;\r
   }\r
@@ -1707,13 +1707,13 @@ PublishUserTable (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Allocate a buffer for user information table.\r
   //\r
   UserInfoTable = (EFI_USER_INFO_TABLE *) AllocateRuntimePool (\r
-                                            sizeof (EFI_USER_INFO_TABLE) + \r
-                                            IdInfo->InfoSize + \r
+                                            sizeof (EFI_USER_INFO_TABLE) +\r
+                                            IdInfo->InfoSize +\r
                                             NameInfo->InfoSize\r
                                             );\r
   if (UserInfoTable == NULL) {\r
@@ -1721,8 +1721,8 @@ PublishUserTable (
     return Status;\r
   }\r
 \r
-  UserInfoTable->Size = sizeof (EFI_USER_INFO_TABLE);  \r
-  \r
+  UserInfoTable->Size = sizeof (EFI_USER_INFO_TABLE);\r
+\r
   //\r
   // Append the user information to the user info table\r
   //\r
@@ -1740,7 +1740,7 @@ PublishUserTable (
 /**\r
   Get the user's identity type.\r
 \r
-  The identify manager only supports the identity policy in which the credential \r
+  The identify manager only supports the identity policy in which the credential\r
   provider handles are connected by the operator 'AND' or 'OR'.\r
 \r
 \r
@@ -1771,7 +1771,7 @@ GetIdentifyType (
     return Status;\r
   }\r
   ASSERT (IdentifyInfo != NULL);\r
-  \r
+\r
   //\r
   // Search the user identify policy according to type.\r
   //\r
@@ -1823,7 +1823,7 @@ IdentifyByProviderId (
   if (Provider == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check the user ID identified by the specified credential provider.\r
   //\r
@@ -1843,12 +1843,12 @@ IdentifyByProviderId (
         // Get credential provider form.\r
         //\r
         Status = UserCredential->Form (\r
-                                   UserCredential, \r
-                                   &HiiHandle, \r
-                                   &FormSetId, \r
+                                   UserCredential,\r
+                                   &HiiHandle,\r
+                                   &FormSetId,\r
                                    &FormId\r
                                    );\r
-        if (!EFI_ERROR (Status)) {        \r
+        if (!EFI_ERROR (Status)) {\r
           //\r
           // Send form to get user input.\r
           //\r
@@ -1863,8 +1863,8 @@ IdentifyByProviderId (
                                                   );\r
           if (EFI_ERROR (Status)) {\r
             return Status;\r
-          }                                            \r
-        }        \r
+          }\r
+        }\r
       }\r
 \r
       Status = UserCredential->User (UserCredential, User, &UserId);\r
@@ -1876,7 +1876,7 @@ IdentifyByProviderId (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
-      \r
+\r
       return EFI_SUCCESS;\r
     }\r
   }\r
@@ -1914,7 +1914,7 @@ UpdateUserInfo (
   if (Info == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Check create date record.\r
   //\r
@@ -1938,7 +1938,7 @@ UpdateUserInfo (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Update usage date record.\r
   //\r
@@ -1961,7 +1961,7 @@ UpdateUserInfo (
       return Status;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Update usage count record.\r
   //\r
@@ -2043,7 +2043,7 @@ AddProviderSelection (
   Add a username item in form.\r
 \r
   @param[in]  Index            The index of the user in the user name list.\r
-  @param[in]  User             Points to the user profile whose username is added. \r
+  @param[in]  User             Points to the user profile whose username is added.\r
   @param[in]  OpCodeHandle     Points to container for dynamic created opcodes.\r
 \r
   @retval EFI_SUCCESS          Add a username successfully.\r
@@ -2066,7 +2066,7 @@ AddUserSelection (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Add user name selection.\r
   //\r
@@ -2090,12 +2090,12 @@ AddUserSelection (
 \r
 /**\r
   Identify the user whose identity policy does not contain the operator 'OR'.\r
-  \r
+\r
   @param[in]  User             Points to the user profile.\r
 \r
   @retval EFI_SUCCESS          The specified user is identified successfully.\r
   @retval Others               Fail to identify the user.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IdentifyAndTypeUser (\r
@@ -2118,7 +2118,7 @@ IdentifyAndTypeUser (
     return Status;\r
   }\r
   ASSERT (IdentifyInfo != NULL);\r
-  \r
+\r
   //\r
   // Check each part of identification policy expression.\r
   //\r
@@ -2213,12 +2213,12 @@ IdentifyAndTypeUser (
 \r
 /**\r
   Identify the user whose identity policy does not contain the operator 'AND'.\r
-  \r
+\r
   @param[in]  User             Points to the user profile.\r
 \r
   @retval EFI_SUCCESS          The specified user is identified successfully.\r
   @retval Others               Fail to identify the user.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IdentifyOrTypeUser (\r
@@ -2244,7 +2244,7 @@ IdentifyOrTypeUser (
     return Status;\r
   }\r
   ASSERT (IdentifyInfo != NULL);\r
-  \r
+\r
   //\r
   // Initialize the container for dynamic opcodes.\r
   //\r
@@ -2354,16 +2354,16 @@ UserIdentifyManagerCallback (
       if (QuestionId != FORM_OPEN_QUESTION_ID) {\r
         return EFI_SUCCESS;\r
       }\r
-  \r
+\r
       //\r
       // Initialize the container for dynamic opcodes.\r
       //\r
       StartOpCodeHandle = HiiAllocateOpCodeHandle ();\r
       ASSERT (StartOpCodeHandle != NULL);\r
-  \r
+\r
       EndOpCodeHandle = HiiAllocateOpCodeHandle ();\r
       ASSERT (EndOpCodeHandle != NULL);\r
-  \r
+\r
       //\r
       // Create Hii Extend Label OpCode.\r
       //\r
@@ -2375,7 +2375,7 @@ UserIdentifyManagerCallback (
                                             );\r
       StartLabel->ExtendOpCode  = EFI_IFR_EXTEND_OP_LABEL;\r
       StartLabel->Number        = LABEL_USER_NAME;\r
-  \r
+\r
       EndLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (\r
                                           EndOpCodeHandle,\r
                                           &gEfiIfrTianoGuid,\r
@@ -2384,7 +2384,7 @@ UserIdentifyManagerCallback (
                                           );\r
       EndLabel->ExtendOpCode  = EFI_IFR_EXTEND_OP_LABEL;\r
       EndLabel->Number        = LABEL_END;\r
-  \r
+\r
       //\r
       // Add all the user profile in the user profile database.\r
       //\r
@@ -2392,7 +2392,7 @@ UserIdentifyManagerCallback (
         User = (USER_PROFILE_ENTRY *) mUserProfileDb->UserProfile[Index];\r
         AddUserSelection ((UINT16)(LABEL_USER_NAME + Index), User, StartOpCodeHandle);\r
       }\r
-  \r
+\r
       HiiUpdateForm (\r
         mCallbackInfo->HiiHandle, // HII handle\r
         &gUserIdentifyManagerGuid,// Formset GUID\r
@@ -2400,10 +2400,10 @@ UserIdentifyManagerCallback (
         StartOpCodeHandle,        // Label for where to insert opcodes\r
         EndOpCodeHandle           // Replace data\r
         );\r
-  \r
+\r
       HiiFreeOpCodeHandle (StartOpCodeHandle);\r
       HiiFreeOpCodeHandle (EndOpCodeHandle);\r
-  \r
+\r
       return EFI_SUCCESS;\r
     }\r
     break;\r
@@ -2415,7 +2415,7 @@ UserIdentifyManagerCallback (
   case EFI_BROWSER_ACTION_CHANGED:\r
     if (QuestionId >= LABEL_PROVIDER_NAME) {\r
       //\r
-      // QuestionId comes from the second Form (Select a Credential Provider if identity  \r
+      // QuestionId comes from the second Form (Select a Credential Provider if identity\r
       // policy is OR type). Identify the user by the selected provider.\r
       //\r
       Status = IdentifyByProviderId (mCurrentUser, &mProviderDb->Provider[QuestionId & 0xFFF]->Identifier);\r
@@ -2426,7 +2426,7 @@ UserIdentifyManagerCallback (
       return EFI_SUCCESS;\r
     }\r
     break;\r
-    \r
+\r
   case EFI_BROWSER_ACTION_CHANGING:\r
     //\r
     // QuestionId comes from the first Form (Select a user to identify).\r
@@ -2483,12 +2483,12 @@ UserIdentifyManagerCallback (
 \r
 /**\r
   This function construct user profile database from user data saved in the Flash.\r
-  If no user is found in Flash, add one default user "administrator" in the user \r
+  If no user is found in Flash, add one default user "administrator" in the user\r
   profile database.\r
 \r
   @retval EFI_SUCCESS            Init user profile database successfully.\r
   @retval Others                 Fail to init user profile database.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 InitUserProfileDb (\r
@@ -2522,7 +2522,7 @@ InitUserProfileDb (
   if (VarData == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Get all user proifle entries.\r
   //\r
@@ -2532,9 +2532,9 @@ InitUserProfileDb (
     // Get variable name.\r
     //\r
     UnicodeSPrint (\r
-      VarName, \r
+      VarName,\r
       sizeof (VarName),\r
-      L"User%04x", \r
+      L"User%04x",\r
       Index\r
       );\r
     Index++;\r
@@ -2562,7 +2562,7 @@ InitUserProfileDb (
       }\r
       break;\r
     }\r
-    \r
+\r
     //\r
     // Check variable attributes.\r
     //\r
@@ -2570,7 +2570,7 @@ InitUserProfileDb (
       Status = gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL);\r
       continue;\r
     }\r
-    \r
+\r
     //\r
     // Add user profile to the user profile database.\r
     //\r
@@ -2602,7 +2602,7 @@ InitUserProfileDb (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the user profile database is empty.\r
   //\r
@@ -2629,7 +2629,7 @@ InitProviderInfo (
   EFI_STATUS  Status;\r
   UINTN       HandleCount;\r
   EFI_HANDLE  *HandleBuf;\r
-  UINTN       Index; \r
+  UINTN       Index;\r
 \r
   if (mProviderDb != NULL) {\r
     //\r
@@ -2658,8 +2658,8 @@ InitProviderInfo (
   // Get provider infomation.\r
   //\r
   mProviderDb = AllocateZeroPool (\r
-                  sizeof (CREDENTIAL_PROVIDER_INFO) - \r
-                  sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *) + \r
+                  sizeof (CREDENTIAL_PROVIDER_INFO) -\r
+                  sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *) +\r
                   HandleCount * sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *)\r
                   );\r
   if (mProviderDb == NULL) {\r
@@ -2818,7 +2818,7 @@ InitFormBrowser (
 \r
   CallbackInfo->FormBrowser2  = FormBrowser2;\r
   CallbackInfo->DriverHandle  = NULL;\r
-  \r
+\r
   //\r
   // Install Device Path Protocol and Config Access protocol to driver handle.\r
   //\r
@@ -2892,7 +2892,7 @@ IdentifyAutoLogonUser (
     FreePool (Info);\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Find user with the specified user ID.\r
   //\r
@@ -2911,7 +2911,7 @@ IdentifyAutoLogonUser (
     //\r
     return EFI_NOT_READY;\r
   }\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -2920,22 +2920,22 @@ IdentifyAutoLogonUser (
   Check whether the given console is ready.\r
 \r
   @param[in]   ProtocolGuid   Points to the protocol guid of sonsole .\r
-  \r
+\r
   @retval TRUE     The given console is ready.\r
   @retval FALSE    The given console is not ready.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckConsole (\r
-  EFI_GUID                     *ProtocolGuid  \r
+  EFI_GUID                     *ProtocolGuid\r
   )\r
 {\r
   EFI_STATUS                   Status;\r
   UINTN                        HandleCount;\r
   EFI_HANDLE                   *HandleBuf;\r
-  UINTN                        Index; \r
+  UINTN                        Index;\r
   EFI_DEVICE_PATH_PROTOCOL     *DevicePath;\r
-  \r
+\r
   //\r
   // Try to find all the handle driver.\r
   //\r
@@ -2959,7 +2959,7 @@ CheckConsole (
       return TRUE;\r
     }\r
   }\r
-  FreePool (HandleBuf);  \r
+  FreePool (HandleBuf);\r
   return FALSE;\r
 }\r
 \r
@@ -2969,7 +2969,7 @@ CheckConsole (
 \r
   @retval TRUE     The console is ready.\r
   @retval FALSE    The console is not ready.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 IsConsoleReady (\r
@@ -2985,7 +2985,7 @@ IsConsoleReady (
     return FALSE;\r
     }\r
   }\r
-  \r
+\r
   return TRUE;\r
 }\r
 \r
@@ -3041,7 +3041,7 @@ IdentifyUser (
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Find and login the default & AutoLogon user.\r
   //\r
@@ -3062,7 +3062,7 @@ IdentifyUser (
       }\r
     }\r
   }\r
-  \r
+\r
   if (!IsConsoleReady ()) {\r
     //\r
     // The console is still not ready for user selection.\r
@@ -3082,20 +3082,20 @@ IdentifyUser (
                                  NULL,\r
                                  NULL\r
                                  );\r
-  \r
+\r
   if (mIdentified) {\r
     *User = (USER_PROFILE_ENTRY *) mCurrentUser;\r
     UpdateUserInfo (*User);\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   return EFI_ACCESS_DENIED;\r
 }\r
 \r
 \r
 /**\r
   An empty function to pass error checking of CreateEventEx ().\r
\r
+\r
   @param  Event         Event whose notification function is being invoked.\r
   @param  Context       Pointer to the notification function's context,\r
                         which is implementation-dependent.\r
@@ -3140,19 +3140,19 @@ SignalEventUserProfileChanged (
 /**\r
   Create a new user profile.\r
 \r
-  This function creates a new user profile with only a new user identifier attached and returns \r
+  This function creates a new user profile with only a new user identifier attached and returns\r
   its handle. The user profile is non-volatile, but the handle User can change across reboots.\r
 \r
   @param[in]  This               Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[out] User               On return, points to the new user profile handle. \r
+  @param[out] User               On return, points to the new user profile handle.\r
                                  The user profile handle is unique only during this boot.\r
\r
+\r
   @retval EFI_SUCCESS            User profile was successfully created.\r
-  @retval EFI_ACCESS_DENIED      Current user does not have sufficient permissions to create a \r
+  @retval EFI_ACCESS_DENIED      Current user does not have sufficient permissions to create a\r
                                  user profile.\r
   @retval EFI_UNSUPPORTED        Creation of new user profiles is not supported.\r
   @retval EFI_INVALID_PARAMETER  The User parameter is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3175,7 +3175,7 @@ UserProfileCreate (
       return EFI_ACCESS_DENIED;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Create new user profile\r
   //\r
@@ -3191,14 +3191,14 @@ UserProfileCreate (
   Delete an existing user profile.\r
 \r
   @param[in] This                Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in] User                User profile handle. \r
+  @param[in] User                User profile handle.\r
 \r
   @retval EFI_SUCCESS            User profile was successfully deleted.\r
   @retval EFI_ACCESS_DENIED      Current user does not have sufficient permissions to delete a user\r
                                  profile or there is only one user profile.\r
   @retval EFI_UNSUPPORTED        Deletion of new user profiles is not supported.\r
   @retval EFI_INVALID_PARAMETER  User does not refer to a valid user profile.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3212,14 +3212,14 @@ UserProfileDelete (
   if (This == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check the right of the current user.\r
   //\r
   if (!CheckCurrentUserAccessRight (EFI_USER_INFO_ACCESS_MANAGE)) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
-  \r
+\r
   //\r
   // Delete user profile.\r
   //\r
@@ -3238,16 +3238,16 @@ UserProfileDelete (
 /**\r
   Enumerate all of the enrolled users on the platform.\r
 \r
-  This function returns the next enrolled user profile. To retrieve the first user profile handle,  \r
-  point User at a NULL. Each subsequent call will retrieve another user profile handle until there \r
-  are no more, at which point User will point to NULL. \r
+  This function returns the next enrolled user profile. To retrieve the first user profile handle,\r
+  point User at a NULL. Each subsequent call will retrieve another user profile handle until there\r
+  are no more, at which point User will point to NULL.\r
 \r
   @param[in]      This           Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in, out] User           On entry, points to the previous user profile handle or NULL to \r
+  @param[in, out] User           On entry, points to the previous user profile handle or NULL to\r
                                  start enumeration. On exit, points to the next user profile handle\r
                                  or NULL if there are no more user profiles.\r
 \r
-  @retval EFI_SUCCESS            Next enrolled user profile successfully returned. \r
+  @retval EFI_SUCCESS            Next enrolled user profile successfully returned.\r
   @retval EFI_ACCESS_DENIED      Next enrolled user profile was not successfully returned.\r
   @retval EFI_INVALID_PARAMETER  The User parameter is NULL.\r
 **/\r
@@ -3263,7 +3263,7 @@ UserProfileGetNext (
   if ((This == NULL) || (User == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Status = FindUserProfile ((USER_PROFILE_ENTRY **) User, TRUE, NULL);\r
   if (EFI_ERROR (Status)) {\r
     return EFI_ACCESS_DENIED;\r
@@ -3278,9 +3278,9 @@ UserProfileGetNext (
   @param[in]  This               Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
   @param[out] CurrentUser        On return, points to the current user profile handle.\r
 \r
-  @retval EFI_SUCCESS            Current user profile handle returned successfully. \r
+  @retval EFI_SUCCESS            Current user profile handle returned successfully.\r
   @retval EFI_INVALID_PARAMETER  The CurrentUser parameter is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3288,7 +3288,7 @@ UserProfileCurrent (
   IN CONST  EFI_USER_MANAGER_PROTOCOL           *This,\r
   OUT       EFI_USER_PROFILE_HANDLE             *CurrentUser\r
   )\r
-{  \r
+{\r
   //\r
   // Get current user profile.\r
   //\r
@@ -3306,8 +3306,8 @@ UserProfileCurrent (
 \r
   Identify the user and, if authenticated, returns the user handle and changes the current\r
   user profile. All user information marked as private in a previously selected profile\r
-  is no longer available for inspection. \r
-  Whenever the current user profile is changed then the an event with the GUID \r
+  is no longer available for inspection.\r
+  Whenever the current user profile is changed then the an event with the GUID\r
   EFI_EVENT_GROUP_USER_PROFILE_CHANGED is signaled.\r
 \r
   @param[in]  This               Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
@@ -3317,7 +3317,7 @@ UserProfileCurrent (
   @retval EFI_SUCCESS            User was successfully identified.\r
   @retval EFI_ACCESS_DENIED      User was not successfully identified.\r
   @retval EFI_INVALID_PARAMETER  The User parameter is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3336,7 +3336,7 @@ UserProfileIdentify (
     *User = mCurrentUser;\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Identify user\r
   //\r
@@ -3344,7 +3344,7 @@ UserProfileIdentify (
   if (EFI_ERROR (Status)) {\r
     return EFI_ACCESS_DENIED;\r
   }\r
-  \r
+\r
   //\r
   // Publish the user info into the EFI system configuration table.\r
   //\r
@@ -3361,35 +3361,35 @@ UserProfileIdentify (
   Find a user using a user information record.\r
 \r
   This function searches all user profiles for the specified user information record.\r
-  The search starts with the user information record handle following UserInfo and \r
+  The search starts with the user information record handle following UserInfo and\r
   continues until either the information is found or there are no more user profiles.\r
   A match occurs when the Info.InfoType field matches the user information record\r
   type and the user information record data matches the portion of Info.\r
 \r
   @param[in]      This           Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in, out] User           On entry, points to the previously returned user profile \r
+  @param[in, out] User           On entry, points to the previously returned user profile\r
                                  handle, or NULL to start searching with the first user profile.\r
                                  On return, points to the user profile handle, or NULL if not\r
                                  found.\r
   @param[in, out] UserInfo       On entry, points to the previously returned user information\r
-                                 handle, or NULL to start searching with the first. On return, \r
+                                 handle, or NULL to start searching with the first. On return,\r
                                  points to the user information handle of the user information\r
-                                 record, or NULL if not found. Can be NULL, in which case only \r
-                                 one user information record per user can be returned. \r
-  @param[in]      Info           Points to the buffer containing the user information to be \r
-                                 compared to the user information record. If the user information \r
-                                 record data is empty, then only the user information record type \r
-                                 is compared. If InfoSize is 0, then the user information record \r
+                                 record, or NULL if not found. Can be NULL, in which case only\r
+                                 one user information record per user can be returned.\r
+  @param[in]      Info           Points to the buffer containing the user information to be\r
+                                 compared to the user information record. If the user information\r
+                                 record data is empty, then only the user information record type\r
+                                 is compared. If InfoSize is 0, then the user information record\r
                                  must be empty.\r
 \r
-  @param[in]      InfoSize       The size of Info, in bytes. \r
+  @param[in]      InfoSize       The size of Info, in bytes.\r
 \r
   @retval EFI_SUCCESS            User information was found. User points to the user profile\r
                                  handle, and UserInfo points to the user information handle.\r
-  @retval EFI_NOT_FOUND          User information was not found. User points to NULL, and  \r
+  @retval EFI_NOT_FOUND          User information was not found. User points to NULL, and\r
                                  UserInfo points to NULL.\r
-  @retval EFI_INVALID_PARAMETER  User is NULL. Or Info is NULL.                           \r
-  \r
+  @retval EFI_INVALID_PARAMETER  User is NULL. Or Info is NULL.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3420,8 +3420,8 @@ UserProfileFind (
       return EFI_INVALID_PARAMETER;\r
     }\r
   }\r
-  Size = Info->InfoSize;  \r
-  \r
+  Size = Info->InfoSize;\r
+\r
   //\r
   // Find user profile accdoring to user information.\r
   //\r
@@ -3438,7 +3438,7 @@ UserProfileFind (
     }\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -3446,31 +3446,31 @@ UserProfileFind (
 /**\r
   Return information attached to the user.\r
 \r
-  This function returns user information. The format of the information is described in User \r
-  Information. The function may return EFI_ACCESS_DENIED if the information is marked private \r
-  and the handle specified by User is not the current user profile. The function may return \r
-  EFI_ACCESS_DENIED if the information is marked protected and the information is associated \r
+  This function returns user information. The format of the information is described in User\r
+  Information. The function may return EFI_ACCESS_DENIED if the information is marked private\r
+  and the handle specified by User is not the current user profile. The function may return\r
+  EFI_ACCESS_DENIED if the information is marked protected and the information is associated\r
   with a credential provider for which the user has not been authenticated.\r
 \r
   @param[in]      This           Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in]      User           Handle of the user whose profile will be retrieved. \r
-  @param[in]      UserInfo       Handle of the user information data record.   \r
-  @param[out]     Info           On entry, points to a buffer of at least *InfoSize bytes. On exit,  \r
-                                 holds the user information. If the buffer is too small to hold the  \r
-                                 information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is \r
-                                 updated to contain the number of bytes actually required. \r
-  @param[in, out] InfoSize       On entry, points to the size of Info. On return, points to the size  \r
-                                 of the user information. \r
+  @param[in]      User           Handle of the user whose profile will be retrieved.\r
+  @param[in]      UserInfo       Handle of the user information data record.\r
+  @param[out]     Info           On entry, points to a buffer of at least *InfoSize bytes. On exit,\r
+                                 holds the user information. If the buffer is too small to hold the\r
+                                 information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is\r
+                                 updated to contain the number of bytes actually required.\r
+  @param[in, out] InfoSize       On entry, points to the size of Info. On return, points to the size\r
+                                 of the user information.\r
 \r
   @retval EFI_SUCCESS            Information returned successfully.\r
-  @retval EFI_ACCESS_DENIED      The information about the specified user cannot be accessed by the \r
+  @retval EFI_ACCESS_DENIED      The information about the specified user cannot be accessed by the\r
                                  current user.\r
-  @retval EFI_BUFFER_TOO_SMALL   The number of bytes specified by *InfoSize is too small to hold the \r
+  @retval EFI_BUFFER_TOO_SMALL   The number of bytes specified by *InfoSize is too small to hold the\r
                                  returned data. The actual size required is returned in *InfoSize.\r
-  @retval EFI_NOT_FOUND          User does not refer to a valid user profile or UserInfo does not refer \r
+  @retval EFI_NOT_FOUND          User does not refer to a valid user profile or UserInfo does not refer\r
                                  to a valid user info handle.\r
   @retval EFI_INVALID_PARAMETER  Info is NULL or InfoSize is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3491,11 +3491,11 @@ UserProfileGetInfo (
   if ((*InfoSize != 0) && (Info == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if ((User == NULL) || (UserInfo == NULL)) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   Status = GetUserInfo (User, UserInfo, Info, InfoSize, TRUE);\r
   if (EFI_ERROR (Status)) {\r
     if (Status == EFI_BUFFER_TOO_SMALL) {\r
@@ -3510,32 +3510,32 @@ UserProfileGetInfo (
 /**\r
   Add or update user information.\r
 \r
-  This function changes user information.  If NULL is pointed to by UserInfo, then a new user \r
-  information record is created and its handle is returned in UserInfo. Otherwise, the existing  \r
+  This function changes user information.  If NULL is pointed to by UserInfo, then a new user\r
+  information record is created and its handle is returned in UserInfo. Otherwise, the existing\r
   one is replaced.\r
-  If EFI_USER_INFO_IDENITTY_POLICY_RECORD is changed, it is the caller's responsibility to keep \r
+  If EFI_USER_INFO_IDENITTY_POLICY_RECORD is changed, it is the caller's responsibility to keep\r
   it to be synced with the information on credential providers.\r
-  If EFI_USER_INFO_EXCLUSIVE is specified in Info and a user information record of the same \r
+  If EFI_USER_INFO_EXCLUSIVE is specified in Info and a user information record of the same\r
   type already exists in the user profile, then EFI_ACCESS_DENIED will be returned and UserInfo\r
   will point to the handle of the existing record.\r
 \r
   @param[in]      This            Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in]      User            Handle of the user whose profile will be retrieved. \r
-  @param[in, out] UserInfo        Handle of the user information data record.   \r
-  @param[in]      Info            On entry, points to a buffer of at least *InfoSize bytes. On exit, \r
-                                  holds the user information. If the buffer is too small to hold the \r
-                                  information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is \r
-                                  updated to contain the number of bytes actually required. \r
-  @param[in]      InfoSize        On entry, points to the size of Info. On return, points to the size \r
-                                  of the user information. \r
+  @param[in]      User            Handle of the user whose profile will be retrieved.\r
+  @param[in, out] UserInfo        Handle of the user information data record.\r
+  @param[in]      Info            On entry, points to a buffer of at least *InfoSize bytes. On exit,\r
+                                  holds the user information. If the buffer is too small to hold the\r
+                                  information, then EFI_BUFFER_TOO_SMALL is returned and InfoSize is\r
+                                  updated to contain the number of bytes actually required.\r
+  @param[in]      InfoSize        On entry, points to the size of Info. On return, points to the size\r
+                                  of the user information.\r
 \r
   @retval EFI_SUCCESS             Information returned successfully.\r
   @retval EFI_ACCESS_DENIED       The record is exclusive.\r
-  @retval EFI_SECURITY_VIOLATION  The current user does not have permission to change the specified \r
+  @retval EFI_SECURITY_VIOLATION  The current user does not have permission to change the specified\r
                                   user profile or user information record.\r
-  @retval EFI_NOT_FOUND           User does not refer to a valid user profile or UserInfo does not  \r
+  @retval EFI_NOT_FOUND           User does not refer to a valid user profile or UserInfo does not\r
                                   refer to a valid user info handle.\r
-  @retval EFI_INVALID_PARAMETER   UserInfo is NULL or Info is NULL. \r
+  @retval EFI_INVALID_PARAMETER   UserInfo is NULL or Info is NULL.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3552,7 +3552,7 @@ UserProfileSetInfo (
   if ((This == NULL) || (User == NULL) || (UserInfo == NULL) || (Info == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check the right of the current user.\r
   //\r
@@ -3564,7 +3564,7 @@ UserProfileSetInfo (
         //\r
         return EFI_SECURITY_VIOLATION;\r
       }\r
-      \r
+\r
       if (!CheckCurrentUserAccessRight (EFI_USER_INFO_ACCESS_ENROLL_OTHERS)) {\r
         //\r
         // Can't add info into other profiles.\r
@@ -3584,14 +3584,14 @@ UserProfileSetInfo (
       }\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Modify user information.\r
   //\r
   Status = ModifyUserInfo (User, (EFI_USER_INFO **) UserInfo, Info, InfoSize);\r
   if (EFI_ERROR (Status)) {\r
     if (Status == EFI_ACCESS_DENIED) {\r
-      return EFI_ACCESS_DENIED;      \r
+      return EFI_ACCESS_DENIED;\r
     }\r
     return EFI_SECURITY_VIOLATION;\r
   }\r
@@ -3602,25 +3602,25 @@ UserProfileSetInfo (
 /**\r
   Called by credential provider to notify of information change.\r
 \r
-  This function allows the credential provider to notify the User Identity Manager when user status  \r
+  This function allows the credential provider to notify the User Identity Manager when user status\r
   has changed.\r
-  If the User Identity Manager doesn't support asynchronous changes in credentials, then this function \r
-  should return EFI_UNSUPPORTED. \r
-  If current user does not exist, and the credential provider can identify a user, then make the user \r
+  If the User Identity Manager doesn't support asynchronous changes in credentials, then this function\r
+  should return EFI_UNSUPPORTED.\r
+  If current user does not exist, and the credential provider can identify a user, then make the user\r
   to be current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r
-  If current user already exists, and the credential provider can identify another user, then switch \r
+  If current user already exists, and the credential provider can identify another user, then switch\r
   current user to the newly identified user, and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r
-  If current user was identified by this credential provider and now the credential provider cannot identify \r
+  If current user was identified by this credential provider and now the credential provider cannot identify\r
   current user, then logout current user and signal the EFI_EVENT_GROUP_USER_PROFILE_CHANGED event.\r
 \r
   @param[in] This          Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in] Changed       Handle on which is installed an instance of the EFI_USER_CREDENTIAL2_PROTOCOL \r
+  @param[in] Changed       Handle on which is installed an instance of the EFI_USER_CREDENTIAL2_PROTOCOL\r
                            where the user has changed.\r
 \r
   @retval EFI_SUCCESS      The User Identity Manager has handled the notification.\r
   @retval EFI_NOT_READY    The function was called while the specified credential provider was not selected.\r
   @retval EFI_UNSUPPORTED  The User Identity Manager doesn't support asynchronous notifications.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3628,7 +3628,7 @@ UserProfileNotify (
   IN CONST  EFI_USER_MANAGER_PROTOCOL           *This,\r
   IN        EFI_HANDLE                          Changed\r
   )\r
-{    \r
+{\r
   return EFI_UNSUPPORTED;\r
 }\r
 \r
@@ -3644,8 +3644,8 @@ UserProfileNotify (
 \r
   @retval EFI_SUCCESS        User information deleted successfully.\r
   @retval EFI_NOT_FOUND      User information record UserInfo does not exist in the user profile.\r
-  @retval EFI_ACCESS_DENIED  The current user does not have permission to delete this user information. \r
-  \r
+  @retval EFI_ACCESS_DENIED  The current user does not have permission to delete this user information.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3660,7 +3660,7 @@ UserProfileDeleteInfo (
   if (This == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Check the right of the current user.\r
   //\r
@@ -3669,7 +3669,7 @@ UserProfileDeleteInfo (
       return EFI_ACCESS_DENIED;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Delete user information.\r
   //\r
@@ -3679,7 +3679,7 @@ UserProfileDeleteInfo (
       return EFI_NOT_FOUND;\r
     }\r
     return EFI_ACCESS_DENIED;\r
-  } \r
+  }\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -3687,10 +3687,10 @@ UserProfileDeleteInfo (
 /**\r
   Enumerate user information of all the enrolled users on the platform.\r
 \r
-  This function returns the next user information record. To retrieve the first user   \r
-  information record handle, point UserInfo at a NULL. Each subsequent call will retrieve \r
-  another user information record handle until there are no more, at which point UserInfo \r
-  will point to NULL. \r
+  This function returns the next user information record. To retrieve the first user\r
+  information record handle, point UserInfo at a NULL. Each subsequent call will retrieve\r
+  another user information record handle until there are no more, at which point UserInfo\r
+  will point to NULL.\r
 \r
   @param[in]      This           Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
   @param[in]      User           Handle of the user whose information will be deleted.\r
@@ -3699,7 +3699,7 @@ UserProfileDeleteInfo (
   @retval EFI_SUCCESS            User information returned.\r
   @retval EFI_NOT_FOUND          No more user information found.\r
   @retval EFI_INVALID_PARAMETER  UserInfo is NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -3757,7 +3757,7 @@ UserIdentifyManagerInit (
                   EFI_NATIVE_INTERFACE,\r
                   &gUserIdentifyManager\r
                   );\r
-  ASSERT_EFI_ERROR (Status);  \r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   LoadDeferredImageInit (ImageHandle);\r
   return EFI_SUCCESS;\r
index fab06057286ba4a8157c28c3a3e204450047acb4..1c449b0128f4cf69e93ad97302662b86d86b0a8a 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for User identify Manager driver.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -239,34 +239,34 @@ UserProfileIdentify (
   Find a user using a user information record.\r
 \r
   This function searches all user profiles for the specified user information record.\r
-  The search starts with the user information record handle following UserInfo and \r
+  The search starts with the user information record handle following UserInfo and\r
   continues until either the information is found or there are no more user profiles.\r
   A match occurs when the Info.InfoType field matches the user information record\r
-  type and the user information record data matches the portion of Info passed the \r
+  type and the user information record data matches the portion of Info passed the\r
   EFI_USER_INFO header.\r
 \r
   @param[in]      This     Points to this instance of the EFI_USER_MANAGER_PROTOCOL.\r
-  @param[in, out] User     On entry, points to the previously returned user profile \r
+  @param[in, out] User     On entry, points to the previously returned user profile\r
                            handle, or NULL to start searching with the first user profile.\r
                            On return, points to the user profile handle, or NULL if not\r
                            found.\r
   @param[in, out] UserInfo On entry, points to the previously returned user information\r
-                           handle, or NULL to start searching with the first. On return, \r
+                           handle, or NULL to start searching with the first. On return,\r
                            points to the user information handle of the user information\r
-                           record, or NULL if not found. Can be NULL, in which case only \r
-                           one user information record per user can be returned. \r
-  @param[in]      Info     Points to the buffer containing the user information to be \r
-                           compared to the user information record. If NULL, then only \r
-                           the user information record type is compared. If InfoSize is 0, \r
+                           record, or NULL if not found. Can be NULL, in which case only\r
+                           one user information record per user can be returned.\r
+  @param[in]      Info     Points to the buffer containing the user information to be\r
+                           compared to the user information record. If NULL, then only\r
+                           the user information record type is compared. If InfoSize is 0,\r
                            then the user information record must be empty.\r
 \r
-  @param[in]      InfoSize The size of Info, in bytes. \r
+  @param[in]      InfoSize The size of Info, in bytes.\r
 \r
   @retval EFI_SUCCESS      User information was found. User points to the user profile handle,\r
                            and UserInfo points to the user information handle.\r
-  @retval EFI_NOT_FOUND    User information was not found. User points to NULL and UserInfo \r
+  @retval EFI_NOT_FOUND    User information was not found. User points to NULL and UserInfo\r
                            points to NULL.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -409,5 +409,5 @@ UserProfileGetNextInfo (
   IN        EFI_USER_PROFILE_HANDLE             User,\r
   IN OUT    EFI_USER_INFO_HANDLE                *UserInfo\r
   );\r
-  \r
+\r
 #endif\r
index b08ac46437f5d5bf97b783766f21502a97fc2fb9..4e07ddd309f3fae4711389ac2554bdfe2b8d5165 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Data structure used by the user identify manager driver.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index ac23818660a6ebc380513d4f27467299373cbc1c..27e8ba19adfc4df5669c2eedba01b86f1466d3e1 100644 (file)
@@ -2,8 +2,8 @@
 #  Produces user manager protocol\r
 #\r
 #  This module manages user information and produces user manager protocol.\r
-# \r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -48,7 +48,7 @@
 [Guids]\r
   gEfiIfrTianoGuid                              ## SOMETIMES_CONSUMES  ## GUID\r
   gEfiEventUserProfileChangedGuid               ## SOMETIMES_PRODUCES  ## Event\r
-  \r
+\r
   ## SOMETIMES_PRODUCES                         ## Variable:L"Userxxxx"\r
   ## SOMETIMES_CONSUMES                         ## Variable:L"Userxxxx"\r
   ## CONSUMES                                   ## HII\r
   gEfiSimpleTextInputExProtocolGuid             ## SOMETIMES_CONSUMES\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
   gEfiDevicePathProtocolGuid                    ## PRODUCES\r
-  \r
+\r
   ## PRODUCES\r
   ## SOMETIMES_PRODUCES                         ## SystemTable\r
-  gEfiUserManagerProtocolGuid                   \r
+  gEfiUserManagerProtocolGuid\r
 \r
 [Depex]\r
-  gEfiHiiDatabaseProtocolGuid   AND \r
-  gEfiHiiStringProtocolGuid     AND \r
-  gEfiFormBrowser2ProtocolGuid \r
+  gEfiHiiDatabaseProtocolGuid   AND\r
+  gEfiHiiStringProtocolGuid     AND\r
+  gEfiFormBrowser2ProtocolGuid\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   UserIdentifyManagerExtra.uni\r
-  
\ No newline at end of file
+\r
index b0418b6e303ed72e700cd12eff52daa2e9b623dc..8b7cba7b3291f3d3c36427a100e29097fa3c9362 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // UserIdentifyManager Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "User Identify Manager"\r
 \r
 \r
index 8ac0cdfbec6c9c82f0946294f88ac333bb856543..fcbf5005cd856ba635f901921be6b4414b505f56 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   String definitions for the User Identify Manager driver.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,12 +16,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #langdef fr-FR "Francais"\r
 \r
 #string STR_TITLE                                 #language en-US  "User Identity Manager"\r
-                                                  #language fr-FR  "User Identity Manager(French)" \r
+                                                  #language fr-FR  "User Identity Manager(French)"\r
 #string STR_USER_SELECT                           #language en-US  "User Selection"\r
                                                   #language fr-FR  "User Selection(French)"\r
 #string STR_PROVIDER_SELECT                       #language en-US  "Provider Selection"\r
-                                                  #language fr-FR  "User Selection(French)" \r
+                                                  #language fr-FR  "User Selection(French)"\r
 #string STR_NULL_STRING                           #language en-US  ""\r
                                                   #language fr-FR  ""\r
 \r
-                                                                                                                                                                                                       \r
+\r
index 5b4171ddec1bca10281c91aadbbfab550827b6d8..56d3b1df981927caa71f9b49d3135d924d7eca51 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions for access policy modification.\r
-    \r
-Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "UserProfileManager.h"\r
 \r
 /**\r
-  Collect all the access policy data to mUserInfo.AccessPolicy, \r
+  Collect all the access policy data to mUserInfo.AccessPolicy,\r
   and save it to user profile.\r
 \r
 **/\r
@@ -38,7 +38,7 @@ SaveAccessPolicy (
   mUserInfo.AccessPolicyLen       = 0;\r
   mUserInfo.AccessPolicyModified  = TRUE;\r
   OffSet                          = 0;\r
-  \r
+\r
   //\r
   // Save access right.\r
   //\r
@@ -51,7 +51,7 @@ SaveAccessPolicy (
   Control.Size = (UINT32) Size;\r
   CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
   OffSet += sizeof (Control);\r
-  \r
+\r
   //\r
   // Save access setup.\r
   //\r
@@ -61,10 +61,10 @@ SaveAccessPolicy (
   }\r
 \r
   Control.Type = EFI_USER_INFO_ACCESS_SETUP;\r
-  Control.Size = (UINT32) Size;  \r
+  Control.Size = (UINT32) Size;\r
   CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
   OffSet += sizeof (Control);\r
-  \r
+\r
   if (mAccessInfo.AccessSetup == ACCESS_SETUP_NORMAL) {\r
     CopyGuid ((EFI_GUID *) (mUserInfo.AccessPolicy + OffSet), &gEfiUserInfoAccessSetupNormalGuid);\r
   } else if (mAccessInfo.AccessSetup == ACCESS_SETUP_RESTRICTED) {\r
@@ -73,7 +73,7 @@ SaveAccessPolicy (
     CopyGuid ((EFI_GUID *) (mUserInfo.AccessPolicy + OffSet), &gEfiUserInfoAccessSetupAdminGuid);\r
   }\r
   OffSet += sizeof (EFI_GUID);\r
-  \r
+\r
   //\r
   // Save access of boot order.\r
   //\r
@@ -83,13 +83,13 @@ SaveAccessPolicy (
   }\r
 \r
   Control.Type = EFI_USER_INFO_ACCESS_BOOT_ORDER;\r
-  Control.Size = (UINT32) Size;  \r
+  Control.Size = (UINT32) Size;\r
   CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
   OffSet += sizeof (Control);\r
 \r
   CopyMem ((UINT8 *) (mUserInfo.AccessPolicy + OffSet), &mAccessInfo.AccessBootOrder, sizeof (UINT32));\r
   OffSet += sizeof (UINT32);\r
-  \r
+\r
   //\r
   // Save permit load.\r
   //\r
@@ -100,14 +100,14 @@ SaveAccessPolicy (
     }\r
 \r
     Control.Type = EFI_USER_INFO_ACCESS_PERMIT_LOAD;\r
-    Control.Size = (UINT32) Size;  \r
+    Control.Size = (UINT32) Size;\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
     OffSet += sizeof (Control);\r
-  \r
+\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.LoadPermit, mAccessInfo.LoadPermitLen);\r
     OffSet += mAccessInfo.LoadPermitLen;\r
   }\r
-  \r
+\r
   //\r
   // Save forbid load.\r
   //\r
@@ -118,14 +118,14 @@ SaveAccessPolicy (
     }\r
 \r
     Control.Type = EFI_USER_INFO_ACCESS_FORBID_LOAD;\r
-    Control.Size = (UINT32) Size;  \r
+    Control.Size = (UINT32) Size;\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
     OffSet += sizeof (Control);\r
-    \r
+\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.LoadForbid, mAccessInfo.LoadForbidLen);\r
     OffSet += mAccessInfo.LoadForbidLen;\r
   }\r
-  \r
+\r
   //\r
   // Save permit connect.\r
   //\r
@@ -136,14 +136,14 @@ SaveAccessPolicy (
     }\r
 \r
     Control.Type = EFI_USER_INFO_ACCESS_PERMIT_CONNECT;\r
-    Control.Size = (UINT32) Size;  \r
+    Control.Size = (UINT32) Size;\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
     OffSet += sizeof (Control);\r
-    \r
+\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.ConnectPermit, mAccessInfo.ConnectPermitLen);\r
     OffSet += mAccessInfo.ConnectPermitLen;\r
   }\r
-  \r
+\r
   //\r
   // Save forbid connect.\r
   //\r
@@ -154,10 +154,10 @@ SaveAccessPolicy (
     }\r
 \r
     Control.Type = EFI_USER_INFO_ACCESS_FORBID_CONNECT;\r
-    Control.Size = (UINT32) Size;  \r
+    Control.Size = (UINT32) Size;\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, &Control, sizeof (Control));\r
     OffSet += sizeof (Control);\r
-    \r
+\r
     CopyMem (mUserInfo.AccessPolicy + OffSet, mAccessInfo.ConnectForbid, mAccessInfo.ConnectForbidLen);\r
     OffSet += mAccessInfo.ConnectForbidLen;\r
   }\r
@@ -264,11 +264,11 @@ AddDevicePath (
 \r
 \r
 /**\r
-  Check whether the DevicePath is in the device path forbid list \r
+  Check whether the DevicePath is in the device path forbid list\r
   (mAccessInfo.LoadForbid).\r
 \r
   @param[in]  DevicePath           Points to device path.\r
-  \r
+\r
   @retval TRUE     The DevicePath is in the device path forbid list.\r
   @retval FALSE    The DevicePath is not in the device path forbid list.\r
 \r
@@ -330,10 +330,10 @@ DisplayLoadPermit(
   //\r
   OrderSize = 0;\r
   Status    = gRT->GetVariable (\r
-                     L"DriverOrder", \r
-                     &gEfiGlobalVariableGuid, \r
-                     NULL, \r
-                     &OrderSize, \r
+                     L"DriverOrder",\r
+                     &gEfiGlobalVariableGuid,\r
+                     NULL,\r
+                     &OrderSize,\r
                      NULL\r
                      );\r
   if (Status != EFI_BUFFER_TOO_SMALL) {\r
@@ -346,16 +346,16 @@ DisplayLoadPermit(
   }\r
 \r
   Status = gRT->GetVariable (\r
-                  L"DriverOrder", \r
-                  &gEfiGlobalVariableGuid, \r
-                  NULL, \r
-                  &OrderSize, \r
+                  L"DriverOrder",\r
+                  &gEfiGlobalVariableGuid,\r
+                  NULL,\r
+                  &OrderSize,\r
                   Order\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Initialize the container for dynamic opcodes.\r
   //\r
@@ -400,11 +400,11 @@ DisplayLoadPermit(
     if (Var == NULL) {\r
       continue;\r
     }\r
-    \r
+\r
     //\r
     // Check whether the driver is already forbidden.\r
     //\r
-    \r
+\r
     VarPtr = Var;\r
     //\r
     // Skip attribute.\r
@@ -545,7 +545,7 @@ DisplayConnectPermit (
   )\r
 {\r
   //\r
-  // Note: \r
+  // Note:\r
   // As no architect protocol/interface to be called in ConnectController()\r
   // to verify the device path, just add a place holder for permitted connect\r
   // device path.\r
@@ -563,7 +563,7 @@ DisplayConnectForbid (
   )\r
 {\r
   //\r
-  // Note: \r
+  // Note:\r
   // As no architect protocol/interface to be called in ConnectController()\r
   // to verify the device path, just add a place holder for forbidden connect\r
   // device path.\r
@@ -572,11 +572,11 @@ DisplayConnectForbid (
 \r
 \r
 /**\r
-  Delete the specified device path by DriverIndex from the forbid device path \r
+  Delete the specified device path by DriverIndex from the forbid device path\r
   list (mAccessInfo.LoadForbid).\r
 \r
   @param[in]  DriverIndex   The index of driver in forbidden device path list.\r
-  \r
+\r
 **/\r
 VOID\r
 DeleteFromForbidLoad (\r
@@ -598,7 +598,7 @@ DeleteFromForbidLoad (
     OffSet += DPSize;\r
     DriverIndex--;\r
   }\r
-  \r
+\r
   //\r
   // Specified device path found.\r
   //\r
@@ -608,8 +608,8 @@ DeleteFromForbidLoad (
     OffLen  = mAccessInfo.LoadForbidLen - OffSet - DPSize;\r
     if (OffLen > 0) {\r
       CopyMem (\r
-        mAccessInfo.LoadForbid + OffSet, \r
-        mAccessInfo.LoadForbid + OffSet + DPSize, \r
+        mAccessInfo.LoadForbid + OffSet,\r
+        mAccessInfo.LoadForbid + OffSet + DPSize,\r
         OffLen\r
         );\r
     }\r
@@ -619,11 +619,11 @@ DeleteFromForbidLoad (
 \r
 \r
 /**\r
-  Add the specified device path by DriverIndex to the forbid device path \r
+  Add the specified device path by DriverIndex to the forbid device path\r
   list (mAccessInfo.LoadForbid).\r
 \r
   @param[in]  DriverIndex   The index of driver saved in driver options.\r
-  \r
+\r
 **/\r
 VOID\r
 AddToForbidLoad (\r
@@ -645,11 +645,11 @@ AddToForbidLoad (
   if (Var == NULL) {\r
     return;\r
   }\r
-  \r
+\r
   //\r
   // Save forbid load driver.\r
   //\r
-  \r
+\r
   VarPtr = Var;\r
   //\r
   // Skip attribute.\r
index 7c58329591adcd0d49e084e643846319a2d98b66..602c4a8397c1ffcc79262717c682e965e859e55b 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions for identification policy modification.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   provider can't appear twice in one identity policy.\r
 \r
   @param[in] NewGuid       Points to the credential provider guid.\r
-  \r
+\r
   @retval TRUE     The NewGuid was found in the identity policy.\r
   @retval FALSE    The NewGuid was not found.\r
 \r
@@ -52,7 +52,7 @@ ProviderAlreadyInPolicy (
     }\r
     Offset += Identity->Length;\r
   }\r
-  \r
+\r
   return FALSE;\r
 }\r
 \r
@@ -70,12 +70,12 @@ ProviderAlreadyInPolicy (
 EFI_STATUS\r
 EnrollUserOnProvider (\r
   IN  EFI_USER_INFO_IDENTITY_POLICY              *Identity,\r
-  IN  EFI_USER_PROFILE_HANDLE                    User \r
+  IN  EFI_USER_PROFILE_HANDLE                    User\r
   )\r
 {\r
   UINTN                          Index;\r
   EFI_USER_CREDENTIAL2_PROTOCOL  *UserCredential;\r
-  \r
+\r
   //\r
   // Find the specified credential provider.\r
   //\r
@@ -86,7 +86,7 @@ EnrollUserOnProvider (
     }\r
   }\r
 \r
-  return EFI_NOT_FOUND;  \r
+  return EFI_NOT_FOUND;\r
 }\r
 \r
 \r
@@ -103,12 +103,12 @@ EnrollUserOnProvider (
 EFI_STATUS\r
 DeleteUserOnProvider (\r
   IN  EFI_USER_INFO_IDENTITY_POLICY              *Identity,\r
-  IN  EFI_USER_PROFILE_HANDLE                    User \r
+  IN  EFI_USER_PROFILE_HANDLE                    User\r
   )\r
 {\r
   UINTN                          Index;\r
   EFI_USER_CREDENTIAL2_PROTOCOL  *UserCredential;\r
-  \r
+\r
   //\r
   // Find the specified credential provider.\r
   //\r
@@ -119,13 +119,13 @@ DeleteUserOnProvider (
     }\r
   }\r
 \r
-  return EFI_NOT_FOUND;  \r
+  return EFI_NOT_FOUND;\r
 }\r
 \r
 \r
 /**\r
   Delete User's credental from all the providers that exist in User's identity policy.\r
-  \r
+\r
   @param[in]  IdentityPolicy     Point to User's identity policy.\r
   @param[in]  IdentityPolicyLen  The length of the identity policy.\r
   @param[in]  User               Points to user profile.\r
@@ -135,7 +135,7 @@ VOID
 DeleteCredentialFromProviders (\r
   IN     UINT8                                *IdentityPolicy,\r
   IN     UINTN                                 IdentityPolicyLen,\r
-  IN     EFI_USER_PROFILE_HANDLE               User \r
+  IN     EFI_USER_PROFILE_HANDLE               User\r
   )\r
 {\r
   EFI_USER_INFO_IDENTITY_POLICY    *Identity;\r
@@ -158,7 +158,7 @@ DeleteCredentialFromProviders (
 \r
 /**\r
   Remove the provider specified by Offset from the new user identification record.\r
-  \r
+\r
   @param[in]  IdentityPolicy    Point to user identity item in new identification policy.\r
   @param[in]  Offset            The item offset in the new identification policy.\r
 \r
@@ -187,11 +187,11 @@ DeleteProviderFromPolicy (
   if ((Offset + IdentityPolicy->Length) != mUserInfo.NewIdentityPolicyLen) {\r
     //\r
     // This provider is not the last item in the identification policy, delete it and the connector.\r
-    //    \r
+    //\r
     RemainingLen = mUserInfo.NewIdentityPolicyLen - Offset - DeleteLen;\r
     CopyMem ((UINT8 *) IdentityPolicy, (UINT8 *) IdentityPolicy + DeleteLen, RemainingLen);\r
   }\r
-  mUserInfo.NewIdentityPolicyLen -= DeleteLen;  \r
+  mUserInfo.NewIdentityPolicyLen -= DeleteLen;\r
 }\r
 \r
 \r
@@ -201,7 +201,7 @@ DeleteProviderFromPolicy (
   It is invoked when 'add option' in UI is pressed.\r
 \r
   @param[in] NewGuid       Points to the credential provider guid.\r
-  \r
+\r
 **/\r
 VOID\r
 AddProviderToPolicy (\r
@@ -248,7 +248,7 @@ AddProviderToPolicy (
     NewPolicyInfoLen = mUserInfo.NewIdentityPolicyLen + Policy->Length;\r
     FreePool (mUserInfo.NewIdentityPolicy);\r
   }\r
-  \r
+\r
   //\r
   // Save credential provider.\r
   //\r
@@ -325,7 +325,7 @@ UpdateCredentialProvider (
 \r
   @retval TRUE     The policy is a valid identity policy.\r
   @retval FALSE    The policy is not a valid identity policy.\r
-  \r
+\r
 **/\r
 BOOLEAN\r
 CheckNewIdentityPolicy (\r
@@ -337,7 +337,7 @@ CheckNewIdentityPolicy (
   EFI_INPUT_KEY                 Key;\r
   UINTN                         Offset;\r
   UINT32                        OpCode;\r
-  \r
+\r
   //\r
   // Check policy expression.\r
   //\r
@@ -349,7 +349,7 @@ CheckNewIdentityPolicy (
     //\r
     Identity = (EFI_USER_INFO_IDENTITY_POLICY *) (PolicyInfo + Offset);\r
     switch (Identity->Type) {\r
-      \r
+\r
     case EFI_USER_INFO_IDENTITY_TRUE:\r
       break;\r
 \r
@@ -408,11 +408,11 @@ CheckNewIdentityPolicy (
 \r
 /**\r
   Save the identity policy and update UI with it.\r
-  \r
-  This function will verify the new identity policy, in current implementation, \r
+\r
+  This function will verify the new identity policy, in current implementation,\r
   the identity policy can be:  T, P & P & P & ..., P | P | P | ...\r
   Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or".\r
-  Other identity policies are not supported.  \r
+  Other identity policies are not supported.\r
 \r
 **/\r
 VOID\r
@@ -439,7 +439,7 @@ SaveIdentityPolicy (
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Update the informantion on credential provider.\r
   //\r
@@ -447,7 +447,7 @@ SaveIdentityPolicy (
   if (EFI_ERROR (Status)) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Save new identification policy.\r
   //\r
@@ -461,7 +461,7 @@ SaveIdentityPolicy (
 \r
   Status = mUserManager->SetInfo (mUserManager, mModifyUser, &UserInfo, Info, Info->InfoSize);\r
   FreePool (Info);\r
-   \r
+\r
   //\r
   // Update the mUserInfo.IdentityPolicy by mUserInfo.NewIdentityPolicy\r
   //\r
@@ -473,7 +473,7 @@ SaveIdentityPolicy (
 \r
   mUserInfo.NewIdentityPolicy         = NULL;\r
   mUserInfo.NewIdentityPolicyLen      = 0;\r
-  mUserInfo.NewIdentityPolicyModified = FALSE;   \r
+  mUserInfo.NewIdentityPolicyModified = FALSE;\r
 \r
   //\r
   // Update identity policy choice.\r
@@ -494,7 +494,7 @@ AddIdentityPolicyItem (
   if (mProviderInfo->Count == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Check the identity policy.\r
   //\r
index 11233a1509547dcf06fa0ba75fe0ea9c02098720..6de7e75e7967575ae2b112f35639628a6992e970 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions to add a user profile.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -17,11 +17,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 /**\r
   Get user name from the popup windows.\r
-  \r
+\r
   @param[in, out]  UserNameLen  On entry, point to UserName buffer lengh, in bytes.\r
                                 On exit, point to input user name length, in bytes.\r
   @param[out]      UserName     The buffer to hold the input user name.\r
\r
+\r
   @retval EFI_ABORTED           It is given up by pressing 'ESC' key.\r
   @retval EFI_NOT_READY         Not a valid input at all.\r
   @retval EFI_SUCCESS           Get a user name successfully.\r
@@ -100,7 +100,7 @@ GetUserNameInput (
 \r
   *UserNameLen = NameLen * sizeof (CHAR16);\r
   CopyMem (UserName, Name, *UserNameLen);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -112,7 +112,7 @@ GetUserNameInput (
   @param[in]   UserName      Point to the buffer of user name.\r
 \r
   @retval EFI_NOT_READY      The usernme in mAddUserName had been used.\r
-  @retval EFI_SUCCESS        Change the user's username successfully with \r
+  @retval EFI_SUCCESS        Change the user's username successfully with\r
                              username in mAddUserName.\r
 \r
 **/\r
@@ -127,13 +127,13 @@ SetUserName (
   EFI_USER_INFO_HANDLE    UserInfo;\r
   EFI_USER_PROFILE_HANDLE TempUser;\r
   EFI_USER_INFO           *NewUserInfo;\r
-   \r
+\r
   NewUserInfo = AllocateZeroPool (sizeof (EFI_USER_INFO) + UserNameLen);\r
   ASSERT (NewUserInfo != NULL);\r
 \r
   NewUserInfo->InfoType    = EFI_USER_INFO_NAME_RECORD;\r
-  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | \r
-                             EFI_USER_INFO_PUBLIC | \r
+  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |\r
+                             EFI_USER_INFO_PUBLIC |\r
                              EFI_USER_INFO_EXCLUSIVE;\r
   NewUserInfo->InfoSize    = (UINT32) (sizeof (EFI_USER_INFO) + UserNameLen);\r
   CopyMem ((UINT8 *) (NewUserInfo + 1), UserName, UserNameLen);\r
@@ -181,7 +181,7 @@ SetCreateDate (
   EFI_USER_INFO_HANDLE      UserInfo;\r
   EFI_USER_INFO_CREATE_DATE Date;\r
   EFI_USER_INFO             *NewUserInfo;\r
-  \r
+\r
   NewUserInfo = AllocateZeroPool (\r
                   sizeof (EFI_USER_INFO) +\r
                   sizeof (EFI_USER_INFO_CREATE_DATE)\r
@@ -189,8 +189,8 @@ SetCreateDate (
   ASSERT (NewUserInfo != NULL);\r
 \r
   NewUserInfo->InfoType    = EFI_USER_INFO_CREATE_DATE_RECORD;\r
-  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | \r
-                             EFI_USER_INFO_PUBLIC | \r
+  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |\r
+                             EFI_USER_INFO_PUBLIC |\r
                              EFI_USER_INFO_EXCLUSIVE;\r
   NewUserInfo->InfoSize    = sizeof (EFI_USER_INFO) + sizeof (EFI_USER_INFO_CREATE_DATE);\r
   Status                   = gRT->GetTime (&Date, NULL);\r
@@ -215,7 +215,7 @@ SetCreateDate (
 /**\r
   Set the default identity policy of the specified user.\r
 \r
-  @param[in]  User               Handle of a user profile. \r
+  @param[in]  User               Handle of a user profile.\r
 \r
 **/\r
 VOID\r
@@ -226,20 +226,20 @@ SetIdentityPolicy (
   EFI_USER_INFO_IDENTITY_POLICY *Policy;\r
   EFI_USER_INFO_HANDLE          UserInfo;\r
   EFI_USER_INFO                 *NewUserInfo;\r
-  \r
+\r
   NewUserInfo = AllocateZeroPool (\r
-                  sizeof (EFI_USER_INFO) + \r
+                  sizeof (EFI_USER_INFO) +\r
                   sizeof (EFI_USER_INFO_IDENTITY_POLICY)\r
                   );\r
   ASSERT (NewUserInfo != NULL);\r
-  \r
+\r
   Policy                   = (EFI_USER_INFO_IDENTITY_POLICY *) (NewUserInfo + 1);\r
   Policy->Type             = EFI_USER_INFO_IDENTITY_TRUE;\r
   Policy->Length           = sizeof (EFI_USER_INFO_IDENTITY_POLICY);\r
 \r
   NewUserInfo->InfoType    = EFI_USER_INFO_IDENTITY_POLICY_RECORD;\r
-  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | \r
-                             EFI_USER_INFO_PUBLIC | \r
+  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |\r
+                             EFI_USER_INFO_PUBLIC |\r
                              EFI_USER_INFO_EXCLUSIVE;\r
   NewUserInfo->InfoSize    = sizeof (EFI_USER_INFO) + Policy->Length;\r
   UserInfo                 = NULL;\r
@@ -257,7 +257,7 @@ SetIdentityPolicy (
 /**\r
   Set the default access policy of the specified user.\r
 \r
-  @param[in]  User               Handle of a user profile. \r
+  @param[in]  User               Handle of a user profile.\r
 \r
 **/\r
 VOID\r
@@ -268,20 +268,20 @@ SetAccessPolicy (
   EFI_USER_INFO_ACCESS_CONTROL  *Control;\r
   EFI_USER_INFO_HANDLE          UserInfo;\r
   EFI_USER_INFO                 *NewUserInfo;\r
-  \r
+\r
   NewUserInfo = AllocateZeroPool (\r
-                  sizeof (EFI_USER_INFO) + \r
+                  sizeof (EFI_USER_INFO) +\r
                   sizeof (EFI_USER_INFO_ACCESS_CONTROL)\r
                   );\r
   ASSERT (NewUserInfo != NULL);\r
-  \r
+\r
   Control                  = (EFI_USER_INFO_ACCESS_CONTROL *) (NewUserInfo + 1);\r
   Control->Type            = EFI_USER_INFO_ACCESS_ENROLL_SELF;\r
   Control->Size            = sizeof (EFI_USER_INFO_ACCESS_CONTROL);\r
 \r
   NewUserInfo->InfoType    = EFI_USER_INFO_ACCESS_POLICY_RECORD;\r
-  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV | \r
-                             EFI_USER_INFO_PUBLIC | \r
+  NewUserInfo->InfoAttribs = EFI_USER_INFO_STORAGE_PLATFORM_NV |\r
+                             EFI_USER_INFO_PUBLIC |\r
                              EFI_USER_INFO_EXCLUSIVE;\r
   NewUserInfo->InfoSize    = sizeof (EFI_USER_INFO) + Control->Size;\r
   UserInfo                 = NULL;\r
@@ -315,7 +315,7 @@ CallAddUser (
 \r
   QuestionStr = NULL;\r
   PromptStr   = NULL;\r
-  \r
+\r
   //\r
   // Get user name to add.\r
   //\r
@@ -324,7 +324,7 @@ CallAddUser (
   if (EFI_ERROR (Status)) {\r
     if (Status != EFI_ABORTED) {\r
       QuestionStr = GetStringById (STRING_TOKEN (STR_GET_USERNAME_FAILED));\r
-      PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE)); \r
+      PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));\r
       goto Done;\r
     }\r
     return ;\r
@@ -337,7 +337,7 @@ CallAddUser (
   Status  = mUserManager->Create (mUserManager, &User);\r
   if (EFI_ERROR (Status)) {\r
     QuestionStr = GetStringById (STRING_TOKEN (STR_CREATE_PROFILE_FAILED));\r
-    PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE)); \r
+    PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));\r
   } else {\r
     //\r
     // Add default user information.\r
@@ -345,7 +345,7 @@ CallAddUser (
     Status = SetUserName (User, UserNameLen, UserName);\r
     if (EFI_ERROR (Status)) {\r
       QuestionStr = GetStringById (STRING_TOKEN (STR_USER_ALREADY_EXISTED));\r
-      PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE)); \r
+      PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));\r
       goto Done;\r
     }\r
 \r
@@ -354,7 +354,7 @@ CallAddUser (
     SetAccessPolicy (User);\r
 \r
     QuestionStr = GetStringById (STRING_TOKEN (STR_CREATE_PROFILE_SUCCESS));\r
-    PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE)); \r
+    PromptStr   = GetStringById (STRING_TOKEN (STR_STROKE_KEY_CONTINUE));\r
   }\r
 \r
 Done:\r
index 8be302e1ccb4fff3052e680e65c295a9a0869068..af5d3109dd7b8b32c33a57b73c8d4d39692c9e27 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions to delete a user profile.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -17,12 +17,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 /**\r
   Get the username from the specified user.\r
 \r
-  @param[in]   User              Handle of a user profile. \r
+  @param[in]   User              Handle of a user profile.\r
 \r
   @retval EFI_STRING_ID          The String Id of the user's username.\r
 \r
 **/\r
-EFI_STRING_ID \r
+EFI_STRING_ID\r
 GetUserName (\r
   IN  EFI_USER_PROFILE_HANDLE                   User\r
   )\r
@@ -35,14 +35,14 @@ GetUserName (
   UINTN                 NameLen;\r
   CHAR16                UserName[USER_NAME_LENGTH];\r
   EFI_STRING_ID         UserId;\r
-  \r
+\r
   //\r
   // Allocate user information memory.\r
   //\r
   MemSize = sizeof (EFI_USER_INFO) + 63;\r
   Info    = AllocateZeroPool (MemSize);\r
   ASSERT (Info != NULL);\r
-  \r
+\r
   //\r
   // Get user name information.\r
   //\r
@@ -116,7 +116,7 @@ GetUserName (
 /**\r
   Add a username item in form.\r
 \r
-  @param[in]  User          Points to the user profile whose username is added. \r
+  @param[in]  User          Points to the user profile whose username is added.\r
   @param[in]  Index         The index of the user in the user name list\r
   @param[in]  OpCodeHandle  Points to container for dynamic created opcodes.\r
 \r
@@ -137,7 +137,7 @@ AddUserToForm (
   if (NameId == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Create user name option.\r
   //\r
@@ -173,7 +173,7 @@ AddUserToForm (
 /**\r
   Delete the user specified by UserIndex in user profile database.\r
 \r
-  @param[in]  UserIndex       The index of user in the user name list \r
+  @param[in]  UserIndex       The index of user in the user name list\r
                               to be deleted.\r
 \r
 **/\r
@@ -197,7 +197,7 @@ DeleteUser (
   if (EFI_ERROR (Status)) {\r
     goto Done;\r
   }\r
-  \r
+\r
   while (UserIndex > 1) {\r
     Status = mUserManager->GetNext (mUserManager, &User);\r
     if (EFI_ERROR (Status)) {\r
@@ -232,7 +232,7 @@ DeleteUser (
     ASSERT (Info != NULL);\r
     DeleteCredentialFromProviders ((UINT8 *)(Info + 1), Info->InfoSize - sizeof (EFI_USER_INFO), User);\r
     FreePool (Info);\r
-    \r
+\r
     Status = mUserManager->Delete (mUserManager, User);\r
     if (EFI_ERROR (Status)) {\r
       goto Done;\r
@@ -245,7 +245,7 @@ DeleteUser (
       L"Please Press Any Key to Continue ...",\r
       NULL\r
       );\r
-    return ;  \r
+    return ;\r
   }\r
 \r
 Done:\r
index b84f2cdf9c02f1536a759a48e55f33fe9f9cd40c..e73ba3a8fc50703abd3116e6b692775831d52c76 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
-  This driver is a configuration tool for adding, deleting or modifying user \r
-  profiles, including gathering the necessary information to ascertain their \r
-  identity in the future, updating user access policy and identification \r
+  This driver is a configuration tool for adding, deleting or modifying user\r
+  profiles, including gathering the necessary information to ascertain their\r
+  identity in the future, updating user access policy and identification\r
   policy, etc.\r
 \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -71,12 +71,12 @@ GetStringById (
 \r
 \r
 /**\r
-  This function gets all the credential providers in the system and saved them \r
+  This function gets all the credential providers in the system and saved them\r
   to mProviderInfo.\r
 \r
   @retval EFI_SUCESS     Init credential provider database successfully.\r
   @retval Others         Fail to init credential provider database.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 InitProviderInfo (\r
@@ -86,8 +86,8 @@ InitProviderInfo (
   EFI_STATUS  Status;\r
   UINTN       HandleCount;\r
   EFI_HANDLE  *HandleBuf;\r
-  UINTN       Index;  \r
-  \r
+  UINTN       Index;\r
+\r
   //\r
   // Try to find all the user credential provider driver.\r
   //\r
@@ -103,7 +103,7 @@ InitProviderInfo (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Get provider infomation.\r
   //\r
@@ -111,7 +111,7 @@ InitProviderInfo (
     FreePool (mProviderInfo);\r
   }\r
   mProviderInfo = AllocateZeroPool (\r
-                    sizeof (CREDENTIAL_PROVIDER_INFO) - \r
+                    sizeof (CREDENTIAL_PROVIDER_INFO) -\r
                     sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *) +\r
                     HandleCount * sizeof (EFI_USER_CREDENTIAL2_PROTOCOL *)\r
                     );\r
@@ -192,7 +192,7 @@ UserProfileManagerCallback (
       if (QuestionId != QUESTIONID_USER_MANAGE) {\r
         return EFI_SUCCESS;\r
       }\r
-  \r
+\r
       //\r
       // Get current user\r
       //\r
@@ -202,7 +202,7 @@ UserProfileManagerCallback (
         DEBUG ((DEBUG_ERROR, "Error: current user does not exist!\n"));\r
         return EFI_NOT_READY;\r
       }\r
-      \r
+\r
       //\r
       // Get current user's right information.\r
       //\r
@@ -210,7 +210,7 @@ UserProfileManagerCallback (
       if (EFI_ERROR (Status)) {\r
         CurrentAccessRight = EFI_USER_INFO_ACCESS_ENROLL_SELF;\r
       }\r
-  \r
+\r
       //\r
       // Init credential provider information.\r
       //\r
@@ -218,16 +218,16 @@ UserProfileManagerCallback (
       if (EFI_ERROR (Status)) {\r
         return Status;\r
       }\r
-      \r
+\r
       //\r
       // Initialize the container for dynamic opcodes.\r
       //\r
       StartOpCodeHandle = HiiAllocateOpCodeHandle ();\r
       ASSERT (StartOpCodeHandle != NULL);\r
-  \r
+\r
       EndOpCodeHandle = HiiAllocateOpCodeHandle ();\r
       ASSERT (EndOpCodeHandle != NULL);\r
-  \r
+\r
       //\r
       // Create Hii Extend Label OpCode.\r
       //\r
@@ -239,7 +239,7 @@ UserProfileManagerCallback (
                                             );\r
       StartLabel->ExtendOpCode  = EFI_IFR_EXTEND_OP_LABEL;\r
       StartLabel->Number        = LABEL_USER_MANAGE_FUNC;\r
-  \r
+\r
       EndLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (\r
                                           EndOpCodeHandle,\r
                                           &gEfiIfrTianoGuid,\r
@@ -248,7 +248,7 @@ UserProfileManagerCallback (
                                           );\r
       EndLabel->ExtendOpCode  = EFI_IFR_EXTEND_OP_LABEL;\r
       EndLabel->Number        = LABEL_END;\r
-  \r
+\r
       //\r
       // Add user profile option.\r
       //\r
@@ -264,7 +264,7 @@ UserProfileManagerCallback (
           0                                   // Action String ID\r
           );\r
       }\r
-      \r
+\r
       //\r
       // Add modify user profile option.\r
       //\r
@@ -276,7 +276,7 @@ UserProfileManagerCallback (
         EFI_IFR_FLAG_CALLBACK,                // Question flag\r
         KEY_MODIFY_USER                       // Question ID\r
         );\r
-  \r
+\r
       //\r
       // Add delete user profile option\r
       //\r
@@ -290,7 +290,7 @@ UserProfileManagerCallback (
           KEY_DEL_USER                          // Question ID\r
           );\r
       }\r
-  \r
+\r
       HiiUpdateForm (\r
         mCallbackInfo->HiiHandle,               // HII handle\r
         &gUserProfileManagerGuid,               // Formset GUID\r
@@ -298,10 +298,10 @@ UserProfileManagerCallback (
         StartOpCodeHandle,                      // Label for where to insert opcodes\r
         EndOpCodeHandle                         // Replace data\r
         );\r
-  \r
+\r
       HiiFreeOpCodeHandle (StartOpCodeHandle);\r
       HiiFreeOpCodeHandle (EndOpCodeHandle);\r
-  \r
+\r
       return EFI_SUCCESS;\r
     }\r
     break;\r
@@ -311,14 +311,14 @@ UserProfileManagerCallback (
     break;\r
 \r
   case EFI_BROWSER_ACTION_CHANGED:\r
-  {  \r
+  {\r
     //\r
     // Handle the request from form.\r
     //\r
     if ((Value == NULL) || (ActionRequest == NULL)) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     //\r
     // Judge first 2 bits.\r
     //\r
@@ -392,7 +392,7 @@ UserProfileManagerCallback (
           //\r
           // Change credential provider option.\r
           //\r
-          case KEY_MODIFY_PROV:         \r
+          case KEY_MODIFY_PROV:\r
             mProviderChoice = Value->u8;\r
             break;\r
 \r
@@ -556,14 +556,14 @@ UserProfileManagerCallback (
 \r
 \r
   case EFI_BROWSER_ACTION_CHANGING:\r
-  {  \r
+  {\r
     //\r
     // Handle the request from form.\r
     //\r
     if (Value == NULL) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     //\r
     // Judge first 2 bits.\r
     //\r
@@ -666,19 +666,19 @@ UserProfileManagerCallback (
             case KEY_PERMIT_MODIFY:\r
               DisplayLoadPermit ();\r
               break;\r
-          \r
+\r
             //\r
             // Forbid load device path.\r
             //\r
             case KEY_FORBID_MODIFY:\r
               DisplayLoadForbid ();\r
               break;\r
-          \r
+\r
             default:\r
               break;\r
             }\r
             break;\r
-            \r
+\r
           //\r
           // Connect device path form.\r
           //\r
@@ -693,14 +693,14 @@ UserProfileManagerCallback (
             case KEY_PERMIT_MODIFY:\r
               DisplayConnectPermit ();\r
               break;\r
-          \r
+\r
             //\r
             // Forbid connect device path.\r
             //\r
             case KEY_FORBID_MODIFY:\r
               DisplayConnectForbid ();\r
               break;\r
-          \r
+\r
             default:\r
               break;\r
             }\r
@@ -839,7 +839,7 @@ UserProfileManagerInit (
   if (EFI_ERROR (Status)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Initialize driver private data.\r
   //\r
@@ -847,14 +847,14 @@ UserProfileManagerInit (
   ZeroMem (&mAccessInfo, sizeof (mAccessInfo));\r
 \r
   CallbackInfo = AllocateZeroPool (sizeof (USER_PROFILE_MANAGER_CALLBACK_INFO));\r
-  ASSERT (CallbackInfo != NULL);  \r
+  ASSERT (CallbackInfo != NULL);\r
 \r
   CallbackInfo->Signature                   = USER_PROFILE_MANAGER_SIGNATURE;\r
   CallbackInfo->ConfigAccess.ExtractConfig  = FakeExtractConfig;\r
   CallbackInfo->ConfigAccess.RouteConfig    = FakeRouteConfig;\r
   CallbackInfo->ConfigAccess.Callback       = UserProfileManagerCallback;\r
   CallbackInfo->DriverHandle                = NULL;\r
-  \r
+\r
   //\r
   // Install Device Path Protocol and Config Access protocol to driver handle.\r
   //\r
@@ -878,10 +878,10 @@ UserProfileManagerInit (
                               UserProfileManagerVfrBin,\r
                               NULL\r
                               );\r
-  ASSERT (CallbackInfo->HiiHandle != NULL);                              \r
+  ASSERT (CallbackInfo->HiiHandle != NULL);\r
   mCallbackInfo = CallbackInfo;\r
 \r
   return Status;\r
 }\r
 \r
-  \r
+\r
index 5ab5457a8f64573b0d0641f8944641d3a9165283..aff1e28d9d361e4642d235b39747cd1883217834 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The header file for user profile manager driver.\r
-    \r
-Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -55,7 +55,7 @@ typedef struct {
   EFI_TIME  UsageDate;\r
   UINTN     AccessPolicyLen;\r
   UINTN     IdentityPolicyLen;\r
-  UINTN     NewIdentityPolicyLen;    \r
+  UINTN     NewIdentityPolicyLen;\r
   UINT8     *AccessPolicy;\r
   UINT8     *IdentityPolicy;\r
   UINT8     *NewIdentityPolicy;\r
@@ -197,7 +197,7 @@ DeleteUser (
 /**\r
   Add a username item in form.\r
 \r
-  @param[in]  User             Points to the user profile whose username is added. \r
+  @param[in]  User             Points to the user profile whose username is added.\r
   @param[in]  Index            The index of the user in the user name list.\r
   @param[in]  OpCodeHandle     Points to container for dynamic created opcodes.\r
 \r
@@ -216,7 +216,7 @@ AddUserToForm (
   and access policy are displayed.\r
 \r
   @param[in] UserIndex       The index of the user in display list to modify.\r
-  \r
+\r
 **/\r
 VOID\r
 ModifyUserInfo (\r
@@ -224,7 +224,7 @@ ModifyUserInfo (
   );\r
 \r
 /**\r
-  Get the username from user input and update username string in Hii \r
+  Get the username from user input and update username string in Hii\r
   database with it.\r
 \r
 **/\r
@@ -253,11 +253,11 @@ AddIdentityPolicyItem (
 \r
 /**\r
   Save the identity policy and update UI with it.\r
-  \r
-  This function will verify the new identity policy, in current implementation, \r
+\r
+  This function will verify the new identity policy, in current implementation,\r
   the identity policy can be:  T, P & P & P & ..., P | P | P | ...\r
   Here, "T" means "True", "P" means "Credential Provider", "&" means "and", "|" means "or".\r
-  Other identity policies are not supported.  \r
+  Other identity policies are not supported.\r
 \r
 **/\r
 VOID\r
@@ -270,7 +270,7 @@ SaveIdentityPolicy (
 \r
   In this form, access right, access setu,p and access boot order are dynamically\r
   added. Load devicepath and connect devicepath are displayed too.\r
-  \r
+\r
 **/\r
 VOID\r
 ModidyAccessPolicy (\r
@@ -278,7 +278,7 @@ ModidyAccessPolicy (
   );\r
 \r
 /**\r
-  Collect all the access policy data to mUserInfo.AccessPolicy, \r
+  Collect all the access policy data to mUserInfo.AccessPolicy,\r
   and save it to user profile.\r
 \r
 **/\r
@@ -338,23 +338,23 @@ DisplayConnectForbid (
   );\r
 \r
 /**\r
-  Delete the specified device path by DriverIndex from the forbid device path \r
+  Delete the specified device path by DriverIndex from the forbid device path\r
   list (mAccessInfo.LoadForbid).\r
 \r
   @param[in]  DriverIndex   The index of driver in a forbidden device path list.\r
-  \r
+\r
 **/\r
 VOID\r
 DeleteFromForbidLoad (\r
   IN  UINT16                                    DriverIndex\r
   );\r
-  \r
+\r
 /**\r
-  Add the specified device path by DriverIndex to the forbid device path \r
+  Add the specified device path by DriverIndex to the forbid device path\r
   list (mAccessInfo.LoadForbid).\r
 \r
   @param[in]  DriverIndex   The index of driver saved in driver options.\r
-  \r
+\r
 **/\r
 VOID\r
 AddToForbidLoad (\r
@@ -363,11 +363,11 @@ AddToForbidLoad (
 \r
 /**\r
   Get user name from the popup windows.\r
-  \r
+\r
   @param[in, out]  UserNameLen   On entry, point to the buffer lengh of UserName.\r
                                  On exit, point to the input user name length.\r
   @param[out]      UserName      The buffer to hold the input user name.\r
\r
+\r
   @retval EFI_ABORTED            It is given up by pressing 'ESC' key.\r
   @retval EFI_NOT_READY          Not a valid input at all.\r
   @retval EFI_SUCCESS            Get a user name successfully.\r
@@ -385,7 +385,7 @@ GetUserNameInput (
   @param[in]  User         Handle of the user whose information will be searched.\r
   @param[in]  InfoType     The user information type to find.\r
   @param[out] UserInfo     Points to user information handle found.\r
-  \r
+\r
   @retval EFI_SUCCESS      Find the user information successfully.\r
   @retval Others           Fail to find the user information.\r
 \r
@@ -418,7 +418,7 @@ ResolveIdentityPolicy (
 \r
   @param[in] ValidLen       The valid access policy length.\r
   @param[in] ExpandLen      The length that is needed to expand.\r
-    \r
+\r
 **/\r
 VOID\r
 ExpandMemory (\r
@@ -428,7 +428,7 @@ ExpandMemory (
 \r
 /**\r
   Delete User's credental from all the providers that exist in User's identity policy.\r
-  \r
+\r
   @param[in]  IdentityPolicy     Point to User's identity policy.\r
   @param[in]  IdentityPolicyLen  The length of the identity policy.\r
   @param[in]  User               Points to user profile.\r
@@ -438,7 +438,7 @@ VOID
 DeleteCredentialFromProviders (\r
   IN     UINT8                                *IdentityPolicy,\r
   IN     UINTN                                 IdentityPolicyLen,\r
-  IN     EFI_USER_PROFILE_HANDLE               User \r
+  IN     EFI_USER_PROFILE_HANDLE               User\r
   );\r
-  \r
+\r
 #endif\r
index 4548c758b58918505e183ac18a3950ed1bde2ec5..a83caac9bad62e8deae1cf05e56b8db8a8b18dbe 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The form data for user profile manager driver.\r
-    \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -47,7 +47,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define  LABEL_END                  0x00F0\r
 \r
 //\r
-// First form key (Add/modify/del user profile). \r
+// First form key (Add/modify/del user profile).\r
 // First 2 bits (bit 16~15).\r
 //\r
 #define  KEY_MODIFY_USER            0x4000\r
@@ -77,7 +77,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Specified key, used in VFR (KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_NAME).\r
 //\r
-#define  KEY_MODIFY_USER_NAME       0x5200 \r
+#define  KEY_MODIFY_USER_NAME       0x5200\r
 \r
 //\r
 // Modify identity policy form key.\r
@@ -134,7 +134,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Device path modify key.\r
 // 2 bits (bit 12~11).\r
-// \r
+//\r
 #define KEY_LOAD_PERMIT_MODIFY      0x0000\r
 #define KEY_LOAD_FORBID_MODIFY      0x0400\r
 #define KEY_CONNECT_PERMIT_MODIFY   0x0800\r
index 619b2dd9f05cadebb3a313d52882ceb2c4e710bc..cdd97731b279ee2c090aeac7384e80fe4acb37f8 100644 (file)
@@ -4,7 +4,7 @@
 #  By this module, user can add/update/delete user profiles, and can also\r
 #  modify the user access policy and the user identification policy.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -50,7 +50,7 @@
   HiiLib\r
   UefiLib\r
   DevicePathLib\r
-  \r
+\r
 [Guids]\r
   gEfiIfrTianoGuid                              ## SOMETIMES_CONSUMES  ## GUID\r
   gEfiUserInfoAccessSetupAdminGuid              ## SOMETIMES_CONSUMES  ## GUID\r
@@ -66,7 +66,7 @@
 \r
 [Depex]\r
   gEfiUserManagerProtocolGuid\r
-  \r
+\r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   UserProfileManagerExtra.uni\r
-  
\ No newline at end of file
+\r
index c96bbeca6a3e26b49c6c58200ecebe4476c6071d..bf7ac7dc0462a07af68a34070cc1ae87f2277c17 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // UserProfileManager Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "User Profile Manager"\r
 \r
 \r
index 65f714a5c8d9a5800e1a105338821b60172c94ae..3a003a9883a9415dcdb09f3214bf71558692cc6a 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   String definitions for User Profile Manager driver.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -20,139 +20,139 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_FORMSET_TITLE              #language en-US  "User Manager"\r
                                        #language fr-FR  "User Manager(French)"\r
 #string STR_TITLE_HELP                 #language en-US  "This selection will take you to the User Manager"\r
-                                       #language fr-FR  "This selection will take you to the User Manager(French)" \r
+                                       #language fr-FR  "This selection will take you to the User Manager(French)"\r
 #string STR_USERMAN_TITLE              #language en-US  "User Manager"\r
                                        #language fr-FR  "User Manager(French)"\r
-#string STR_ADD_USER_TITLE                                              #language en-US  "Add User Profile"\r
-                                                                                                                                                        #language fr-FR  "Add User Profile(French)"\r
-#string STR_ADD_USER_HELP                                                       #language en-US  "Add User Profile to User Database"\r
-                                                                                                                                                        #language fr-FR  "Add User Profile to User Database(French)"\r
-#string STR_MODIFY_USER_TITLE                                   #language en-US  "Modify User Profile"\r
-                                                                                                                                                        #language fr-FR  "Modify User Profile(French)"\r
-#string STR_MODIFY_USER_HELP                                    #language en-US  "Modify User Profile Information"\r
-                                                                                                                                                        #language fr-FR  "Modify User Profile Information(French)"\r
-#string STR_DELETE_USER_TITLE                                   #language en-US  "Delete User Profile"\r
-                                                                                                                                                        #language fr-FR  "Delete User Profile(French)"\r
+#string STR_ADD_USER_TITLE             #language en-US  "Add User Profile"\r
+                                       #language fr-FR  "Add User Profile(French)"\r
+#string STR_ADD_USER_HELP               #language en-US  "Add User Profile to User Database"\r
+                                       #language fr-FR  "Add User Profile to User Database(French)"\r
+#string STR_MODIFY_USER_TITLE           #language en-US  "Modify User Profile"\r
+                                       #language fr-FR  "Modify User Profile(French)"\r
+#string STR_MODIFY_USER_HELP           #language en-US  "Modify User Profile Information"\r
+                                       #language fr-FR  "Modify User Profile Information(French)"\r
+#string STR_DELETE_USER_TITLE           #language en-US  "Delete User Profile"\r
+                                       #language fr-FR  "Delete User Profile(French)"\r
 #string STR_DELETE_USER_HELP           #language en-US  "Delete User Profile from User Database"\r
-                                                                                                                                                        #language fr-FR  "Delete User Profile from User Database(French)"\r
-#string STR_USER_INFO                                                                   #language en-US  "User Profile Information"\r
-                                                                                                                                                        #language fr-FR  "User Profile Information(French)"\r
-#string STR_USER_NAME                                                                   #language en-US  "User Name"\r
-                                                                                                                                                        #language fr-FR  "User Name(French)"\r
-#string STR_USER_NAME_VAL                                                       #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""                                                             \r
-#string STR_CREATE_DATE                                                                 #language en-US  "Create Date"\r
-                                                                                                                                                  #language fr-FR  "Create Date(French)"\r
-#string STR_CREATE_DATE_VAL                                             #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""\r
-#string STR_USAGE_DATE                                                                  #language en-US  "Usage Date"\r
-                                                                                                                                                        #language fr-FR  "Usage Date(French)"\r
-#string STR_USAGE_DATE_VAL                                              #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""\r
-#string STR_USAGE_COUNT                                                                 #language en-US  "Usage Count"\r
-                                                                                                                                                        #language fr-FR  "Usage Count(French)"\r
-#string STR_USAGE_COUNT_VAL                                             #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""                             \r
-#string STR_IDENTIFY_POLICY                                             #language en-US  "Identify Policy"\r
-                                                                                                                                                        #language fr-FR  "Identify Policy(French)"\r
-#string STR_IDENTIFY_POLICY_VAL                                 #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""\r
-#string STR_ACCESS_POLICY                                                       #language en-US  "Access Policy"\r
-                                                                                                                                                        #language fr-FR  "Access Policy(French)"       \r
-#string STR_SAVE                                                                                        #language en-US  "Save & Exit"\r
-                                                                                                                                                        #language fr-FR  "Save & Exit(French)"                                  \r
-#string STR_IDENTIFY_SAVE_HELP                          #language en-US  "Save Identify Policy and Exit"\r
-                                                                                                                                                        #language fr-FR  "Save Identify Policy and Exit(French)"       \r
-#string STR_PROVIDER                                                                    #language en-US  "Credential Provider"\r
-                                                                                                                                                        #language fr-FR  "Credential Provider(French)"\r
-#string STR_PROVIDER_HELP                                                       #language en-US  "Select Credential Provider Option"\r
-                                                                                                                                                        #language fr-FR  "Select Credential Provider Option(French)"   \r
-#string STR_OR_CON                                                                              #language en-US  "Or"\r
-                                                                                                                                                        #language fr-FR  "Or(French)"\r
-#string STR_AND_CON                                                                             #language en-US  "And"\r
-                                                                                                                                                        #language fr-FR  "And(French)" \r
-#string STR_CONNECTOR                                                                   #language en-US  "Logical Connector"\r
-                                                                                                                                                        #language fr-FR  "Logical Connector(French)"\r
-#string STR_CONNECTOR_HELP                                              #language en-US  "Select Logical Connector Option"\r
-                                                                                                                                                        #language fr-FR  "Select Logical Connector Option(French)"     \r
-#string STR_IDENTIFY_POLICY_VALUE                       #language en-US  ""\r
-                                                                                                                                                        #language fr-FR  ""\r
+                                       #language fr-FR  "Delete User Profile from User Database(French)"\r
+#string STR_USER_INFO                   #language en-US  "User Profile Information"\r
+                                       #language fr-FR  "User Profile Information(French)"\r
+#string STR_USER_NAME                   #language en-US  "User Name"\r
+                                       #language fr-FR  "User Name(French)"\r
+#string STR_USER_NAME_VAL               #language en-US  ""\r
+                                       #language fr-FR  ""\r
+#string STR_CREATE_DATE                 #language en-US  "Create Date"\r
+                                       #language fr-FR  "Create Date(French)"\r
+#string STR_CREATE_DATE_VAL             #language en-US  ""\r
+                                       #language fr-FR  ""\r
+#string STR_USAGE_DATE                  #language en-US  "Usage Date"\r
+                                       #language fr-FR  "Usage Date(French)"\r
+#string STR_USAGE_DATE_VAL             #language en-US  ""\r
+                                       #language fr-FR  ""\r
+#string STR_USAGE_COUNT                 #language en-US  "Usage Count"\r
+                                       #language fr-FR  "Usage Count(French)"\r
+#string STR_USAGE_COUNT_VAL             #language en-US  ""\r
+                                       #language fr-FR  ""\r
+#string STR_IDENTIFY_POLICY             #language en-US  "Identify Policy"\r
+                                       #language fr-FR  "Identify Policy(French)"\r
+#string STR_IDENTIFY_POLICY_VAL         #language en-US  ""\r
+                                       #language fr-FR  ""\r
+#string STR_ACCESS_POLICY               #language en-US  "Access Policy"\r
+                                       #language fr-FR  "Access Policy(French)"\r
+#string STR_SAVE                       #language en-US  "Save & Exit"\r
+                                       #language fr-FR  "Save & Exit(French)"\r
+#string STR_IDENTIFY_SAVE_HELP         #language en-US  "Save Identify Policy and Exit"\r
+                                       #language fr-FR  "Save Identify Policy and Exit(French)"\r
+#string STR_PROVIDER                   #language en-US  "Credential Provider"\r
+                                       #language fr-FR  "Credential Provider(French)"\r
+#string STR_PROVIDER_HELP               #language en-US  "Select Credential Provider Option"\r
+                                       #language fr-FR  "Select Credential Provider Option(French)"\r
+#string STR_OR_CON                     #language en-US  "Or"\r
+                                       #language fr-FR  "Or(French)"\r
+#string STR_AND_CON                     #language en-US  "And"\r
+                                       #language fr-FR  "And(French)"\r
+#string STR_CONNECTOR                   #language en-US  "Logical Connector"\r
+                                       #language fr-FR  "Logical Connector(French)"\r
+#string STR_CONNECTOR_HELP             #language en-US  "Select Logical Connector Option"\r
+                                       #language fr-FR  "Select Logical Connector Option(French)"\r
+#string STR_IDENTIFY_POLICY_VALUE       #language en-US  ""\r
+                                       #language fr-FR  ""\r
 #string STR_IDENTIFY_POLICY_HELP       #language en-US  "Current Identify Policy"\r
-                                                                                                                                                        #language fr-FR  "Current Identify Policy(French)"     \r
-#string STR_ADD_OPTION                                                          #language en-US  "Add Option"\r
-                                                                                                                                                        #language fr-FR  "Add Option(French)"\r
-#string STR_ADD_OPTION_HELP                                             #language en-US  "Add This Option to Identify Policy"\r
-                                                                                                                                                        #language fr-FR  "Add This Option to Identify Policy(French)"\r
-#string STR_ACCESS_SAVE_HELP                              #language en-US  "Save Access Policy and Exit"\r
-                                                                                                                                                        #language fr-FR  "Save Access Policy and Exit(French)"\r
-#string STR_ACCESS_RIGHT                                                        #language en-US  "Access Right"\r
-                                                                                                                                                        #language fr-FR  "Access Right(French)"\r
-#string STR_ACCESS_RIGHT_HELP                                   #language en-US  "Select Access Right Option"\r
-                                                                                                                                                        #language fr-FR  "Select Access Right Option(French)"  \r
-#string STR_NORMAL                                                                              #language en-US  "Normal"\r
-                                                                                                                                                        #language fr-FR  "Normal(French)"\r
-#string STR_ENROLL                                                                              #language en-US  "Enroll"\r
-                                                                                                                                                        #language fr-FR  "Enroll(French)"\r
-#string STR_MANAGE                                                                              #language en-US  "Manage"\r
-                                                                                                                                                        #language fr-FR  "Manage(French)"      \r
-#string STR_ACCESS_SETUP                                                        #language en-US  "Access Setup"\r
-                                                                                                                                                        #language fr-FR  "Access Setup(French)"\r
-#string STR_ACCESS_SETUP_HELP                                   #language en-US  "Select Access Setup Option"\r
-                                                                                                                                                  #language fr-FR  "Selelct Access Setup Option(French)"\r
-#string STR_RESTRICTED                                                          #language en-US  "Restricted"\r
-                                                                                                                                                        #language fr-FR  "Restricted(French)"\r
-#string STR_ADMIN                                                                                       #language en-US  "Admin"\r
-                                                                                                                                                        #language fr-FR  "Admin(French)"       \r
-#string STR_BOOR_ORDER                                                          #language en-US  "Access Boot Order"\r
-                                                                                                                                                        #language fr-FR  "Access Boot Order(French)"\r
-#string STR_BOOT_ORDER_HELP                                             #language en-US  "Select Access Boot Order Option"\r
-                                                                                                                                                        #language fr-FR  "Select Access Boot Order Option(French)"\r
-#string STR_INSERT                                                                              #language en-US  "Insert"\r
-                                                                                                                                                        #language fr-FR  "Insert(French)"\r
-#string STR_APPEND                                                                              #language en-US  "Append"\r
-                                                                                                                                                  #language fr-FR  "Append(French)"\r
-#string STR_REPLACE                                                                             #language en-US  "Replace"\r
-                                                                                                                                                        #language fr-FR  "Replace(French)"\r
-#string STR_NODEFAULT                                                                   #language en-US  "Nodefault"\r
-                                                                                                                                                        #language fr-FR  "Nodefault(French)"   \r
-#string STR_LOAD                                                                                        #language en-US  "Load Device Path"\r
-                                                                                                                                                        #language fr-FR  "Load Device Path(French)"\r
-#string STR_LOAD_HELP                                                                   #language en-US  "Select Permit/Forbid Load Device Path"\r
-                                                                                                                                                        #language fr-FR  "Select Permit/Forbid Load Device Path(French)"\r
-#string STR_CONNECT                                                                             #language en-US  "Connect Device Path"\r
-                                                                                                                                                        #language fr-FR  "Connect Device Path(French)"\r
-#string STR_CONNECT_HELP                                                        #language en-US  "Select Permit/Forbid Connect Device Path"\r
-                                                                                                                                                        #language fr-FR  "Select Permit/Forbid Connect Device Path(French)"\r
-#string STR_LOAD_PERMIT                                                         #language en-US  "Permit Load Device Path"\r
-                                                                                                                                                        #language fr-FR  "Permit Load Device Path(French)"\r
-#string STR_LOAD_PERMIT_HELP                                    #language en-US  "Change Permit Load Device Path to Forbid"\r
-                                                                                                                                                        #language fr-FR  "Change Permit Load Device Path to Forbid(French)"\r
-#string STR_LOAD_FORBID                                                         #language en-US  "Forbid Load Device Path"\r
-                                                                                                                                                        #language fr-FR  "Forbid Load Device Path(French)"\r
-#string STR_LOAD_FORBID_HELP                                    #language en-US  "Change Forbid Load Device Path to Permit"\r
-                                                                                                                                                        #language fr-FR  "Change Forbid Load Device Path to Permit(French)"\r
-#string STR_CONNECT_PERMIT                                        #language en-US  "Permit Connect Device Path"\r
-                                                                                                                                                        #language fr-FR  "Permit Connect Device Path(French)"\r
-#string STR_CONNECT_PERMIT_HELP                                 #language en-US  "Change Permit Connect Device Path to Forbid"\r
-                                                                                                                                                        #language fr-FR  "Change Permit Connect Device Path to Forbid(French)"\r
-#string STR_CONNECT_FORBID                                              #language en-US  "Forbid Connect Device Path"\r
-                                                                                                                                                        #language fr-FR  "Forbid Connect Device Path(French)"\r
-#string STR_CONNECT_FORBID_HELP                                 #language en-US  "Change Forbid Connect Device Path to Permit"\r
-                                                                                                                                                        #language fr-FR  "Change Forbid Connect Device Path to Permit(French)"\r
-#string STR_PRESS_KEY_CONTINUE                          #language en-US  "Press ENTER to Continue, Other Key to Cancel ..."\r
-                                                                                                                                                        #language fr-FR  "Press ENTER to Continue, Other Key to Cancel ...(French)"    \r
-#string STR_MOVE_TO_FORBID_LIST                                 #language en-US  "Are You Sure to Move It to Forbid List?"\r
-                                                                                                                                                        #language fr-FR  "Are You Sure to Move It to Forbid List?(French)"     \r
-#string STR_MOVE_TO_PERMIT_LIST                                 #language en-US  "Are You Sure to Move It to Permit List?"\r
-                                                                                                                                                        #language fr-FR  "Are You Sure to Move It to Permit List?(French)"                                              \r
+                                       #language fr-FR  "Current Identify Policy(French)"\r
+#string STR_ADD_OPTION                 #language en-US  "Add Option"\r
+                                       #language fr-FR  "Add Option(French)"\r
+#string STR_ADD_OPTION_HELP             #language en-US  "Add This Option to Identify Policy"\r
+                                       #language fr-FR  "Add This Option to Identify Policy(French)"\r
+#string STR_ACCESS_SAVE_HELP           #language en-US  "Save Access Policy and Exit"\r
+                                       #language fr-FR  "Save Access Policy and Exit(French)"\r
+#string STR_ACCESS_RIGHT               #language en-US  "Access Right"\r
+                                       #language fr-FR  "Access Right(French)"\r
+#string STR_ACCESS_RIGHT_HELP           #language en-US  "Select Access Right Option"\r
+                                       #language fr-FR  "Select Access Right Option(French)"\r
+#string STR_NORMAL                     #language en-US  "Normal"\r
+                                       #language fr-FR  "Normal(French)"\r
+#string STR_ENROLL                     #language en-US  "Enroll"\r
+                                       #language fr-FR  "Enroll(French)"\r
+#string STR_MANAGE                     #language en-US  "Manage"\r
+                                       #language fr-FR  "Manage(French)"\r
+#string STR_ACCESS_SETUP               #language en-US  "Access Setup"\r
+                                       #language fr-FR  "Access Setup(French)"\r
+#string STR_ACCESS_SETUP_HELP           #language en-US  "Select Access Setup Option"\r
+                                       #language fr-FR  "Selelct Access Setup Option(French)"\r
+#string STR_RESTRICTED                 #language en-US  "Restricted"\r
+                                       #language fr-FR  "Restricted(French)"\r
+#string STR_ADMIN                       #language en-US  "Admin"\r
+                                       #language fr-FR  "Admin(French)"\r
+#string STR_BOOR_ORDER                 #language en-US  "Access Boot Order"\r
+                                       #language fr-FR  "Access Boot Order(French)"\r
+#string STR_BOOT_ORDER_HELP             #language en-US  "Select Access Boot Order Option"\r
+                                       #language fr-FR  "Select Access Boot Order Option(French)"\r
+#string STR_INSERT                     #language en-US  "Insert"\r
+                                       #language fr-FR  "Insert(French)"\r
+#string STR_APPEND                     #language en-US  "Append"\r
+                                       #language fr-FR  "Append(French)"\r
+#string STR_REPLACE                     #language en-US  "Replace"\r
+                                       #language fr-FR  "Replace(French)"\r
+#string STR_NODEFAULT                   #language en-US  "Nodefault"\r
+                                       #language fr-FR  "Nodefault(French)"\r
+#string STR_LOAD                        #language en-US  "Load Device Path"\r
+                                        #language fr-FR  "Load Device Path(French)"\r
+#string STR_LOAD_HELP                   #language en-US  "Select Permit/Forbid Load Device Path"\r
+                                       #language fr-FR  "Select Permit/Forbid Load Device Path(French)"\r
+#string STR_CONNECT                     #language en-US  "Connect Device Path"\r
+                                       #language fr-FR  "Connect Device Path(French)"\r
+#string STR_CONNECT_HELP               #language en-US  "Select Permit/Forbid Connect Device Path"\r
+                                       #language fr-FR  "Select Permit/Forbid Connect Device Path(French)"\r
+#string STR_LOAD_PERMIT                  #language en-US  "Permit Load Device Path"\r
+                                       #language fr-FR  "Permit Load Device Path(French)"\r
+#string STR_LOAD_PERMIT_HELP           #language en-US  "Change Permit Load Device Path to Forbid"\r
+                                       #language fr-FR  "Change Permit Load Device Path to Forbid(French)"\r
+#string STR_LOAD_FORBID                  #language en-US  "Forbid Load Device Path"\r
+                                       #language fr-FR  "Forbid Load Device Path(French)"\r
+#string STR_LOAD_FORBID_HELP           #language en-US  "Change Forbid Load Device Path to Permit"\r
+                                       #language fr-FR  "Change Forbid Load Device Path to Permit(French)"\r
+#string STR_CONNECT_PERMIT             #language en-US  "Permit Connect Device Path"\r
+                                       #language fr-FR  "Permit Connect Device Path(French)"\r
+#string STR_CONNECT_PERMIT_HELP         #language en-US  "Change Permit Connect Device Path to Forbid"\r
+                                       #language fr-FR  "Change Permit Connect Device Path to Forbid(French)"\r
+#string STR_CONNECT_FORBID             #language en-US  "Forbid Connect Device Path"\r
+                                       #language fr-FR  "Forbid Connect Device Path(French)"\r
+#string STR_CONNECT_FORBID_HELP         #language en-US  "Change Forbid Connect Device Path to Permit"\r
+                                       #language fr-FR  "Change Forbid Connect Device Path to Permit(French)"\r
+#string STR_PRESS_KEY_CONTINUE         #language en-US  "Press ENTER to Continue, Other Key to Cancel ..."\r
+                                       #language fr-FR  "Press ENTER to Continue, Other Key to Cancel ...(French)"\r
+#string STR_MOVE_TO_FORBID_LIST         #language en-US  "Are You Sure to Move It to Forbid List?"\r
+                                       #language fr-FR  "Are You Sure to Move It to Forbid List?(French)"\r
+#string STR_MOVE_TO_PERMIT_LIST         #language en-US  "Are You Sure to Move It to Permit List?"\r
+                                       #language fr-FR  "Are You Sure to Move It to Permit List?(French)"\r
 #string STR_STROKE_KEY_CONTINUE        #language en-US  "Please Press Any Key to Continue ..."\r
-                                                                                                                                                        #language fr-FR  "Please Press Any Key to Continue ... (French)"\r
+                                       #language fr-FR  "Please Press Any Key to Continue ... (French)"\r
 #string STR_CREATE_PROFILE_FAILED      #language en-US  "Create New User Profile Failed!"\r
-                                                                                                                                                        #language fr-FR  "Create New User Profile Failed! (French)"\r
+                                       #language fr-FR  "Create New User Profile Failed! (French)"\r
 #string STR_CREATE_PROFILE_SUCCESS     #language en-US  "Create New User Profile Succeed!"\r
-                                                                                                                                                        #language fr-FR  "Create New User Profile Succeed! (French)"\r
+                                       #language fr-FR  "Create New User Profile Succeed! (French)"\r
 #string STR_USER_ALREADY_EXISTED       #language en-US  "User Name Had Already Existed."\r
-                                                                                                                                                        #language fr-FR  "User Name Had Already Existed. (French)"     \r
+                                       #language fr-FR  "User Name Had Already Existed. (French)"\r
 #string STR_GET_USERNAME_FAILED        #language en-US  "Failed To Get User Name."\r
-                                                                                                                                                        #language fr-FR  "Failed To Get User Name. (French)"\r
-                                                                                                                                                \r
+                                       #language fr-FR  "Failed To Get User Name. (French)"\r
+\r
index 833307189a63d97d8e42686326812b632d6fa332..d165e5ae9bf9909085d492cdc3e45768b12a5184 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The functions to modify a user profile.\r
-    \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+\r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -127,7 +127,7 @@ GetAllUserInfo (
   mUserInfo.CreateDateExist         = FALSE;\r
   mUserInfo.UsageDateExist          = FALSE;\r
   mUserInfo.UsageCount              = 0;\r
-  \r
+\r
   mUserInfo.AccessPolicyLen         = 0;\r
   mUserInfo.AccessPolicyModified    = FALSE;\r
   if (mUserInfo.AccessPolicy != NULL) {\r
@@ -140,7 +140,7 @@ GetAllUserInfo (
     FreePool (mUserInfo.IdentityPolicy);\r
     mUserInfo.IdentityPolicy = NULL;\r
   }\r
-  \r
+\r
   //\r
   // Allocate user information memory.\r
   //\r
@@ -149,7 +149,7 @@ GetAllUserInfo (
   if (Info == NULL) {\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Get each user information.\r
   //\r
@@ -164,10 +164,10 @@ GetAllUserInfo (
     //\r
     InfoSize  = MemSize;\r
     Status    = mUserManager->GetInfo (\r
-                                mUserManager, \r
-                                mModifyUser, \r
-                                UserInfo, \r
-                                Info, \r
+                                mUserManager,\r
+                                mModifyUser,\r
+                                UserInfo,\r
+                                Info,\r
                                 &InfoSize\r
                                 );\r
     if (Status == EFI_BUFFER_TOO_SMALL) {\r
@@ -281,12 +281,12 @@ ResolveDate (
   UnicodeSPrint (\r
     Str + StrLen (Str),\r
     DateBufLen,\r
-    L"%2d:%2d:%2d", \r
+    L"%2d:%2d:%2d",\r
     Date->Hour,\r
     Date->Minute,\r
     Date->Second\r
     );\r
-  \r
+\r
   HiiSetString (mCallbackInfo->HiiHandle, DateId, Str, NULL);\r
   FreePool (Str);\r
 }\r
@@ -308,7 +308,7 @@ ResolveCount (
 {\r
   CHAR16  Count[10];\r
 \r
-  UnicodeSPrint (Count, 20, L"%d", CountVal);  \r
+  UnicodeSPrint (Count, 20, L"%d", CountVal);\r
   HiiSetString (mCallbackInfo->HiiHandle, CountId, Count, NULL);\r
 }\r
 \r
@@ -318,7 +318,7 @@ ResolveCount (
   Unicode string.\r
 \r
   @param[in, out]  Source1      On entry, point to a Null-terminated Unicode string.\r
-                                On exit, point to a new concatenated Unicode string                                \r
+                                On exit, point to a new concatenated Unicode string\r
   @param[in]       Source2      Pointer to a Null-terminated Unicode string.\r
 \r
 **/\r
@@ -380,9 +380,9 @@ ResolveIdentityPolicy (
   EFI_STRING_ID                 ProvId;\r
   EFI_HII_HANDLE                HiiHandle;\r
   EFI_USER_CREDENTIAL2_PROTOCOL *UserCredential;\r
\r
+\r
   TmpStr = NULL;\r
-  \r
+\r
   //\r
   // Resolve each policy.\r
   //\r
@@ -413,10 +413,10 @@ ResolveIdentityPolicy (
     case EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE:\r
       for (Index = 0; Index < mProviderInfo->Count; Index++) {\r
         UserCredential = mProviderInfo->Provider[Index];\r
-        if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Type)) {     \r
+        if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Type)) {\r
           UserCredential->Title (\r
-                            UserCredential, \r
-                            &HiiHandle, \r
+                            UserCredential,\r
+                            &HiiHandle,\r
                             &ProvId\r
                             );\r
           ProvStr = HiiGetString (HiiHandle, ProvId, NULL);\r
@@ -432,7 +432,7 @@ ResolveIdentityPolicy (
     case EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER:\r
       for (Index = 0; Index < mProviderInfo->Count; Index++) {\r
         UserCredential = mProviderInfo->Provider[Index];\r
-        if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Identifier)) {          \r
+        if (CompareGuid ((EFI_GUID *) (Identity + 1), &UserCredential->Identifier)) {\r
           UserCredential->Title (\r
                             UserCredential,\r
                             &HiiHandle,\r
@@ -466,7 +466,7 @@ ResolveIdentityPolicy (
   and access policy.\r
 \r
   @param[in] UserIndex       The index of the user in display list to modify.\r
-  \r
+\r
 **/\r
 VOID\r
 ModifyUserInfo (\r
@@ -527,7 +527,7 @@ ModifyUserInfo (
     }\r
     UserIndex--;\r
   }\r
-  \r
+\r
   //\r
   // Get user profile information.\r
   //\r
@@ -541,7 +541,7 @@ ModifyUserInfo (
     mUserInfo.UserName,\r
     NULL\r
     );\r
-  \r
+\r
   //\r
   // Update create date.\r
   //\r
@@ -555,7 +555,7 @@ ModifyUserInfo (
       NULL\r
       );\r
   }\r
-  \r
+\r
   //\r
   // Add usage date.\r
   //\r
@@ -569,12 +569,12 @@ ModifyUserInfo (
       NULL\r
       );\r
   }\r
-  \r
+\r
   //\r
   // Add usage count.\r
   //\r
   ResolveCount ((UINT32) mUserInfo.UsageCount, STRING_TOKEN (STR_USAGE_COUNT_VAL));\r
-  \r
+\r
   //\r
   // Add identity policy.\r
   //\r
@@ -594,7 +594,7 @@ ModifyUserInfo (
       KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_IP   // Question ID\r
       );\r
   }\r
-  \r
+\r
   //\r
   // Add access policy.\r
   //\r
@@ -643,7 +643,7 @@ ResolveAccessPolicy (
   UINT8                         *AccessData;\r
 \r
   //\r
-  // Set default value \r
+  // Set default value\r
   //\r
   mAccessInfo.AccessRight       = EFI_USER_INFO_ACCESS_ENROLL_SELF;\r
   mAccessInfo.AccessSetup       = ACCESS_SETUP_RESTRICTED;\r
@@ -653,13 +653,13 @@ ResolveAccessPolicy (
   mAccessInfo.LoadForbidLen     = 0;\r
   mAccessInfo.ConnectPermitLen  = 0;\r
   mAccessInfo.ConnectForbidLen  = 0;\r
-  \r
+\r
   //\r
   // Get each user access policy.\r
   //\r
   OffSet = 0;\r
   while (OffSet < mUserInfo.AccessPolicyLen) {\r
-    CopyMem (&Control, mUserInfo.AccessPolicy + OffSet, sizeof (Control));    \r
+    CopyMem (&Control, mUserInfo.AccessPolicy + OffSet, sizeof (Control));\r
     ValLen = Control.Size - sizeof (Control);\r
     switch (Control.Type) {\r
     case EFI_USER_INFO_ACCESS_ENROLL_SELF:\r
@@ -754,7 +754,7 @@ ResolveAccessPolicy (
   @param[in]  User         Handle of the user whose information will be searched.\r
   @param[in]  InfoType     The user information type to find.\r
   @param[out] UserInfo     Points to user information handle found.\r
-  \r
+\r
   @retval EFI_SUCCESS      Find the user information successfully.\r
   @retval Others           Fail to find the user information.\r
 \r
@@ -784,7 +784,7 @@ FindInfoByType (
   if (Info == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Get each user information.\r
   //\r
@@ -836,7 +836,7 @@ FindInfoByType (
 \r
   In this form, access right, access setup and access boot order are dynamically\r
   added. Load devicepath and connect devicepath are displayed too.\r
-  \r
+\r
 **/\r
 VOID\r
 ModidyAccessPolicy (\r
@@ -849,7 +849,7 @@ ModidyAccessPolicy (
   EFI_IFR_GUID_LABEL  *StartLabel;\r
   EFI_IFR_GUID_LABEL  *EndLabel;\r
   VOID                *DefaultOpCodeHandle;\r
-  \r
+\r
   //\r
   // Initialize the container for dynamic opcodes.\r
   //\r
@@ -893,7 +893,7 @@ ModidyAccessPolicy (
   ASSERT (OptionsOpCodeHandle != NULL);\r
   DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (DefaultOpCodeHandle != NULL);\r
-  \r
+\r
   HiiCreateOneOfOptionOpCode (\r
     OptionsOpCodeHandle,\r
     STRING_TOKEN (STR_NORMAL),\r
@@ -919,12 +919,12 @@ ModidyAccessPolicy (
     );\r
 \r
   HiiCreateDefaultOpCode (\r
-    DefaultOpCodeHandle, \r
-    EFI_HII_DEFAULT_CLASS_STANDARD, \r
-    EFI_IFR_NUMERIC_SIZE_1, \r
+    DefaultOpCodeHandle,\r
+    EFI_HII_DEFAULT_CLASS_STANDARD,\r
+    EFI_IFR_NUMERIC_SIZE_1,\r
     mAccessInfo.AccessRight\r
     );\r
\r
+\r
   HiiCreateOneOfOpCode (\r
     StartOpCodeHandle,                    // Container for dynamic created opcodes\r
     KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_AP | KEY_MODIFY_RIGHT, // Question ID\r
@@ -948,7 +948,7 @@ ModidyAccessPolicy (
   ASSERT (OptionsOpCodeHandle != NULL);\r
   DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (DefaultOpCodeHandle != NULL);\r
-  \r
+\r
   HiiCreateOneOfOptionOpCode (\r
     OptionsOpCodeHandle,\r
     STRING_TOKEN (STR_RESTRICTED),\r
@@ -956,7 +956,7 @@ ModidyAccessPolicy (
     EFI_IFR_NUMERIC_SIZE_1,\r
     ACCESS_SETUP_RESTRICTED\r
     );\r
-    \r
+\r
   HiiCreateOneOfOptionOpCode (\r
     OptionsOpCodeHandle,\r
     STRING_TOKEN (STR_NORMAL),\r
@@ -974,11 +974,11 @@ ModidyAccessPolicy (
     );\r
 \r
   HiiCreateDefaultOpCode (\r
-    DefaultOpCodeHandle, \r
-    EFI_HII_DEFAULT_CLASS_STANDARD, \r
-    EFI_IFR_NUMERIC_SIZE_1, \r
+    DefaultOpCodeHandle,\r
+    EFI_HII_DEFAULT_CLASS_STANDARD,\r
+    EFI_IFR_NUMERIC_SIZE_1,\r
     mAccessInfo.AccessSetup\r
-    );    \r
+    );\r
 \r
   HiiCreateOneOfOpCode (\r
     StartOpCodeHandle,                    // Container for dynamic created opcodes\r
@@ -994,7 +994,7 @@ ModidyAccessPolicy (
     );\r
   HiiFreeOpCodeHandle (DefaultOpCodeHandle);\r
   HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
-  \r
+\r
   //\r
   // Add boot order one-of-code.\r
   //\r
@@ -1002,7 +1002,7 @@ ModidyAccessPolicy (
   ASSERT (OptionsOpCodeHandle != NULL);\r
   DefaultOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (DefaultOpCodeHandle != NULL);\r
-  \r
+\r
   HiiCreateOneOfOptionOpCode (\r
     OptionsOpCodeHandle,\r
     STRING_TOKEN (STR_INSERT),\r
@@ -1026,7 +1026,7 @@ ModidyAccessPolicy (
     EFI_IFR_NUMERIC_SIZE_4,\r
     EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE\r
     );\r
-    \r
+\r
   HiiCreateOneOfOptionOpCode (\r
     OptionsOpCodeHandle,\r
     STRING_TOKEN (STR_NODEFAULT),\r
@@ -1036,12 +1036,12 @@ ModidyAccessPolicy (
     );\r
 \r
   HiiCreateDefaultOpCode (\r
-    DefaultOpCodeHandle, \r
-    EFI_HII_DEFAULT_CLASS_STANDARD, \r
-    EFI_IFR_NUMERIC_SIZE_4, \r
+    DefaultOpCodeHandle,\r
+    EFI_HII_DEFAULT_CLASS_STANDARD,\r
+    EFI_IFR_NUMERIC_SIZE_4,\r
     mAccessInfo.AccessBootOrder\r
     );\r
-    \r
+\r
   HiiCreateOneOfOpCode (\r
     StartOpCodeHandle,                  // Container for dynamic created opcodes\r
     KEY_MODIFY_USER | KEY_SELECT_USER | KEY_MODIFY_AP | KEY_MODIFY_BOOT, // Question ID\r
@@ -1054,7 +1054,7 @@ ModidyAccessPolicy (
     OptionsOpCodeHandle,                // Option Opcode list\r
     DefaultOpCodeHandle                 // Default Opcode\r
     );\r
-  HiiFreeOpCodeHandle (DefaultOpCodeHandle);    \r
+  HiiFreeOpCodeHandle (DefaultOpCodeHandle);\r
   HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
 \r
   //\r
@@ -1078,7 +1078,7 @@ ModidyAccessPolicy (
 \r
   @param[in] ValidLen       The valid access policy length.\r
   @param[in] ExpandLen      The length that is needed to expand.\r
-    \r
+\r
 **/\r
 VOID\r
 ExpandMemory (\r
@@ -1107,7 +1107,7 @@ ExpandMemory (
 \r
 \r
 /**\r
-  Get the username from user input, and update username string in the Hii \r
+  Get the username from user input, and update username string in the Hii\r
   database with it.\r
 \r
 **/\r
@@ -1142,7 +1142,7 @@ ModifyUserName (
     }\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Check whether the username had been used or not.\r
   //\r
@@ -1178,15 +1178,15 @@ ModifyUserName (
     FreePool (Info);\r
     return ;\r
   }\r
-  \r
+\r
   //\r
   // Update username display in the form.\r
   //\r
   CopyMem (mUserInfo.UserName, UserName, Len);\r
   HiiSetString (\r
-    mCallbackInfo->HiiHandle, \r
-    STRING_TOKEN (STR_USER_NAME_VAL), \r
-    mUserInfo.UserName, \r
+    mCallbackInfo->HiiHandle,\r
+    STRING_TOKEN (STR_USER_NAME_VAL),\r
+    mUserInfo.UserName,\r
     NULL\r
     );\r
 \r
@@ -1303,7 +1303,7 @@ ModifyIdentityPolicy (
 \r
     HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
   }\r
-  \r
+\r
   //\r
   // Add logical connector Option OpCode.\r
   //\r
@@ -1345,8 +1345,8 @@ ModifyIdentityPolicy (
   // Update identity policy in the form.\r
   //\r
   ResolveIdentityPolicy (\r
-    mUserInfo.IdentityPolicy, \r
-    mUserInfo.IdentityPolicyLen, \r
+    mUserInfo.IdentityPolicy,\r
+    mUserInfo.IdentityPolicyLen,\r
     STRING_TOKEN (STR_IDENTIFY_POLICY_VALUE)\r
     );\r
 \r
@@ -1404,7 +1404,7 @@ GetAccessRight (
   if (Info == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
\r
+\r
   //\r
   // Get user access information.\r
   //\r
@@ -1445,7 +1445,7 @@ GetAccessRight (
     if (EFI_ERROR (Status)) {\r
       break;\r
     }\r
-    \r
+\r
     //\r
     // Check user information.\r
     //\r
index 490a8b34174db39eedb6f0b626de3d97078f825d..87994587da06fe4c2c72ba659ea3ea10a14971b8 100644 (file)
@@ -2,13 +2,13 @@
   Implement authentication services for the authenticated variable\r
   service in UEFI2.2.\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -61,13 +61,13 @@ AutenticatedVariableServiceInitialize (
   mVariableModuleGlobal->HashContext[Physical] = AllocateRuntimePool (CtxSize);\r
   ASSERT (mVariableModuleGlobal->HashContext[Physical] != NULL);\r
   //\r
-  // Check "AuthVarKeyDatabase" variable's existence. \r
-  // If it doesn't exist, create a new one with initial value of 0 and EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set. \r
+  // Check "AuthVarKeyDatabase" variable's existence.\r
+  // If it doesn't exist, create a new one with initial value of 0 and EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set.\r
   //\r
   Status = FindVariable (\r
-             mVariableModuleGlobal->VariableName[Physical][VAR_AUTH_KEY_DB], \r
-             &gEfiAuthenticatedVariableGuid, \r
-             &Variable, \r
+             mVariableModuleGlobal->VariableName[Physical][VAR_AUTH_KEY_DB],\r
+             &gEfiAuthenticatedVariableGuid,\r
+             &Variable,\r
              &mVariableModuleGlobal->VariableGlobal[Physical],\r
              mVariableModuleGlobal->FvbInstance\r
              );\r
@@ -96,10 +96,10 @@ AutenticatedVariableServiceInitialize (
     // Load database in global variable for cache.\r
     //\r
     Valid = IsValidVariableHeader (\r
-              Variable.CurrPtr, \r
-              Variable.Volatile, \r
-              &mVariableModuleGlobal->VariableGlobal[Physical], \r
-              mVariableModuleGlobal->FvbInstance, \r
+              Variable.CurrPtr,\r
+              Variable.Volatile,\r
+              &mVariableModuleGlobal->VariableGlobal[Physical],\r
+              mVariableModuleGlobal->FvbInstance,\r
               &VariableHeader\r
               );\r
     ASSERT (Valid);\r
@@ -117,23 +117,23 @@ AutenticatedVariableServiceInitialize (
     mPubKeyNumber = (UINT32) (DataSize / EFI_CERT_TYPE_RSA2048_SIZE);\r
   }\r
   //\r
-  // Check "SetupMode" variable's existence. \r
+  // Check "SetupMode" variable's existence.\r
   // If it doesn't exist, check PK database's existence to determine the value.\r
-  // Then create a new one with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set. \r
+  // Then create a new one with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set.\r
   //\r
   Status = FindVariable (\r
-             mVariableModuleGlobal->VariableName[Physical][VAR_SETUP_MODE], \r
-             &gEfiGlobalVariableGuid, \r
-             &Variable, \r
+             mVariableModuleGlobal->VariableName[Physical][VAR_SETUP_MODE],\r
+             &gEfiGlobalVariableGuid,\r
+             &Variable,\r
              &mVariableModuleGlobal->VariableGlobal[Physical],\r
              mVariableModuleGlobal->FvbInstance\r
              );\r
 \r
   if (Variable.CurrPtr == 0x0) {\r
     Status = FindVariable (\r
-               mVariableModuleGlobal->VariableName[Physical][VAR_PLATFORM_KEY], \r
-               &gEfiGlobalVariableGuid, \r
-               &Variable, \r
+               mVariableModuleGlobal->VariableName[Physical][VAR_PLATFORM_KEY],\r
+               &gEfiGlobalVariableGuid,\r
+               &Variable,\r
                &mVariableModuleGlobal->VariableGlobal[Physical],\r
                mVariableModuleGlobal->FvbInstance\r
                );\r
@@ -169,13 +169,13 @@ AutenticatedVariableServiceInitialize (
       );\r
   }\r
   //\r
-  // Check "SignatureSupport" variable's existence. \r
-  // If it doesn't exist, then create a new one with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set. \r
+  // Check "SignatureSupport" variable's existence.\r
+  // If it doesn't exist, then create a new one with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set.\r
   //\r
   Status = FindVariable (\r
-             EFI_SIGNATURE_SUPPORT_NAME, \r
-             &gEfiGlobalVariableGuid, \r
-             &Variable, \r
+             EFI_SIGNATURE_SUPPORT_NAME,\r
+             &gEfiGlobalVariableGuid,\r
+             &Variable,\r
              &mVariableModuleGlobal->VariableGlobal[Physical],\r
              mVariableModuleGlobal->FvbInstance\r
              );\r
@@ -364,7 +364,7 @@ VerifyDataPayload (
   //\r
   Rsa = RsaNew ();\r
   ASSERT (Rsa != NULL);\r
-  // \r
+  //\r
   // Set RSA Key Components.\r
   // NOTE: Only N and E are needed to be set as RSA public key for signature verification.\r
   //\r
@@ -380,10 +380,10 @@ VerifyDataPayload (
   // Verify the signature.\r
   //\r
   Status = RsaPkcs1Verify (\r
-             Rsa, \r
-             Digest, \r
-             SHA256_DIGEST_SIZE, \r
-             CertBlock->Signature, \r
+             Rsa,\r
+             Digest,\r
+             SHA256_DIGEST_SIZE,\r
+             CertBlock->Signature,\r
              EFI_CERT_TYPE_RSA2048_SHA256_SIZE\r
              );\r
 \r
@@ -419,9 +419,9 @@ UpdatePlatformMode (
   UINT32                  VarAttr;\r
 \r
   Status = FindVariable (\r
-             Global->VariableName[VirtualMode][VAR_SETUP_MODE], \r
-             Global->GlobalVariableGuid[VirtualMode], \r
-             &Variable, \r
+             Global->VariableName[VirtualMode][VAR_SETUP_MODE],\r
+             Global->GlobalVariableGuid[VirtualMode],\r
+             &Variable,\r
              &Global->VariableGlobal[VirtualMode],\r
              Global->FvbInstance\r
              );\r
@@ -459,8 +459,8 @@ UpdatePlatformMode (
   @param[in]  IsPk                        Indicates whether to process pk.\r
 \r
   @retval EFI_INVALID_PARAMETER           Invalid parameter.\r
-  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation \r
-                                          check carried out by the firmware. \r
+  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable passed validation successfully.\r
 \r
 **/\r
@@ -507,10 +507,10 @@ ProcessVarWithPk (
 \r
     if (Variable->CurrPtr != 0x0) {\r
       Valid = IsValidVariableHeader (\r
-                Variable->CurrPtr, \r
-                Variable->Volatile, \r
-                &Global->VariableGlobal[VirtualMode], \r
-                Global->FvbInstance, \r
+                Variable->CurrPtr,\r
+                Variable->Volatile,\r
+                &Global->VariableGlobal[VirtualMode],\r
+                Global->FvbInstance,\r
                 &VariableHeader\r
                 );\r
       ASSERT (Valid);\r
@@ -526,9 +526,9 @@ ProcessVarWithPk (
     // Get platform key from variable.\r
     //\r
     Status = FindVariable (\r
-               Global->VariableName[VirtualMode][VAR_PLATFORM_KEY], \r
-               Global->GlobalVariableGuid[VirtualMode], \r
-               &PkVariable, \r
+               Global->VariableName[VirtualMode][VAR_PLATFORM_KEY],\r
+               Global->GlobalVariableGuid[VirtualMode],\r
+               &PkVariable,\r
                &Global->VariableGlobal[VirtualMode],\r
                Global->FvbInstance\r
                );\r
@@ -548,14 +548,14 @@ ProcessVarWithPk (
     Status    = VerifyDataPayload (VirtualMode, Global, Data, DataSize, OldPkData->SignatureData);\r
     if (!EFI_ERROR (Status)) {\r
       Status = UpdateVariable (\r
-                 VariableName, \r
-                 VendorGuid, \r
-                 (UINT8*)Data + AUTHINFO_SIZE, \r
-                 DataSize - AUTHINFO_SIZE, \r
-                 Attributes, \r
-                 0, \r
-                 CertData->MonotonicCount, \r
-                 VirtualMode, \r
+                 VariableName,\r
+                 VendorGuid,\r
+                 (UINT8*)Data + AUTHINFO_SIZE,\r
+                 DataSize - AUTHINFO_SIZE,\r
+                 Attributes,\r
+                 0,\r
+                 CertData->MonotonicCount,\r
+                 VirtualMode,\r
                  Global,\r
                  Variable\r
                  );\r
@@ -596,8 +596,8 @@ ProcessVarWithPk (
   @param[in]  Attributes                  The attribute value of the variable.\r
 \r
   @retval EFI_INVALID_PARAMETER           Invalid parameter.\r
-  @retval EFI_SECURITY_VIOLATION          The variable did NOT pass the validation \r
-                                          check carried out by the firmware. \r
+  @retval EFI_SECURITY_VIOLATION          The variable did NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable passed validation successfully.\r
 \r
 **/\r
@@ -640,10 +640,10 @@ ProcessVarWithKek (
     CertBlock = (EFI_CERT_BLOCK_RSA_2048_SHA256 *) (CertData->AuthInfo.CertData);\r
     if (Variable->CurrPtr != 0x0) {\r
       Valid = IsValidVariableHeader (\r
-                Variable->CurrPtr, \r
-                Variable->Volatile, \r
-                &Global->VariableGlobal[VirtualMode], \r
-                Global->FvbInstance, \r
+                Variable->CurrPtr,\r
+                Variable->Volatile,\r
+                &Global->VariableGlobal[VirtualMode],\r
+                Global->FvbInstance,\r
                 &VariableHeader\r
                 );\r
       ASSERT (Valid);\r
@@ -659,9 +659,9 @@ ProcessVarWithKek (
     // Get KEK database from variable.\r
     //\r
     Status = FindVariable (\r
-               Global->VariableName[VirtualMode][VAR_KEY_EXCHANGE_KEY], \r
-               Global->GlobalVariableGuid[VirtualMode], \r
-               &KekVariable, \r
+               Global->VariableName[VirtualMode][VAR_KEY_EXCHANGE_KEY],\r
+               Global->GlobalVariableGuid[VirtualMode],\r
+               &KekVariable,\r
                &Global->VariableGlobal[VirtualMode],\r
                Global->FvbInstance\r
                );\r
@@ -698,13 +698,13 @@ ProcessVarWithKek (
     Status = VerifyDataPayload (VirtualMode, Global, Data, DataSize, CertBlock->PublicKey);\r
     if (!EFI_ERROR (Status)) {\r
       Status = UpdateVariable (\r
-                 VariableName, \r
-                 VendorGuid, \r
-                 (UINT8*)Data + AUTHINFO_SIZE, \r
-                 DataSize - AUTHINFO_SIZE, \r
-                 Attributes, \r
-                 0, \r
-                 CertData->MonotonicCount, \r
+                 VariableName,\r
+                 VendorGuid,\r
+                 (UINT8*)Data + AUTHINFO_SIZE,\r
+                 DataSize - AUTHINFO_SIZE,\r
+                 Attributes,\r
+                 0,\r
+                 CertData->MonotonicCount,\r
                  VirtualMode,\r
                  Global,\r
                  Variable\r
@@ -715,13 +715,13 @@ ProcessVarWithKek (
     // If in setup mode, no authentication needed.\r
     //\r
     Status = UpdateVariable (\r
-               VariableName, \r
-               VendorGuid, \r
-               Data, \r
-               DataSize, \r
-               Attributes, \r
-               0, \r
-               0, \r
+               VariableName,\r
+               VendorGuid,\r
+               Data,\r
+               DataSize,\r
+               Attributes,\r
+               0,\r
+               0,\r
                VirtualMode,\r
                Global,\r
                Variable\r
@@ -748,8 +748,8 @@ ProcessVarWithKek (
   @retval EFI_WRITE_PROTECTED             The variable is write-protected and needs authentication with\r
                                           EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set.\r
   @retval EFI_SECURITY_VIOLATION          The variable is with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
-                                          set, but the AuthInfo does NOT pass the validation \r
-                                          check carried out by the firmware. \r
+                                          set, but the AuthInfo does NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable is not write-protected, or passed validation successfully.\r
 \r
 **/\r
@@ -789,10 +789,10 @@ VerifyVariable (
   ZeroMem (&VariableHeader, sizeof (AUTHENTICATED_VARIABLE_HEADER));\r
   if (Variable->CurrPtr != 0x0) {\r
     Valid = IsValidVariableHeader (\r
-              Variable->CurrPtr, \r
-              Variable->Volatile, \r
-              &Global->VariableGlobal[VirtualMode], \r
-              Global->FvbInstance, \r
+              Variable->CurrPtr,\r
+              Variable->Volatile,\r
+              &Global->VariableGlobal[VirtualMode],\r
+              Global->FvbInstance,\r
               &VariableHeader\r
               );\r
     ASSERT (Valid);\r
@@ -820,7 +820,7 @@ VerifyVariable (
       *KeyIndex   = VariableHeader.PubKeyIndex;\r
       IsFirstTime = FALSE;\r
     }\r
-  } else if (Valid && (VariableHeader.Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) { \r
+  } else if (Valid && (VariableHeader.Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {\r
       //\r
       // If the variable is already write-protected, it always needs authentication before update.\r
       //\r
@@ -864,7 +864,7 @@ VerifyVariable (
       //\r
       return EFI_SECURITY_VIOLATION;\r
     }\r
-  } \r
+  }\r
   //\r
   // Verify the certificate in Data payload.\r
   //\r
index f3e15f61e22f16ce984f5ab02a1cd3dfb5bbb377..9df30201166a3a3bf20cbd6c0432416713e9b954 100644 (file)
@@ -2,13 +2,13 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by AuthService module.\r
 \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -46,8 +46,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @retval EFI_WRITE_PROTECTED             The variable is write-protected and needs authentication with\r
                                           EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set.\r
   @retval EFI_SECURITY_VIOLATION          The variable is with EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
-                                          set, but the AuthInfo does NOT pass the validation \r
-                                          check carried out by the firmware. \r
+                                          set, but the AuthInfo does NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable is not write-protected, or passed validation successfully.\r
 \r
 **/\r
@@ -99,8 +99,8 @@ CryptLibraryInitialize (
   @param[in]  IsPk                        Indicates whether to process pk.\r
 \r
   @retval EFI_INVALID_PARAMETER           Invalid parameter.\r
-  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation \r
-                                          check carried out by the firmware. \r
+  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable passed validation successfully.\r
 \r
 **/\r
@@ -131,8 +131,8 @@ ProcessVarWithPk (
   @param[in]  Attributes                  The attribute value of the variable.\r
 \r
   @retval EFI_INVALID_PARAMETER           Invalid parameter.\r
-  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation \r
-                                          check carried out by the firmware. \r
+  @retval EFI_SECURITY_VIOLATION          The variable does NOT pass the validation\r
+                                          check carried out by the firmware.\r
   @retval EFI_SUCCESS                     The variable passed validation successfully.\r
 \r
 **/\r
index 16caa30dadefb5e7beed580a0dc5a4ff505ac303..fcfda3d452bf2e7b98536592212d7bae72bd3415 100644 (file)
@@ -4,7 +4,7 @@
 #  This module installs variable arch protocol and variable write arch protocol to provide\r
 #  four EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName and QueryVariableInfo.\r
 #\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution. The full text of the license may be found at\r
@@ -29,7 +29,7 @@
 #\r
 #  VALID_ARCHITECTURES           = IPF\r
 #\r
-#  VIRTUAL_ADDRESS_MAP_CALLBACK  =  VariableClassAddressChangeEvent              \r
+#  VIRTUAL_ADDRESS_MAP_CALLBACK  =  VariableClassAddressChangeEvent\r
 #\r
 \r
 [Sources.common]\r
   ## CONSUMES             ## Variable:L"SignatureSupport"\r
   ## PRODUCES             ## Variable:L"SignatureSupport"\r
   gEfiGlobalVariableGuid\r
-  \r
+\r
   ## PRODUCES             ## GUID # Variable store header\r
   ## CONSUMES             ## GUID # Variable store header\r
   ## SOMETIMES_CONSUMES   ## HOB\r
   ## SOMETIMES_PRODUCES   ## SystemTable\r
   gEfiAuthenticatedVariableGuid\r
-  \r
+\r
   gEfiEventVirtualAddressChangeGuid             ## CONSUMES               ## Event\r
   gEfiCertRsa2048Sha256Guid                     ## CONSUMES               ## GUID        # Unique ID for the format of the CertType.\r
 \r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize          ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize                     ## CONSUMES\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize                      ## CONSUMES\r
-  \r
+\r
 [FeaturePcd.common]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics             ## CONSUMES    # statistic the information of variable.\r
 \r
 [Depex]\r
-  gEfiExtendedSalFvBlockServicesProtocolGuid AND gEfiFaultTolerantWriteProtocolGuid  \r
+  gEfiExtendedSalFvBlockServicesProtocolGuid AND gEfiFaultTolerantWriteProtocolGuid\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
-  EsalVariableDxeSalExtra.uni
\ No newline at end of file
+  EsalVariableDxeSalExtra.uni\r
index cb6589521092345b7d35049842549cacea1f6fa0..6b3342c8060183432ddb5043795d7b61dd6ec7c5 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // EsalVariableDxeSal Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Esal Authenticated Variable DXE"\r
 \r
 \r
index 0f1d6456225051115dbb4d281ec32370b52789ee..a9e739dd25e907de6da2c6a819338e168edea893 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Entrypoint of Extended SAL variable service module.\r
 \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -55,7 +55,7 @@ EsalVariableCommonEntry (
   )\r
 {\r
   SAL_RETURN_REGS ReturnVal;\r
-  \r
+\r
   ReturnVal.r9  = 0;\r
   ReturnVal.r10 = 0;\r
   ReturnVal.r11 = 0;\r
index 1cbf9ac877836232193c63f792d2fd8229bb0abb..898974cba5ee7864aaa67d553b9dd51ca7d76df0 100644 (file)
@@ -2,13 +2,13 @@
   Handles non-volatile variable store garbage collection, using FTW\r
   (Fault Tolerant Write) protocol.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
index dfa85973f4918128e597eb1aa42dd12be18e4e74..b8a0af4b5cb2c9d088b724ffe581eb4c098cf121 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The implementation of Extended SAL variable services.\r
 \r
-Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -162,7 +162,7 @@ AccessVariableStore (
     if ((StartAddress + DataSize) > ((UINTN) ((UINT8 *) VolatileBase + VolatileBase->Size))) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     //\r
     // For volatile variable, a simple memory copy is enough.\r
     //\r
@@ -181,13 +181,13 @@ AccessVariableStore (
   Status = (EFI_STATUS) EsalCall (\r
                           EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                           EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                          GetPhysicalAddressFunctionId, \r
-                          Instance, \r
-                          (UINT64) &FvVolHdr, \r
-                          0, \r
-                          0, \r
-                          0, \r
-                          0, \r
+                          GetPhysicalAddressFunctionId,\r
+                          Instance,\r
+                          (UINT64) &FvVolHdr,\r
+                          0,\r
+                          0,\r
+                          0,\r
+                          0,\r
                           0\r
                           ).Status;\r
   ASSERT_EFI_ERROR (Status);\r
@@ -199,7 +199,7 @@ AccessVariableStore (
   if ((StartAddress + DataSize) > ((EFI_PHYSICAL_ADDRESS) (UINTN) ((CHAR8 *)VariableStoreHeader + VariableStoreHeader->Size))) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   LinearOffset  = (UINTN) FwVolHeader;\r
   CurrWritePtr  = StartAddress;\r
   CurrWriteSize = DataSize;\r
@@ -227,26 +227,26 @@ AccessVariableStore (
             Status = (EFI_STATUS) EsalCall (\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                                    WriteFunctionId, \r
-                                    Instance, \r
-                                    LbaNumber, \r
-                                    (CurrWritePtr - LinearOffset), \r
-                                    (UINT64) &CurrWriteSize, \r
-                                    (UINT64) CurrBuffer, \r
-                                    0, \r
+                                    WriteFunctionId,\r
+                                    Instance,\r
+                                    LbaNumber,\r
+                                    (CurrWritePtr - LinearOffset),\r
+                                    (UINT64) &CurrWriteSize,\r
+                                    (UINT64) CurrBuffer,\r
+                                    0,\r
                                     0\r
                                     ).Status;\r
           } else {\r
             Status = (EFI_STATUS) EsalCall (\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                                    ReadFunctionId, \r
-                                    Instance, \r
-                                    LbaNumber, \r
-                                    (CurrWritePtr - LinearOffset), \r
-                                    (UINT64) &CurrWriteSize, \r
-                                    (UINT64) CurrBuffer, \r
-                                    0, \r
+                                    ReadFunctionId,\r
+                                    Instance,\r
+                                    LbaNumber,\r
+                                    (CurrWritePtr - LinearOffset),\r
+                                    (UINT64) &CurrWriteSize,\r
+                                    (UINT64) CurrBuffer,\r
+                                    0,\r
                                     0\r
                                     ).Status;\r
           }\r
@@ -260,26 +260,26 @@ AccessVariableStore (
             Status = (EFI_STATUS) EsalCall (\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                                    WriteFunctionId, \r
-                                    Instance, \r
-                                    LbaNumber, \r
-                                    (CurrWritePtr - LinearOffset), \r
-                                    (UINT64) &Size, \r
-                                    (UINT64) CurrBuffer, \r
-                                    0, \r
+                                    WriteFunctionId,\r
+                                    Instance,\r
+                                    LbaNumber,\r
+                                    (CurrWritePtr - LinearOffset),\r
+                                    (UINT64) &Size,\r
+                                    (UINT64) CurrBuffer,\r
+                                    0,\r
                                     0\r
                                     ).Status;\r
           } else {\r
             Status = (EFI_STATUS) EsalCall (\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                                     EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                                    ReadFunctionId, \r
-                                    Instance, \r
-                                    LbaNumber, \r
-                                    (CurrWritePtr - LinearOffset), \r
-                                    (UINT64) &Size, \r
-                                    (UINT64) CurrBuffer, \r
-                                    0, \r
+                                    ReadFunctionId,\r
+                                    Instance,\r
+                                    LbaNumber,\r
+                                    (CurrWritePtr - LinearOffset),\r
+                                    (UINT64) &Size,\r
+                                    (UINT64) CurrBuffer,\r
+                                    0,\r
                                     0\r
                                     ).Status;\r
           }\r
@@ -332,7 +332,7 @@ GetVarStoreHeader (
              Instance,\r
              VarStoreAddress,\r
              sizeof (VARIABLE_STORE_HEADER),\r
-             VarStoreHeader    \r
+             VarStoreHeader\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 }\r
@@ -372,7 +372,7 @@ IsValidVariableHeader (
              Instance,\r
              VariableAddress,\r
              sizeof (AUTHENTICATED_VARIABLE_HEADER),\r
-             &LocalVariableHeader    \r
+             &LocalVariableHeader\r
              );\r
 \r
   if (EFI_ERROR (Status) || LocalVariableHeader.StartId != VARIABLE_DATA) {\r
@@ -520,7 +520,7 @@ GetVariableNamePtr (
              Instance,\r
              Address,\r
              VariableHeader.NameSize,\r
-             VariableName    \r
+             VariableName\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 }\r
@@ -571,7 +571,7 @@ GetVariableDataPtr (
              Instance,\r
              Address,\r
              VariableHeader.DataSize,\r
-             VariableData    \r
+             VariableData\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 }\r
@@ -626,7 +626,7 @@ GetNextVariablePtr (
 /**\r
   Gets the pointer to the first variable header in given variable store area.\r
 \r
-  This function gets the pointer to the first variable header in given variable \r
+  This function gets the pointer to the first variable header in given variable\r
   store area. The variable store area is given by its start address.\r
 \r
   @param[in] VarStoreHeaderAddress  Pointer to the header of variable store area.\r
@@ -675,7 +675,7 @@ GetEndPointer (
              Instance,\r
              VarStoreHeaderAddress,\r
              sizeof (VARIABLE_STORE_HEADER),\r
-             &VariableStoreHeader    \r
+             &VariableStoreHeader\r
              );\r
 \r
   ASSERT_EFI_ERROR (Status);\r
@@ -685,12 +685,12 @@ GetEndPointer (
 /**\r
   Updates variable info entry in EFI system table for statistical information.\r
 \r
-  Routine used to track statistical information about variable usage. \r
+  Routine used to track statistical information about variable usage.\r
   The data is stored in the EFI system table so it can be accessed later.\r
-  VariableInfo.efi can dump out the table. Only Boot Services variable \r
+  VariableInfo.efi can dump out the table. Only Boot Services variable\r
   accesses are tracked by this code. The PcdVariableCollectStatistics\r
-  build flag controls if this feature is enabled. \r
-  A read that hits in the cache will have Read and Cache true for \r
+  build flag controls if this feature is enabled.\r
+  A read that hits in the cache will have Read and Cache true for\r
   the transaction. Data is allocated by this routine, but never\r
   freed.\r
 \r
@@ -742,7 +742,7 @@ UpdateVariableInfo (
       gBS->InstallConfigurationTable (&gEfiAuthenticatedVariableGuid, gVariableInfo);\r
     }\r
 \r
-    \r
+\r
     for (Entry = gVariableInfo; Entry != NULL; Entry = Entry->Next) {\r
       if (CompareGuid (VendorGuid, &Entry->VendorGuid)) {\r
         if (StrCmp (VariableName, Entry->Name) == 0) {\r
@@ -826,7 +826,7 @@ UpdateVariableCache (
   //\r
   for (Index = 0, Entry = mVariableCache; Index < sizeof (mVariableCache)/sizeof (VARIABLE_CACHE_ENTRY); Index++, Entry++) {\r
     if (CompareGuid (VendorGuid, Entry->Guid)) {\r
-      if (StrCmp (VariableName, Entry->Name) == 0) { \r
+      if (StrCmp (VariableName, Entry->Name) == 0) {\r
         Entry->Attributes = Attributes;\r
         if (DataSize == 0) {\r
           //\r
@@ -928,7 +928,7 @@ FindVariableInCache (
       }\r
     }\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -1003,7 +1003,7 @@ FindVariable (
       Volatile = FALSE;\r
     }\r
     while (IsValidVariableHeader (Variable[Index], Volatile, Global, Instance, &VariableHeader)) {\r
-      if (VariableHeader.State == VAR_ADDED || \r
+      if (VariableHeader.State == VAR_ADDED ||\r
           VariableHeader.State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)\r
          ) {\r
         if (!EfiAtRuntime () || ((VariableHeader.Attributes & EFI_VARIABLE_RUNTIME_ACCESS) != 0)) {\r
@@ -1162,7 +1162,7 @@ Reclaim (
     //\r
     // Collect VAR_ADDED variables, and variables in delete transition status.\r
     //\r
-    if (VariableHeader.State == VAR_ADDED || \r
+    if (VariableHeader.State == VAR_ADDED ||\r
         VariableHeader.State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)\r
        ) {\r
       VariableSize = NextVariable - Variable;\r
@@ -1173,9 +1173,9 @@ Reclaim (
   }\r
 \r
   //\r
-  // Reserve the 1 Bytes with Oxff to identify the \r
-  // end of the variable buffer. \r
-  // \r
+  // Reserve the 1 Bytes with Oxff to identify the\r
+  // end of the variable buffer.\r
+  //\r
   MaximumBufferSize += 1;\r
   ValidBuffer = AllocatePool (MaximumBufferSize);\r
   if (ValidBuffer == NULL) {\r
@@ -1192,7 +1192,7 @@ Reclaim (
 \r
   //\r
   // Reinstall all ADDED variables\r
-  // \r
+  //\r
   Variable = GetStartPointer (VariableBase);\r
   while (IsValidVariableHeader (Variable, IsVolatile, VariableGlobal, Instance, &VariableHeader)) {\r
     NextVariable = GetNextVariablePtr (Variable, IsVolatile, VariableGlobal, Instance);\r
@@ -1210,17 +1210,17 @@ Reclaim (
   }\r
   //\r
   // Reinstall in delete transition variables\r
-  // \r
+  //\r
   Variable = GetStartPointer (VariableBase);\r
   while (IsValidVariableHeader (Variable, IsVolatile, VariableGlobal, Instance, &VariableHeader)) {\r
     NextVariable = GetNextVariablePtr (Variable, IsVolatile, VariableGlobal, Instance);\r
     if (VariableHeader.State == (VAR_IN_DELETED_TRANSITION & VAR_ADDED)) {\r
 \r
       //\r
-      // Buffer has cached all ADDED variable. \r
+      // Buffer has cached all ADDED variable.\r
       // Per IN_DELETED variable, we have to guarantee that\r
-      // no ADDED one in previous buffer. \r
-      // \r
+      // no ADDED one in previous buffer.\r
+      //\r
       FoundAdded = FALSE;\r
       AddedVariable = GetStartPointer ((EFI_PHYSICAL_ADDRESS) ValidBuffer);\r
       while (IsValidVariableHeader (AddedVariable, IsVolatile, VariableGlobal, Instance, &AddedVariableHeader)) {\r
@@ -1327,7 +1327,7 @@ GetIndexFromSupportedLangCodes(
   IN  CHAR8            *SupportedLang,\r
   IN  CHAR8            *Lang,\r
   IN  BOOLEAN          Iso639Language\r
-  ) \r
+  )\r
 {\r
   UINTN    Index;\r
   UINTN    CompareLength;\r
@@ -1362,8 +1362,8 @@ GetIndexFromSupportedLangCodes(
       // Determine the length of the next language code in SupportedLang\r
       //\r
       for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++);\r
-      \r
-      if ((CompareLength == LanguageLength) && \r
+\r
+      if ((CompareLength == LanguageLength) &&\r
           (AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) {\r
         //\r
         // Successfully find the index of Lang string in SupportedLang string.\r
@@ -1465,10 +1465,10 @@ GetLangFromSupportedLangCodes (
 }\r
 \r
 /**\r
-  Returns a pointer to an allocated buffer that contains the best matching language \r
-  from a set of supported languages.  \r
-  \r
-  This function supports both ISO 639-2 and RFC 4646 language codes, but language \r
+  Returns a pointer to an allocated buffer that contains the best matching language\r
+  from a set of supported languages.\r
+\r
+  This function supports both ISO 639-2 and RFC 4646 language codes, but language\r
   code types may not be mixed in a single call to this function. This function\r
   supports a variable argument list that allows the caller to pass in a prioritized\r
   list of language codes to test against all the language codes in SupportedLanguages.\r
@@ -1476,37 +1476,37 @@ GetLangFromSupportedLangCodes (
   If SupportedLanguages is NULL, then ASSERT().\r
 \r
   @param[in]  SupportedLanguages  A pointer to a Null-terminated ASCII string that\r
-                                  contains a set of language codes in the format \r
+                                  contains a set of language codes in the format\r
                                   specified by Iso639Language.\r
   @param[in]  Iso639Language      If TRUE, then all language codes are assumed to be\r
                                   in ISO 639-2 format.  If FALSE, then all language\r
                                   codes are assumed to be in RFC 4646 language format.\r
   @param[in]  VirtualMode         Current calling mode for this function.\r
-  @param[in]  ...                 A variable argument list that contains pointers to \r
+  @param[in]  ...                 A variable argument list that contains pointers to\r
                                   Null-terminated ASCII strings that contain one or more\r
                                   language codes in the format specified by Iso639Language.\r
                                   The first language code from each of these language\r
                                   code lists is used to determine if it is an exact or\r
-                                  close match to any of the language codes in \r
+                                  close match to any of the language codes in\r
                                   SupportedLanguages.  Close matches only apply to RFC 4646\r
                                   language codes, and the matching algorithm from RFC 4647\r
-                                  is used to determine if a close match is present.  If \r
+                                  is used to determine if a close match is present.  If\r
                                   an exact or close match is found, then the matching\r
                                   language code from SupportedLanguages is returned.  If\r
                                   no matches are found, then the next variable argument\r
-                                  parameter is evaluated.  The variable argument list \r
+                                  parameter is evaluated.  The variable argument list\r
                                   is terminated by a NULL.\r
 \r
   @retval NULL   The best matching language could not be found in SupportedLanguages.\r
-  @retval NULL   There are not enough resources available to return the best matching \r
+  @retval NULL   There are not enough resources available to return the best matching\r
                  language.\r
-  @retval Other  A pointer to a Null-terminated ASCII string that is the best matching \r
+  @retval Other  A pointer to a Null-terminated ASCII string that is the best matching\r
                  language in SupportedLanguages.\r
 \r
 **/\r
 CHAR8 *\r
 VariableGetBestLanguage (\r
-  IN CONST CHAR8  *SupportedLanguages, \r
+  IN CONST CHAR8  *SupportedLanguages,\r
   IN BOOLEAN      Iso639Language,\r
   IN BOOLEAN      VirtualMode,\r
   ...\r
@@ -1582,7 +1582,7 @@ VariableGetBestLanguage (
         LanguageLength = 0;\r
       } else {\r
         //\r
-        // If RFC 4646 mode, then trim Language from the right to the next '-' character \r
+        // If RFC 4646 mode, then trim Language from the right to the next '-' character\r
         //\r
         for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--);\r
       }\r
@@ -1591,7 +1591,7 @@ VariableGetBestLanguage (
   VA_END (Args);\r
 \r
   //\r
-  // No matches were found \r
+  // No matches were found\r
   //\r
   return NULL;\r
 }\r
@@ -1664,7 +1664,7 @@ AutoUpdateLangVariable(
     ASSERT (Global->PlatformLangCodes[VirtualMode] != NULL);\r
 \r
     //\r
-    // PlatformLang holds a single language from PlatformLangCodes, \r
+    // PlatformLang holds a single language from PlatformLangCodes,\r
     // so the size of PlatformLangCodes is enough for the PlatformLang.\r
     //\r
     if (Global->PlatformLang[VirtualMode] != NULL) {\r
@@ -1694,7 +1694,7 @@ AutoUpdateLangVariable(
     ASSERT (Global->LangCodes[VirtualMode] != NULL);\r
   }\r
 \r
-  if (SetLanguageCodes \r
+  if (SetLanguageCodes\r
       && (Global->PlatformLangCodes[VirtualMode] != NULL)\r
       && (Global->LangCodes[VirtualMode] != NULL)) {\r
     //\r
@@ -1732,7 +1732,7 @@ AutoUpdateLangVariable(
                (UINTN) &(((AUTHENTICATED_VARIABLE_HEADER *)Variable.CurrPtr)->DataSize),\r
                sizeof (DataSize),\r
                &DataSize\r
-               ); \r
+               );\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
@@ -1811,15 +1811,15 @@ AutoUpdateLangVariable(
         FindVariable (PredefinedVariableName[VAR_PLATFORM_LANG], Global->GlobalVariableGuid[VirtualMode], &Variable, VariableGlobal, Instance);\r
 \r
         Status = UpdateVariable (\r
-                   PredefinedVariableName[VAR_PLATFORM_LANG], \r
-                   Global->GlobalVariableGuid[VirtualMode], \r
-                   BestPlatformLang, \r
-                   AsciiStrSize (BestPlatformLang), \r
-                   Attributes, \r
+                   PredefinedVariableName[VAR_PLATFORM_LANG],\r
+                   Global->GlobalVariableGuid[VirtualMode],\r
+                   BestPlatformLang,\r
+                   AsciiStrSize (BestPlatformLang),\r
+                   Attributes,\r
                    0,\r
                    0,\r
-                   VirtualMode, \r
-                   Global, \r
+                   VirtualMode,\r
+                   Global,\r
                    &Variable\r
                    );\r
 \r
@@ -1831,7 +1831,7 @@ AutoUpdateLangVariable(
 }\r
 \r
 /**\r
-  Update the variable region with Variable information. These are the same \r
+  Update the variable region with Variable information. These are the same\r
   arguments as the EFI Variable services.\r
 \r
   @param[in] VariableName       Name of variable.\r
@@ -1840,7 +1840,7 @@ AutoUpdateLangVariable(
   @param[in] DataSize           Size of data. 0 means delete.\r
   @param[in] Attributes         Attributes of the variable.\r
   @param[in] KeyIndex           Index of associated public key.\r
-  @param[in] MonotonicCount     Value of associated monotonic count. \r
+  @param[in] MonotonicCount     Value of associated monotonic count.\r
   @param[in] VirtualMode        Current calling mode for this function.\r
   @param[in] Global             Context of this Extended SAL Variable Services Class call.\r
   @param[in] Variable           The variable information which is used to keep track of variable usage.\r
@@ -1856,7 +1856,7 @@ UpdateVariable (
   IN      EFI_GUID                *VendorGuid,\r
   IN      VOID                    *Data,\r
   IN      UINTN                   DataSize,\r
-  IN      UINT32                  Attributes OPTIONAL,  \r
+  IN      UINT32                  Attributes OPTIONAL,\r
   IN      UINT32                  KeyIndex  OPTIONAL,\r
   IN      UINT64                  MonotonicCount  OPTIONAL,\r
   IN      BOOLEAN                 VirtualMode,\r
@@ -1898,11 +1898,11 @@ UpdateVariable (
     // Update/Delete existing variable\r
     //\r
     Volatile = Variable->Volatile;\r
-    \r
-    if (EfiAtRuntime ()) {        \r
+\r
+    if (EfiAtRuntime ()) {\r
       //\r
-      // If EfiAtRuntime and the variable is Volatile and Runtime Access,  \r
-      // the volatile is ReadOnly, and SetVariable should be aborted and \r
+      // If EfiAtRuntime and the variable is Volatile and Runtime Access,\r
+      // the volatile is ReadOnly, and SetVariable should be aborted and\r
       // return EFI_WRITE_PROTECTED.\r
       //\r
       if (Variable->Volatile) {\r
@@ -1914,14 +1914,14 @@ UpdateVariable (
       //\r
       if ((VariableHeader.Attributes & EFI_VARIABLE_NON_VOLATILE) == 0) {\r
         Status = EFI_INVALID_PARAMETER;\r
-        goto Done;      \r
+        goto Done;\r
       }\r
     }\r
     //\r
     // Setting a data variable with no access, or zero DataSize attributes\r
     // specified causes it to be deleted.\r
     //\r
-    if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) {    \r
+    if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) {\r
       State = VariableHeader.State;\r
       State &= VAR_DELETED;\r
 \r
@@ -1933,12 +1933,12 @@ UpdateVariable (
                  (UINTN) &(((AUTHENTICATED_VARIABLE_HEADER *)Variable->CurrPtr)->State),\r
                  sizeof (UINT8),\r
                  &State\r
-                 ); \r
+                 );\r
       if (!EFI_ERROR (Status)) {\r
         UpdateVariableInfo (VariableName, VendorGuid, Volatile, FALSE, FALSE, TRUE, FALSE);\r
         UpdateVariableCache (VariableName, VendorGuid, Attributes, DataSize, Data);\r
       }\r
-      goto Done;     \r
+      goto Done;\r
     }\r
     //\r
     // Logic comes here to update variable.\r
@@ -1971,25 +1971,25 @@ UpdateVariable (
                  (UINTN) &(((AUTHENTICATED_VARIABLE_HEADER *)Variable->CurrPtr)->State),\r
                  sizeof (UINT8),\r
                  &State\r
-                 );      \r
+                 );\r
       if (EFI_ERROR (Status)) {\r
-        goto Done;  \r
+        goto Done;\r
       }\r
-    }    \r
+    }\r
   } else {\r
     //\r
     // Create a new variable\r
-    //  \r
-    \r
+    //\r
+\r
     //\r
     // Make sure we are trying to create a new variable.\r
-    // Setting a data variable with no access, or zero DataSize attributes means to delete it.    \r
+    // Setting a data variable with no access, or zero DataSize attributes means to delete it.\r
     //\r
     if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) {\r
       Status = EFI_NOT_FOUND;\r
       goto Done;\r
     }\r
-    \r
+\r
     //\r
     // Only variable have NV|RT attribute can be created in Runtime\r
     //\r
@@ -1997,7 +1997,7 @@ UpdateVariable (
         (((Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0) || ((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0))) {\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Done;\r
-    }         \r
+    }\r
   }\r
 \r
   //\r
@@ -2050,11 +2050,11 @@ UpdateVariable (
     // Create a nonvolatile variable\r
     //\r
     Volatile = FALSE;\r
-    \r
+\r
     GetVarStoreHeader (VariableGlobal->NonVolatileVariableBase, FALSE, VariableGlobal, Instance, &VariableStoreHeader);\r
-    if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) \r
+    if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)\r
              && ((HEADER_ALIGN (VarSize) + Global->HwErrVariableTotalSize) > PcdGet32(PcdHwErrStorageSize)))\r
-             || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) \r
+             || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0)\r
              && ((HEADER_ALIGN (VarSize) + Global->CommonVariableTotalSize) > VariableStoreHeader.Size - sizeof (VARIABLE_STORE_HEADER) - PcdGet32(PcdHwErrStorageSize)))) {\r
       if (EfiAtRuntime ()) {\r
         Status = EFI_OUT_OF_RESOURCES;\r
@@ -2072,9 +2072,9 @@ UpdateVariable (
       //\r
       // If still no enough space, return out of resources\r
       //\r
-      if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) \r
+      if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0)\r
                && ((HEADER_ALIGN (VarSize) + Global->HwErrVariableTotalSize) > PcdGet32(PcdHwErrStorageSize)))\r
-               || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) \r
+               || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0)\r
                && ((HEADER_ALIGN (VarSize) + Global->CommonVariableTotalSize) > VariableStoreHeader.Size - sizeof (VARIABLE_STORE_HEADER) - PcdGet32(PcdHwErrStorageSize)))) {\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Done;\r
@@ -2083,7 +2083,7 @@ UpdateVariable (
     //\r
     // Four steps\r
     // 1. Write variable header\r
-    // 2. Set variable state to header valid  \r
+    // 2. Set variable state to header valid\r
     // 3. Write variable data\r
     // 4. Set variable state to valid\r
     //\r
@@ -2165,7 +2165,7 @@ UpdateVariable (
   } else {\r
     //\r
     // Create a volatile variable\r
-    //      \r
+    //\r
     Volatile = TRUE;\r
 \r
     if ((UINT32) (HEADER_ALIGN(VarSize) + Global->VolatileLastVariableOffset) >\r
@@ -2240,22 +2240,22 @@ Done:
 \r
   This function implements EsalGetVariable function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service GetVariable().\r
-  \r
+\r
   @param[in]      VariableName    A Null-terminated Unicode string that is the name of\r
                                   the vendor's variable.\r
   @param[in]      VendorGuid      A unique identifier for the vendor.\r
-  @param[out]     Attributes      If not NULL, a pointer to the memory location to return the \r
+  @param[out]     Attributes      If not NULL, a pointer to the memory location to return the\r
                                   attributes bitmask for the variable.\r
   @param[in, out] DataSize        Size of Data found. If size is less than the\r
                                   data, this value contains the required size.\r
-  @param[out]     Data            On input, the size in bytes of the return Data buffer.  \r
+  @param[out]     Data            On input, the size in bytes of the return Data buffer.\r
                                   On output, the size of data returned in Data.\r
   @param[in]      VirtualMode     Current calling mode for this function.\r
   @param[in]      Global          Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS            The function completed successfully. \r
+  @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_NOT_FOUND          The variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL   DataSize is too small for the result.  DataSize has \r
+  @retval EFI_BUFFER_TOO_SMALL   DataSize is too small for the result.  DataSize has\r
                                  been updated with the size needed to complete the request.\r
   @retval EFI_INVALID_PARAMETER  VariableName is NULL.\r
   @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.\r
@@ -2349,7 +2349,7 @@ EsalGetVariable (
     *DataSize = VarDataSize;\r
     UpdateVariableInfo (VariableName, VendorGuid, Variable.Volatile, TRUE, FALSE, FALSE, FALSE);\r
     UpdateVariableCache (VariableName, VendorGuid, VariableHeader.Attributes, VarDataSize, Data);\r
\r
+\r
     Status = EFI_SUCCESS;\r
     goto Done;\r
   } else {\r
@@ -2371,18 +2371,18 @@ Done:
 \r
   This function implements EsalGetNextVariableName function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service GetNextVariableName().\r
-  \r
+\r
   @param[in, out] VariableNameSize Size of the variable\r
   @param[in, out] VariableName     On input, supplies the last VariableName that was returned by GetNextVariableName().\r
                                    On output, returns the Null-terminated Unicode string of the current variable.\r
   @param[in, out] VendorGuid       On input, supplies the last VendorGuid that was returned by GetNextVariableName().\r
-                                   On output, returns the VendorGuid of the current variable.  \r
+                                   On output, returns the VendorGuid of the current variable.\r
   @param[in]      VirtualMode      Current calling mode for this function.\r
   @param[in]      Global           Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS             The function completed successfully. \r
+  @retval EFI_SUCCESS             The function completed successfully.\r
   @retval EFI_NOT_FOUND           The next variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL    VariableNameSize is too small for the result. \r
+  @retval EFI_BUFFER_TOO_SMALL    VariableNameSize is too small for the result.\r
                                   VariableNameSize has been updated with the size needed to complete the request.\r
   @retval EFI_INVALID_PARAMETER   VariableNameSize is NULL.\r
   @retval EFI_INVALID_PARAMETER   VariableName is NULL.\r
@@ -2512,11 +2512,11 @@ Done:
 \r
   This function implements EsalSetVariable function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service SetVariable().\r
-  \r
+\r
   @param[in]  VariableName       A Null-terminated Unicode string that is the name of the vendor's\r
-                                 variable.  Each VariableName is unique for each \r
-                                 VendorGuid.  VariableName must contain 1 or more \r
-                                 Unicode characters.  If VariableName is an empty Unicode \r
+                                 variable.  Each VariableName is unique for each\r
+                                 VendorGuid.  VariableName must contain 1 or more\r
+                                 Unicode characters.  If VariableName is an empty Unicode\r
                                  string, then EFI_INVALID_PARAMETER is returned.\r
   @param[in]  VendorGuid         A unique identifier for the vendor.\r
   @param[in]  Attributes         Attributes bitmask to set for the variable.\r
@@ -2526,9 +2526,9 @@ Done:
   @param[in]  VirtualMode        Current calling mode for this function.\r
   @param[in]  Global             Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as \r
+  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
                                  defined by the Attributes.\r
-  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the \r
+  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the\r
                                  DataSize exceeds the maximum allowed.\r
   @retval EFI_INVALID_PARAMETER  VariableName is an empty Unicode string.\r
   @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
@@ -2566,7 +2566,7 @@ EsalSetVariable (
   //\r
   if (VariableName == NULL || VariableName[0] == 0 || VendorGuid == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
-  }  \r
+  }\r
 \r
   if (DataSize != 0 && Data == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -2585,17 +2585,17 @@ EsalSetVariable (
       // Try to write Authencated Variable without AuthInfo\r
       //\r
       return EFI_SECURITY_VIOLATION;\r
-    } \r
-    PayloadSize = DataSize - AUTHINFO_SIZE; \r
+    }\r
+    PayloadSize = DataSize - AUTHINFO_SIZE;\r
   } else {\r
-    PayloadSize = DataSize; \r
+    PayloadSize = DataSize;\r
   }\r
 \r
-  \r
+\r
   if ((UINTN)(~0) - PayloadSize < StrSize(VariableName)){\r
     //\r
-    // Prevent whole variable size overflow \r
-    // \r
+    // Prevent whole variable size overflow\r
+    //\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -2625,8 +2625,8 @@ EsalSetVariable (
     //\r
     if (StrSize (VariableName) + PayloadSize > PcdGet32(PcdMaxVariableSize) - sizeof (AUTHENTICATED_VARIABLE_HEADER)) {\r
       return EFI_INVALID_PARAMETER;\r
-    }  \r
-  }  \r
+    }\r
+  }\r
 \r
   AcquireLockOnlyAtBootTime(&VariableGlobal->VariableServicesLock);\r
 \r
@@ -2676,31 +2676,31 @@ EsalSetVariable (
         // Cut the certificate size before set\r
         //\r
         Status = UpdateVariable (\r
-                   VariableName, \r
-                   VendorGuid, \r
-                   (UINT8*)Data + AUTHINFO_SIZE, \r
-                   DataSize - AUTHINFO_SIZE, \r
-                   Attributes, \r
-                   KeyIndex, \r
-                   MonotonicCount, \r
-                   VirtualMode, \r
-                   Global, \r
+                   VariableName,\r
+                   VendorGuid,\r
+                   (UINT8*)Data + AUTHINFO_SIZE,\r
+                   DataSize - AUTHINFO_SIZE,\r
+                   Attributes,\r
+                   KeyIndex,\r
+                   MonotonicCount,\r
+                   VirtualMode,\r
+                   Global,\r
                    &Variable\r
                    );\r
       } else {\r
         //\r
-        // Update variable as usual \r
+        // Update variable as usual\r
         //\r
         Status = UpdateVariable (\r
-                   VariableName, \r
-                   VendorGuid, \r
-                   Data, \r
-                   DataSize, \r
-                   Attributes, \r
-                   0, \r
-                   0, \r
-                   VirtualMode, \r
-                   Global, \r
+                   VariableName,\r
+                   VendorGuid,\r
+                   Data,\r
+                   DataSize,\r
+                   Attributes,\r
+                   0,\r
+                   0,\r
+                   VirtualMode,\r
+                   Global,\r
                    &Variable\r
                    );\r
       }\r
@@ -2720,19 +2720,19 @@ EsalSetVariable (
 \r
   @param[in]  Attributes                   Attributes bitmask to specify the type of variables\r
                                            on which to return information.\r
-  @param[out] MaximumVariableStorageSize   On output the maximum size of the storage space available for \r
-                                           the EFI variables associated with the attributes specified.  \r
-  @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI \r
+  @param[out] MaximumVariableStorageSize   On output the maximum size of the storage space available for\r
+                                           the EFI variables associated with the attributes specified.\r
+  @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI\r
                                            variables associated with the attributes specified.\r
-  @param[out] MaximumVariableSize          Returns the maximum size of an individual EFI variable \r
+  @param[out] MaximumVariableSize          Returns the maximum size of an individual EFI variable\r
                                            associated with the attributes specified.\r
   @param[in]  VirtualMode                  Current calling mode for this function\r
   @param[in]  Global                       Context of this Extended SAL Variable Services Class call\r
 \r
   @retval EFI_SUCCESS                      Valid answer returned.\r
   @retval EFI_INVALID_PARAMETER            An invalid combination of attribute bits was supplied.\r
-  @retval EFI_UNSUPPORTED                  The attribute is not supported on this platform, and the \r
-                                           MaximumVariableStorageSize, RemainingVariableStorageSize, \r
+  @retval EFI_UNSUPPORTED                  The attribute is not supported on this platform, and the\r
+                                           MaximumVariableStorageSize, RemainingVariableStorageSize,\r
                                            MaximumVariableSize are undefined.\r
 **/\r
 EFI_STATUS\r
@@ -2764,12 +2764,12 @@ EsalQueryVariableInfo (
   if(MaximumVariableStorageSize == NULL || RemainingVariableStorageSize == NULL || MaximumVariableSize == NULL || Attributes == 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == 0) {\r
     //\r
     // Make sure the Attributes combination is supported by the platform.\r
     //\r
-    return EFI_UNSUPPORTED;  \r
+    return EFI_UNSUPPORTED;\r
   } else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {\r
     //\r
     // Make sure if runtime bit is set, boot service bit is set also.\r
@@ -2917,20 +2917,20 @@ ReclaimForOS(
   UINTN                           RemainingHwErrVariableSpace;\r
 \r
   VarSize = ((VARIABLE_STORE_HEADER *) ((UINTN) mVariableModuleGlobal->VariableGlobal[Physical].NonVolatileVariableBase))->Size;\r
-  Status  = EFI_SUCCESS; \r
+  Status  = EFI_SUCCESS;\r
   //\r
   //Allowable max size of common variable storage space\r
   //\r
   CommonVariableSpace = VarSize - sizeof (VARIABLE_STORE_HEADER) - PcdGet32(PcdHwErrStorageSize);\r
 \r
   RemainingCommonVariableSpace = CommonVariableSpace - mVariableModuleGlobal->CommonVariableTotalSize;\r
\r
+\r
   RemainingHwErrVariableSpace = PcdGet32 (PcdHwErrStorageSize) - mVariableModuleGlobal->HwErrVariableTotalSize;\r
   //\r
   // If the free area is below a threshold, then performs reclaim operation.\r
   //\r
   if ((RemainingCommonVariableSpace < PcdGet32 (PcdMaxVariableSize))\r
-    || ((PcdGet32 (PcdHwErrStorageSize) != 0) && \r
+    || ((PcdGet32 (PcdHwErrStorageSize) != 0) &&\r
        (RemainingHwErrVariableSpace < PcdGet32 (PcdMaxHardwareErrorVariableSize)))){\r
     Status = Reclaim (\r
                mVariableModuleGlobal->VariableGlobal[Physical].NonVolatileVariableBase,\r
@@ -3056,7 +3056,7 @@ VariableCommonInitialize (
   //\r
   // Note that in EdkII variable driver implementation, Hardware Error Record type variable\r
   // is stored with common variable in the same NV region. So the platform integrator should\r
-  // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of \r
+  // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of\r
   // PcdFlashNvStorageVariableSize.\r
   //\r
   ASSERT (PcdGet32(PcdHwErrStorageSize) <= PcdGet32 (PcdFlashNvStorageVariableSize));\r
@@ -3133,13 +3133,13 @@ VariableCommonInitialize (
     Status    = (EFI_STATUS) EsalCall (\r
                                EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_LO,\r
                                EFI_EXTENDED_SAL_FV_BLOCK_SERVICES_PROTOCOL_GUID_HI,\r
-                               GetPhysicalAddressFunctionId, \r
-                               Instance, \r
-                               (UINT64) &FvVolHdr, \r
-                               0, \r
-                               0, \r
-                               0, \r
-                               0, \r
+                               GetPhysicalAddressFunctionId,\r
+                               Instance,\r
+                               (UINT64) &FvVolHdr,\r
+                               0,\r
+                               0,\r
+                               0,\r
+                               0,\r
                                0\r
                                ).Status;\r
     if (EFI_ERROR (Status)) {\r
@@ -3237,9 +3237,9 @@ VariableCommonInitialize (
     // Register the event handling function to reclaim variable for OS usage.\r
     //\r
     Status = EfiCreateEventReadyToBootEx (\r
-               TPL_NOTIFY, \r
-               ReclaimForOS, \r
-               NULL, \r
+               TPL_NOTIFY,\r
+               ReclaimForOS,\r
+               NULL,\r
                &ReadyToBootEvent\r
                );\r
   } else {\r
index b32ef741bfd5dd69ffa541ae868674edfff7e039..76d4ac552afb1467e23e7546aed77e81e964aa1d 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   Internal header file for Extended SAL variable service module.\r
 \r
-Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -63,7 +63,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define AUTHVAR_KEYDB_NAME_SIZE 38\r
 \r
 ///\r
-/// The maximum size of the public key database, restricted by maximum individal EFI \r
+/// The maximum size of the public key database, restricted by maximum individal EFI\r
 /// varible size, and excluding the variable header and name size.\r
 ///\r
 #define MAX_KEYDB_SIZE  (FixedPcdGet32 (PcdMaxVariableSize) - sizeof (AUTHENTICATED_VARIABLE_HEADER) - AUTHVAR_KEYDB_NAME_SIZE)\r
@@ -191,22 +191,22 @@ VariableClassAddressChangeEvent (
 \r
   This function implements EsalGetVariable function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service GetVariable().\r
-  \r
+\r
   @param[in]      VariableName    A Null-terminated Unicode string that is the name of\r
                                   the vendor's variable.\r
   @param[in]      VendorGuid      A unique identifier for the vendor.\r
-  @param[out]     Attributes      If not NULL, a pointer to the memory location to return the \r
+  @param[out]     Attributes      If not NULL, a pointer to the memory location to return the\r
                                   attributes bitmask for the variable.\r
   @param[in, out] DataSize        Size of Data found. If size is less than the\r
                                   data, this value contains the required size.\r
-  @param[out]     Data            On input, the size in bytes of the return Data buffer.  \r
+  @param[out]     Data            On input, the size in bytes of the return Data buffer.\r
                                   On output, the size of data returned in Data.\r
   @param[in]      VirtualMode     Current calling mode for this function.\r
   @param[in]      Global          Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS            The function completed successfully. \r
+  @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_NOT_FOUND          The variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL   DataSize is too small for the result.  DataSize has \r
+  @retval EFI_BUFFER_TOO_SMALL   DataSize is too small for the result.  DataSize has\r
                                  been updated with the size needed to complete the request.\r
   @retval EFI_INVALID_PARAMETER  VariableName is NULL.\r
   @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.\r
@@ -233,18 +233,18 @@ EsalGetVariable (
 \r
   This function implements EsalGetNextVariableName function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service GetNextVariableName().\r
-  \r
+\r
   @param[in, out] VariableNameSize Size of the variable\r
   @param[in, out] VariableName     On input, supplies the last VariableName that was returned by GetNextVariableName().\r
                                    On output, returns the Null-terminated Unicode string of the current variable.\r
   @param[in, out] VendorGuid       On input, supplies the last VendorGuid that was returned by GetNextVariableName().\r
-                                   On output, returns the VendorGuid of the current variable.  \r
+                                   On output, returns the VendorGuid of the current variable.\r
   @param[in]      VirtualMode      Current calling mode for this function.\r
   @param[in]      Global           Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS             The function completed successfully. \r
+  @retval EFI_SUCCESS             The function completed successfully.\r
   @retval EFI_NOT_FOUND           The next variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL    VariableNameSize is too small for the result. \r
+  @retval EFI_BUFFER_TOO_SMALL    VariableNameSize is too small for the result.\r
                                   VariableNameSize has been updated with the size needed to complete the request.\r
   @retval EFI_INVALID_PARAMETER   VariableNameSize is NULL.\r
   @retval EFI_INVALID_PARAMETER   VariableName is NULL.\r
@@ -267,11 +267,11 @@ EsalGetNextVariableName (
 \r
   This function implements EsalSetVariable function of Extended SAL Variable Services Class.\r
   It is equivalent in functionality to the EFI Runtime Service SetVariable().\r
-  \r
+\r
   @param[in]  VariableName       A Null-terminated Unicode string that is the name of the vendor's\r
-                                 variable.  Each VariableName is unique for each \r
-                                 VendorGuid.  VariableName must contain 1 or more \r
-                                 Unicode characters.  If VariableName is an empty Unicode \r
+                                 variable.  Each VariableName is unique for each\r
+                                 VendorGuid.  VariableName must contain 1 or more\r
+                                 Unicode characters.  If VariableName is an empty Unicode\r
                                  string, then EFI_INVALID_PARAMETER is returned.\r
   @param[in]  VendorGuid         A unique identifier for the vendor.\r
   @param[in]  Attributes         Attributes bitmask to set for the variable.\r
@@ -281,9 +281,9 @@ EsalGetNextVariableName (
   @param[in]  VirtualMode        Current calling mode for this function.\r
   @param[in]  Global             Context of this Extended SAL Variable Services Class call.\r
 \r
-  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as \r
+  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
                                  defined by the Attributes.\r
-  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the \r
+  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the\r
                                  DataSize exceeds the maximum allowed.\r
   @retval EFI_INVALID_PARAMETER  VariableName is an empty Unicode string.\r
   @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
@@ -314,19 +314,19 @@ EsalSetVariable (
 \r
   @param[in]  Attributes                   Attributes bitmask to specify the type of variables\r
                                            on which to return information.\r
-  @param[out] MaximumVariableStorageSize   On output the maximum size of the storage space available for \r
-                                           the EFI variables associated with the attributes specified.  \r
-  @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI \r
+  @param[out] MaximumVariableStorageSize   On output the maximum size of the storage space available for\r
+                                           the EFI variables associated with the attributes specified.\r
+  @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI\r
                                            variables associated with the attributes specified.\r
-  @param[out] MaximumVariableSize          Returns the maximum size of an individual EFI variable \r
+  @param[out] MaximumVariableSize          Returns the maximum size of an individual EFI variable\r
                                            associated with the attributes specified.\r
   @param[in]  VirtualMode                  Current calling mode for this function\r
   @param[in]  Global                       Context of this Extended SAL Variable Services Class call\r
 \r
   @retval EFI_SUCCESS                      Valid answer returned.\r
   @retval EFI_INVALID_PARAMETER            An invalid combination of attribute bits was supplied.\r
-  @retval EFI_UNSUPPORTED                  The attribute is not supported on this platform, and the \r
-                                           MaximumVariableStorageSize, RemainingVariableStorageSize, \r
+  @retval EFI_UNSUPPORTED                  The attribute is not supported on this platform, and the\r
+                                           MaximumVariableStorageSize, RemainingVariableStorageSize,\r
                                            MaximumVariableSize are undefined.\r
 **/\r
 EFI_STATUS\r
@@ -436,7 +436,7 @@ DataSizeOfVariable (
   );\r
 \r
 /**\r
-  Update the variable region with Variable information. These are the same \r
+  Update the variable region with Variable information. These are the same\r
   arguments as the EFI Variable services.\r
 \r
   @param[in] VariableName       Name of variable.\r
@@ -445,7 +445,7 @@ DataSizeOfVariable (
   @param[in] DataSize           Size of data. 0 means delete.\r
   @param[in] Attributes         Attributes of the variable.\r
   @param[in] KeyIndex           Index of associated public key.\r
-  @param[in] MonotonicCount     Value of associated monotonic count. \r
+  @param[in] MonotonicCount     Value of associated monotonic count.\r
   @param[in] VirtualMode        Current calling mode for this function.\r
   @param[in] Global             Context of this Extended SAL Variable Services Class call.\r
   @param[in] Variable           The variable information which is used to keep track of variable usage.\r
@@ -461,7 +461,7 @@ UpdateVariable (
   IN      EFI_GUID                *VendorGuid,\r
   IN      VOID                    *Data,\r
   IN      UINTN                   DataSize,\r
-  IN      UINT32                  Attributes OPTIONAL,  \r
+  IN      UINT32                  Attributes OPTIONAL,\r
   IN      UINT32                  KeyIndex  OPTIONAL,\r
   IN      UINT64                  MonotonicCount  OPTIONAL,\r
   IN      BOOLEAN                 VirtualMode,\r
index 296b9c9b9e92adfdfd4dbb733b2c4d007bd265de..9abf84a14a39d0926813f4411ba1d47af61bf5fe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   VFR file used by the SecureBoot configuration component.\r
 \r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -608,4 +608,4 @@ formset
 \r
   endform;\r
 \r
-endformset;
\ No newline at end of file
+endformset;\r
index 1d6c4ac6e84b61c4f47cd7a764eb5651a4418414..a5fa281851ca0b4055ad087ad74e1a87c5f1b976 100644 (file)
@@ -1,13 +1,13 @@
 /** @file\r
   The module entry point for SecureBoot configuration module.\r
 \r
-Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution.  The full text of the license may be found at \r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
@@ -35,7 +35,7 @@ SecureBootConfigDriverEntryPoint (
 {\r
   EFI_STATUS                       Status;\r
   SECUREBOOT_CONFIG_PRIVATE_DATA   *PrivateData;\r
-  \r
+\r
   //\r
   // If already started, return.\r
   //\r
@@ -50,7 +50,7 @@ SecureBootConfigDriverEntryPoint (
   if (!EFI_ERROR (Status)) {\r
     return EFI_ALREADY_STARTED;\r
   }\r
-  \r
+\r
   //\r
   // Create a private data structure.\r
   //\r
@@ -58,7 +58,7 @@ SecureBootConfigDriverEntryPoint (
   if (PrivateData == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-    \r
+\r
   //\r
   // Install SecureBoot configuration form\r
   //\r
@@ -69,7 +69,7 @@ SecureBootConfigDriverEntryPoint (
 \r
   //\r
   // Install private GUID.\r
-  //    \r
+  //\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &ImageHandle,\r
                   &gEfiCallerIdGuid,\r
@@ -86,8 +86,8 @@ SecureBootConfigDriverEntryPoint (
 ErrorExit:\r
   if (PrivateData != NULL) {\r
     UninstallSecureBootConfigForm (PrivateData);\r
-  }  \r
-  \r
+  }\r
+\r
   return Status;\r
 }\r
 \r
@@ -113,11 +113,11 @@ SecureBootConfigDriverUnload (
                   ImageHandle,\r
                   &gEfiCallerIdGuid,\r
                   (VOID **) &PrivateData\r
-                  );  \r
+                  );\r
   if (EFI_ERROR (Status)) {\r
-    return Status;  \r
+    return Status;\r
   }\r
-  \r
+\r
   ASSERT (PrivateData->Signature == SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE);\r
 \r
   gBS->UninstallMultipleProtocolInterfaces (\r
@@ -126,7 +126,7 @@ SecureBootConfigDriverUnload (
          PrivateData,\r
          NULL\r
          );\r
-  \r
+\r
   UninstallSecureBootConfigForm (PrivateData);\r
 \r
   return EFI_SUCCESS;\r
index 2bc7f3d5378dd25e8785dbb95041d96fd3144e4f..8f14272ecb604941f2ad80b2eed376f89ee5eff4 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // SecureBootConfigDxe Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -12,8 +12,8 @@
 //\r
 // **/\r
 \r
-#string STR_PROPERTIES_MODULE_NAME \r
-#language en-US \r
+#string STR_PROPERTIES_MODULE_NAME\r
+#language en-US\r
 "Secure Boot Config DXE"\r
 \r
 \r
index 6123b5669779a87927076b11671eca29d6fc433b..9acaa7b97507e120c88b8d5b0e72e393f7d470ea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HII Config Access protocol implementation of SecureBoot configuration module.\r
 \r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -1816,7 +1816,7 @@ LoadPeImage (
   Calculate hash of Pe/Coff image based on the authenticode image hashing in\r
   PE/COFF Specification 8.0 Appendix A\r
 \r
-  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in \r
+  Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in\r
   the function LoadPeImage ().\r
 \r
   @param[in]    HashAlg   Hash algorithm type.\r
@@ -3327,12 +3327,12 @@ SecureBootExtractConfigFromVariable (
   }\r
 \r
   //\r
-  // Check SecureBootEnable & Pk status, fix the inconsistence. \r
+  // Check SecureBootEnable & Pk status, fix the inconsistence.\r
   // If the SecureBootEnable Variable doesn't exist, hide the SecureBoot Enable/Disable\r
   // Checkbox.\r
   //\r
   ConfigData->AttemptSecureBoot = FALSE;\r
-  GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);  \r
+  GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);\r
 \r
   //\r
   // Fix Pk, SecureBootEnable inconsistence\r
@@ -4385,7 +4385,7 @@ SecureBootCallback (
         Value->u8 = SECURE_BOOT_MODE_STANDARD;\r
         Status = EFI_SUCCESS;\r
       }\r
-    } \r
+    }\r
     goto EXIT;\r
   }\r
 \r
index 038707ca833c617405f3583b4d5dc81fde4cc507..22b7cfdd1f853a1f4771ff63d3fa217e2341aded 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for SecureBoot configuration module.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,15 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "SecureBootConfigImpl.h"\r
 \r
 /**\r
-  Read file content into BufferPtr, the size of the allocate buffer \r
+  Read file content into BufferPtr, the size of the allocate buffer\r
   is *FileSize plus AddtionAllocateSize.\r
 \r
   @param[in]       FileHandle            The file to be read.\r
   @param[in, out]  BufferPtr             Pointers to the pointer of allocated buffer.\r
   @param[out]      FileSize              Size of input file\r
-  @param[in]       AddtionAllocateSize   Addtion size the buffer need to be allocated. \r
+  @param[in]       AddtionAllocateSize   Addtion size the buffer need to be allocated.\r
                                          In case the buffer need to contain others besides the file content.\r
-  \r
+\r
   @retval   EFI_SUCCESS                  The file was read into the buffer.\r
   @retval   EFI_INVALID_PARAMETER        A parameter was invalid.\r
   @retval   EFI_OUT_OF_RESOURCES         A memory allocation failed.\r
@@ -62,7 +62,7 @@ ReadFileContent (
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
   }\r
-  \r
+\r
   Status = FileHandle->SetPosition (FileHandle, 0);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r
@@ -86,7 +86,7 @@ ReadFileContent (
   }\r
 \r
 ON_EXIT:\r
-  \r
+\r
   *BufferPtr = Buffer;\r
   return Status;\r
 }\r
@@ -95,7 +95,7 @@ ON_EXIT:
   Close an open file handle.\r
 \r
   @param[in] FileHandle           The file handle to close.\r
-  \r
+\r
 **/\r
 VOID\r
 CloseFile (\r
@@ -103,7 +103,7 @@ CloseFile (
   )\r
 {\r
   if (FileHandle != NULL) {\r
-    FileHandle->Close (FileHandle);  \r
+    FileHandle->Close (FileHandle);\r
   }\r
 }\r
 \r
@@ -112,7 +112,7 @@ CloseFile (
 \r
   @param[in]   Integer          Pointer to the nonnegative integer to be converted\r
   @param[in]   IntSizeInWords   Length of integer buffer in words\r
-  @param[out]  OctetString      Converted octet string of the specified length \r
+  @param[out]  OctetString      Converted octet string of the specified length\r
   @param[in]   OSSizeInBytes    Intended length of resulting octet string in bytes\r
 \r
 Returns:\r
@@ -138,17 +138,17 @@ Int2OctStr (
        Ptr1++, Ptr2--) {\r
     *Ptr2 = *Ptr1;\r
   }\r
-       \r
+\r
   for (; Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords) && *Ptr1 == 0; Ptr1++);\r
-  \r
+\r
   if (Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords)) {\r
     return EFI_BUFFER_TOO_SMALL;\r
   }\r
-  \r
+\r
   if (Ptr2 >= OctetString) {\r
     ZeroMem (OctetString, Ptr2 - OctetString + 1);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -158,7 +158,7 @@ Int2OctStr (
   @param[in]     Guid          Pointer to GUID to print.\r
   @param[in]     Buffer        Buffer to print Guid into.\r
   @param[in]     BufferSize    Size of Buffer.\r
-  \r
+\r
   @retval    Number of characters printed.\r
 \r
 **/\r
@@ -173,9 +173,9 @@ GuidToString (
 \r
   Size = UnicodeSPrint (\r
             Buffer,\r
-            BufferSize, \r
+            BufferSize,\r
             L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",\r
-            (UINTN)Guid->Data1,                    \r
+            (UINTN)Guid->Data1,\r
             (UINTN)Guid->Data2,\r
             (UINTN)Guid->Data3,\r
             (UINTN)Guid->Data4[0],\r
index bf42598fa33a212ae09c4537b071934596cb59f8..97f698c551a494d1b66bc4c5556f387ca5ee9102 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   String definitions for Secure Boot Configuration form.\r
 \r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -98,7 +98,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_SECURE_BOOT_ENROLL_PK_FILE     #language en-US "Enroll PK Using File"\r
 \r
 #string STR_DELETE_PK                      #language en-US "Delete Pk"\r
-#string STR_DELETE_PK_HELP                    #language en-US "Choose to Delete PK, Otherwise keep the PK"\r
+#string STR_DELETE_PK_HELP                 #language en-US "Choose to Delete PK, Otherwise keep the PK"\r
 \r
 #string STR_ENROLL_PK_TITLE                #language en-US "Enroll PK"\r
 \r
@@ -106,7 +106,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #string STR_ENROLL_KEK_HELP                #language en-US "Enter into Enroll KEK Form"\r
 \r
 #string STR_DELETE_KEK                     #language en-US "Delete KEK"\r
-#string STR_DELETE_KEK_HELP                   #language en-US "Enter into Delete KEK Form"\r
+#string STR_DELETE_KEK_HELP                 #language en-US "Enter into Delete KEK Form"\r
 \r
 #string STR_ENROLL_KEK_TITLE                #language en-US "Enroll KEK"\r
 #string STR_DELETE_KEK_TITLE                #language en-US "Delete KEK"\r