mirror of https://github.com/acidanthera/audk.git
The PCI HotPlug Init Protocol returns a list of Root HPC, but it is possible that some HPCs in the list are not found during PCI enumeration. In this case, the PCI HotPlug Init Protocol.InitializeRootHpc() will not be called for the un-found HPCs. However, in AllRootHPCInitialized(), all reported HPCs are checked to see if it has been initialized, so TIME_OUT happens.
This check-in fix the issue by adding a flag to indicate if a HPC is found during PCI enumeration or not. This check-in also adds a debug message if any found HPC failed with initialization. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11081 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7caf72a907
commit
55565b0859
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
PCI Hot Plug support functions implementation for PCI Bus module..
|
PCI Hot Plug support functions implementation for PCI Bus module..
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -254,7 +254,7 @@ AllRootHPCInitialized (
|
||||||
do {
|
do {
|
||||||
for (Index = 0; Index < gPciRootHpcCount; Index++) {
|
for (Index = 0; Index < gPciRootHpcCount; Index++) {
|
||||||
|
|
||||||
if (!gPciRootHpcData[Index].Initialized) {
|
if (gPciRootHpcData[Index].Found && !gPciRootHpcData[Index].Initialized) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
PCI Hot Plug support functions declaration for PCI Bus module.
|
PCI Hot Plug support functions declaration for PCI Bus module.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -25,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
BOOLEAN Found;
|
||||||
BOOLEAN Initialized;
|
BOOLEAN Initialized;
|
||||||
VOID *Padding;
|
VOID *Padding;
|
||||||
} ROOT_HPC_DATA;
|
} ROOT_HPC_DATA;
|
||||||
|
|
|
@ -783,6 +783,7 @@ PciScanBus (
|
||||||
// Check if it is a Hotplug PCI controller
|
// Check if it is a Hotplug PCI controller
|
||||||
//
|
//
|
||||||
if (IsRootPciHotPlugController (PciDevice->DevicePath, &HpIndex)) {
|
if (IsRootPciHotPlugController (PciDevice->DevicePath, &HpIndex)) {
|
||||||
|
gPciRootHpcData[HpIndex].Found = TRUE;
|
||||||
|
|
||||||
if (!gPciRootHpcData[HpIndex].Initialized) {
|
if (!gPciRootHpcData[HpIndex].Initialized) {
|
||||||
|
|
||||||
|
@ -1235,6 +1236,7 @@ PciHostBridgeEnumerator (
|
||||||
Status = AllRootHPCInitialized (STALL_1_SECOND * 15);
|
Status = AllRootHPCInitialized (STALL_1_SECOND * 15);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_ERROR, "Some root HPC failed to initialize\n"));
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue