]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Merger Tracker 8448: PciHostBridgeEnumerator() error checking could lead to memory...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Jun 2007 05:20:37 +0000 (05:20 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Jun 2007 05:20:37 +0000 (05:20 +0000)
2. Merger Tracker 8450: AllRootHPCInitialized() passed in timeout value incorrect

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2629 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.c
EdkModulePkg/Bus/Pci/PciBus/Dxe/PciHotPlugSupport.h
EdkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c

index 87074873114c3e708128ff1aa754b429030a2bb9..7fba0476b5c25d9ec602c5c32c29eb5d1ec0ef55 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 All rights reserved. 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 @@ Revision History
 \r
 --*/\r
 \r
-#include "pcibus.h"\r
+#include "Pcibus.h"\r
 #include "PciHotPlugSupport.h"\r
 \r
 EFI_PCI_HOT_PLUG_INIT_PROTOCOL  *gPciHotPlugInit;\r
@@ -270,17 +270,18 @@ Returns:
 \r
 EFI_STATUS\r
 AllRootHPCInitialized (\r
-  IN  UINTN           TimeoutInMilliSeconds\r
+  IN  UINTN           TimeoutInMicroSeconds\r
   )\r
 /*++\r
 \r
 Routine Description:\r
 \r
 Arguments:\r
+  TimeoutInMicroSeconds - microseconds to wait for all root hpc's initialization\r
 \r
 Returns:\r
-\r
-  None\r
+  EFI_SUCCESS - All root hpc's initialization is finished before the timeout\r
+  EFI_TIMEOUT - Time out\r
 \r
 --*/\r
 // TODO:    TimeoutInMilliSeconds - add argument and description to function comment\r
@@ -290,7 +291,7 @@ Returns:
   UINT32  Delay;\r
   UINTN   Index;\r
 \r
-  Delay = (UINT32) (((TimeoutInMilliSeconds * STALL_1_MILLI_SECOND) / 30) + 1);\r
+  Delay = (UINT32) ((TimeoutInMicroSeconds / 30) + 1);\r
   do {\r
 \r
     for (Index = 0; Index < gPciRootHpcCount; Index++) {\r
index df49ebaf563594a253de8180d614a2e1afe8669f..7b15a3cd37af6159429957fe87cca7c15426088b 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
 All rights reserved. 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,10 +24,6 @@ Revision History
 #ifndef _EFI_PCI_HOT_PLUG_SUPPORT_H\r
 #define _EFI_PCI_HOT_PLUG_SUPPORT_H\r
 \r
-//\r
-// stall 1 ms\r
-//\r
-#define STALL_1_MILLI_SECOND  1000    \r
 \r
 //\r
 // stall 1 second\r
@@ -205,7 +201,7 @@ Returns:
 \r
 EFI_STATUS\r
 AllRootHPCInitialized (\r
-  IN  UINTN           TimeoutInMilliSeconds\r
+  IN  UINTN           TimeoutInMicroSeconds\r
   )\r
 /*++\r
 \r
@@ -214,12 +210,11 @@ Routine Description:
   TODO: Add function description\r
 \r
 Arguments:\r
-\r
-  TimeoutInMilliSeconds - TODO: add argument description\r
+  TimeoutInMicroSeconds - microseconds to wait for all root hpc's initialization\r
 \r
 Returns:\r
-\r
-  TODO: add return values\r
+  EFI_SUCCESS - All root hpc's initialization is finished before the timeout\r
+  EFI_TIMEOUT - Time out\r
 \r
 --*/\r
 ;\r
index 1601a4d61703698f5b63e63bc227ed4bc1dac913..eaeca2ad4f24d3a22ab7ca1b25b2cdce675bf3b3 100644 (file)
@@ -1881,15 +1881,10 @@ Returns:
               RootBridgeDev\r
               );\r
 \r
+    DestroyRootBridge (RootBridgeDev);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
-\r
-    DestroyRootBridge (RootBridgeDev);\r
-\r
-    //\r
-    // Error proccess here\r
-    //\r
   }\r
 \r
   //\r