diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-30 08:26:28 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-30 08:26:28 +0000 |
commit | 5b8adaa558dd0259ede5dad042d80ad2de5cd035 (patch) | |
tree | 4a5f76bbab130ed2e175cd1ed4889af23482dbc5 | |
parent | 7601dbe7c5ed94c859600649fc316918bb3572b3 (diff) | |
download | edk2-5b8adaa558dd0259ede5dad042d80ad2de5cd035.zip edk2-5b8adaa558dd0259ede5dad042d80ad2de5cd035.tar.gz edk2-5b8adaa558dd0259ede5dad042d80ad2de5cd035.tar.bz2 |
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.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c index 5dfa016..f3fc396 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;
}
|