]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Roll back the change which doesn't call LocateProtocol when TPL is TPL_NOTIFY because...
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 30 Nov 2011 01:53:13 +0000 (01:53 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 30 Nov 2011 01:53:13 +0000 (01:53 +0000)
Signed-off-by: niruiyu
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12801 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c

index 4ec3a6c8f326bfdbe40d407fffe9a2540898cdc0..ce843cc47f46129d2d897577db8810dd5309ea75 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Report Status Code Library for DXE Phase.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\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
@@ -45,7 +45,6 @@ InternalGetReportStatusCode (
   )\r
 {\r
   EFI_STATUS  Status;\r
-  EFI_TPL     Tpl;\r
 \r
   if (mReportStatusCodeLibStatusCodeProtocol != NULL) {\r
     return;\r
@@ -54,18 +53,10 @@ InternalGetReportStatusCode (
   //\r
   // Check gBS just in case ReportStatusCode is called before gBS is initialized.\r
   //\r
-  if ((gBS != NULL) && (gBS->LocateProtocol != NULL) && (gBS->RaiseTPL != NULL) && (gBS->RestoreTPL != NULL)) {\r
-    //\r
-    // Retrieve the current TPL\r
-    //\r
-    Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
-    gBS->RestoreTPL (Tpl);\r
-\r
-    if (Tpl < TPL_NOTIFY) {\r
-      Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**) &mReportStatusCodeLibStatusCodeProtocol);\r
-      if (EFI_ERROR (Status)) {\r
-        mReportStatusCodeLibStatusCodeProtocol = NULL;\r
-      }\r
+  if (gBS != NULL && gBS->LocateProtocol != NULL) {\r
+    Status = gBS->LocateProtocol (&gEfiStatusCodeRuntimeProtocolGuid, NULL, (VOID**) &mReportStatusCodeLibStatusCodeProtocol);\r
+    if (EFI_ERROR (Status)) {\r
+      mReportStatusCodeLibStatusCodeProtocol = NULL;\r
     }\r
   }\r
 }\r
@@ -505,10 +496,7 @@ ReportStatusCodeEx (
   ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));\r
   ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
 \r
-  if ((gBS == NULL) ||\r
-      (gBS->AllocatePool == NULL) || (gBS->FreePool == NULL) ||\r
-      (gBS->RaiseTPL == NULL) || (gBS->RestoreTPL == NULL)\r
-     ) {\r
+  if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r