//\r
if (RemainingDevicePath != NULL) {\r
//\r
- // Check if RemainingDevicePath is the End of Device Path Node, \r
+ // Check if RemainingDevicePath is the End of Device Path Node,\r
// if yes, go on checking other conditions\r
//\r
if (!IsDevicePathEnd (RemainingDevicePath)) {\r
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;\r
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;\r
\r
+ //\r
+ // Initialize PciRootBridgeIo to suppress incorrect compiler warning.\r
+ //\r
+ PciRootBridgeIo = NULL;\r
+\r
//\r
// Check RemainingDevicePath validation\r
//\r
if (RemainingDevicePath != NULL) {\r
//\r
- // Check if RemainingDevicePath is the End of Device Path Node, \r
+ // Check if RemainingDevicePath is the End of Device Path Node,\r
// if yes, return EFI_SUCCESS\r
//\r
if (IsDevicePathEnd (RemainingDevicePath)) {\r
//\r
// If PCI Platform protocol doesn't exist, try to Pci Override Protocol.\r
//\r
- if (gPciPlatformProtocol == NULL) { \r
+ if (gPciPlatformProtocol == NULL) {\r
gPciOverrideProtocol = NULL;\r
gBS->LocateProtocol (\r
&gEfiPciOverrideProtocolGuid,\r
NULL,\r
(VOID **) &gPciOverrideProtocol\r
);\r
- } \r
+ }\r
\r
if (mIoMmuProtocol == NULL) {\r
gBS->LocateProtocol (\r
This->DriverBindingHandle,\r
Controller,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
- ); \r
+ );\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
//\r
StartPciDevices (Controller);\r
\r
- gFullEnumeration = FALSE;\r
- return EFI_SUCCESS;\r
+ if (gFullEnumeration) {\r
+ gFullEnumeration = FALSE;\r
+\r
+ Status = gBS->InstallProtocolInterface (\r
+ &PciRootBridgeIo->ParentHandle,\r
+ &gEfiPciEnumerationCompleteProtocolGuid,\r
+ EFI_NATIVE_INTERFACE,\r
+ NULL\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
+ }\r
+\r
+ return Status;\r
}\r
\r
/**\r