Revision: 16737
          http://sourceforge.net/p/edk2/code/16737
Author:   vanjeff
Date:     2015-02-04 03:23:33 +0000 (Wed, 04 Feb 2015)
Log Message:
-----------
Check in missing patch for TPM error handling.

(Sync patch r16602 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen....@intel.com>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/16602

Modified Paths:
--------------
    branches/UDK2014.SP1/SecurityPkg/SecurityPkg.dsc
    branches/UDK2014.SP1/SecurityPkg/Tcg/TcgDxe/TcgDxe.c

Modified: branches/UDK2014.SP1/SecurityPkg/SecurityPkg.dsc
===================================================================
--- branches/UDK2014.SP1/SecurityPkg/SecurityPkg.dsc    2015-02-04 03:22:44 UTC 
(rev 16736)
+++ branches/UDK2014.SP1/SecurityPkg/SecurityPkg.dsc    2015-02-04 03:23:33 UTC 
(rev 16737)
@@ -42,6 +42,8 @@
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+  
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
@@ -66,6 +68,7 @@
   
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
 
@@ -85,6 +88,7 @@
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTrEE/Tpm2DeviceLibTrEE.inf
 
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]
+  
ReportStatusCodeLib|MdeModulePkg\Library\RuntimeDxeReportStatusCodeLib\RuntimeDxeReportStatusCodeLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
   
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
@@ -107,6 +111,7 @@
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
   
MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
+  
ReportStatusCodeLib|MdeModulePkg\Library\SmmReportStatusCodeLib\SmmReportStatusCodeLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTrEE/Tpm2DeviceLibTrEE.inf

Modified: branches/UDK2014.SP1/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
===================================================================
--- branches/UDK2014.SP1/SecurityPkg/Tcg/TcgDxe/TcgDxe.c        2015-02-04 
03:22:44 UTC (rev 16736)
+++ branches/UDK2014.SP1/SecurityPkg/Tcg/TcgDxe/TcgDxe.c        2015-02-04 
03:23:33 UTC (rev 16737)
@@ -265,7 +265,7 @@
   }
 
   if (EventLogLastEntry != NULL) {
-    if (TcgData->BsCap.TPMDeactivatedFlag || 
(!ProtocolCapability.TPMPresentFlag)) {
+    if (TcgData->BsCap.TPMDeactivatedFlag || (!TcgData->BsCap.TPMPresentFlag)) 
{
       *EventLogLastEntry = (EFI_PHYSICAL_ADDRESS)(UINTN)0;
     } else {
       *EventLogLastEntry = (EFI_PHYSICAL_ADDRESS)(UINTN)TcgData->LastEvent;
@@ -412,7 +412,7 @@
 
   TcgData = TCG_DXE_DATA_FROM_THIS (This);
   
-  if (TcgData->BsCap.TPMDeactivatedFlag || 
(!ProtocolCapability.TPMPresentFlag)) {
+  if (TcgData->BsCap.TPMDeactivatedFlag || (!TcgData->BsCap.TPMPresentFlag)) {
     return EFI_DEVICE_ERROR;
   }
   return TcgDxeLogEventI (
@@ -581,7 +581,7 @@
 
   TcgData = TCG_DXE_DATA_FROM_THIS (This);
   
-  if (TcgData->BsCap.TPMDeactivatedFlag || 
(!ProtocolCapability.TPMPresentFlag)) {
+  if (TcgData->BsCap.TPMDeactivatedFlag || (!TcgData->BsCap.TPMPresentFlag)) {
     return EFI_DEVICE_ERROR;
   }
     
@@ -589,7 +589,7 @@
     return EFI_UNSUPPORTED;
   }
   
-  if (HashData == NULL && HashDataLen > 0) {
+  if (HashData == 0 && HashDataLen > 0) {
     return EFI_INVALID_PARAMETER;
   }
 
@@ -1383,7 +1383,7 @@
                   EFI_NATIVE_INTERFACE,
                   &mTcgDxeData.TcgProtocol
                   );
-  if (!EFI_ERROR (Status) && (!mTcgDxeData.BsCap.TPMDeactivatedFlag) && 
ProtocolCapability.TPMPresentFlag) {
+  if (!EFI_ERROR (Status) && (!mTcgDxeData.BsCap.TPMDeactivatedFlag) && 
mTcgDxeData.BsCap.TPMPresentFlag) {
     //
     // Setup the log area and copy event log from hob list to it
     //


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to