summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-30 08:26:28 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-30 08:26:28 +0000
commit5b8adaa558dd0259ede5dad042d80ad2de5cd035 (patch)
tree4a5f76bbab130ed2e175cd1ed4889af23482dbc5
parent7601dbe7c5ed94c859600649fc316918bb3572b3 (diff)
downloadedk2-platforms-5b8adaa558dd0259ede5dad042d80ad2de5cd035.tar.xz
Fix bug that Duet BDS fail to get PciExpressAddress from guid hob.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7155 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--DuetPkg/Library/DuetBdsLib/BdsPlatform.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
index 5dfa016bbd..f3fc396757 100644
--- a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
+++ b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
@@ -422,23 +422,16 @@ Returns:
UINT32 Number;
EFI_PEI_HOB_POINTERS GuidHob;
- BufferSize = 0;
- //
- // Get Hob List from configuration table
- //
- GuidHob.Raw = GetHobList ();
-
//
// Get PciExpressAddressInfo Hob
//
- GuidHob.Raw = GetNextGuidHob (&gEfiPciExpressBaseAddressGuid, GuidHob.Raw);
- if (GuidHob.Raw == NULL) {
- DEBUG ((EFI_D_ERROR, "Fail to get gEfiPciExpressBaseAddressGuid from GUID HOB\n"));
- return 0;
- }
- PciExpressBaseAddressInfo = (EFI_PCI_EXPRESS_BASE_ADDRESS_INFORMATION *) GET_GUID_HOB_DATA (GuidHob.Guid);
- if (PciExpressBaseAddressInfo == NULL) {
- DEBUG ((EFI_D_ERROR, "Fail to get gEfiPciExpressBaseAddressGuid from GUID HOB\n"));
+ PciExpressBaseAddressInfo = NULL;
+ BufferSize = 0;
+ GuidHob.Raw = GetFirstGuidHob (&gEfiPciExpressBaseAddressGuid);
+ if (GuidHob.Raw != NULL) {
+ PciExpressBaseAddressInfo = GET_GUID_HOB_DATA (GuidHob.Guid);
+ BufferSize = GET_GUID_HOB_DATA_SIZE (GuidHob.Guid);
+ } else {
return 0;
}
@@ -456,7 +449,7 @@ Returns:
//
// Do not find the PciExpress Base Address in the Hob
//
- return 0;
+ return 0;
}
VOID
@@ -469,7 +462,9 @@ PatchPciRootBridgeDevicePath (
UINT64 PciExpressBase;
PciExpressBase = GetPciExpressBaseAddressForRootBridge (HostBridgeNumber, RootBridgeNumber);
-
+
+ DEBUG ((EFI_D_INFO, "Get PciExpress Address from Hob: 0x%X\n", PciExpressBase));
+
if (PciExpressBase != 0) {
RootBridge->PciRootBridge.HID = EISA_PNP_ID(0x0A08);
}
@@ -514,6 +509,8 @@ Returns:
&gPlatformRootBridges[0],
&RootHandle
);
+ DEBUG ((EFI_D_INFO, "Pci Root bridge handle is 0x%X\n", RootHandle));
+
if (EFI_ERROR (Status)) {
return Status;
}