]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Misc.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Misc.c
index 5356e235e87666ebd87f34cad1cf7a1da77d9aea..ef68647569317b75f5d1b6c83c5ea2d6e4dbe08d 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -20,8 +20,8 @@ Abstract:
 #include "Tiano.h"\r
 #include "pei.h"\r
 #include "cpuio.h"\r
-#include "pcicfg.h"\r
-#include "pcicfg2.h"\r
+#include EFI_PPI_CONSUMER (PciCfg)\r
+#include EFI_PPI_CONSUMER (PciCfg2)\r
 #include EFI_PROTOCOL_CONSUMER (PciRootBridgeIo)\r
 \r
 //\r
@@ -68,8 +68,6 @@ Returns:
 \r
 --*/\r
 {\r
-  EFI_STATUS  Status;\r
-\r
   mPeiServices  = NULL;\r
   CpuIoPpi      = NULL;\r
   PciCfgPpi     = NULL;\r
@@ -136,7 +134,7 @@ Returns:
   EFI_STATUS                      Status;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;\r
 \r
-  if (mPeiServices == NULL) {\r
+  if (mPeiServices != NULL) {\r
     //\r
     // The function is called in PEI phase, use PEI interfaces\r
     //\r
@@ -197,7 +195,7 @@ Returns:
   EFI_STATUS                      Status;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;\r
 \r
-  if (mPeiServices == NULL) {\r
+  if (mPeiServices != NULL) {\r
     //\r
     // The function is called in PEI phase, use PEI interfaces\r
     //\r
@@ -260,7 +258,7 @@ Returns:
   UINT8                           *Buffer8;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;\r
 \r
-  if (mPeiServices == NULL) {\r
+  if (mPeiServices != NULL) {\r
     //\r
     // The function is called in PEI phase, use PEI interfaces\r
     //\r