]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
Add missing status code in several modules.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciBus.c
index 517250abe1735a9f5fb0637f9b1790ee1fd493dc..5afbb82298e90e7a952e2a41a46d9067acc36cb9 100644 (file)
@@ -8,7 +8,7 @@
   PCI Root Bridges. So it means platform needs install PCI Root Bridge IO protocol for each\r
   PCI Root Bus and install PCI Host Bridge Resource Allocation Protocol.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -239,7 +239,8 @@ PciBusDriverBindingStart (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
 {\r
-  EFI_STATUS  Status;\r
+  EFI_STATUS                Status;\r
+  EFI_DEVICE_PATH_PROTOCOL  *ParentDevicePath;\r
 \r
   //\r
   // Check RemainingDevicePath validation\r
@@ -285,6 +286,28 @@ PciBusDriverBindingStart (
 \r
   gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));\r
 \r
+  //\r
+  // Open Device Path Protocol for PCI root bridge\r
+  //\r
+  Status = gBS->OpenProtocol (\r
+                  Controller,\r
+                  &gEfiDevicePathProtocolGuid,\r
+                  (VOID **) &ParentDevicePath,\r
+                  This->DriverBindingHandle,\r
+                  Controller,\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+                  );  \r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Report Status Code to indicate PCI bus starts\r
+  //\r
+  REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+    EFI_PROGRESS_CODE,\r
+    (EFI_IO_BUS_PCI | EFI_IOB_PC_INIT),\r
+    ParentDevicePath\r
+    );\r
+\r
   //\r
   // Enumerate the entire host bridge\r
   // After enumeration, a database that records all the device information will be created\r