mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
- Fix a FreeLdr PCI detection bug introduced in revision 10742 5 years ago when PCI detection was added. FindPciBios was setting the HardwareMechanism entry in the PCI_REGISTRY_INFO structure (then called CM_PCI_BUS_DATA) to the wrong register returned from the PCI BIOS: CL instead of AL. CL is the number of the last PCI bus in the system (0 if you only have 1 bus, 1 if you have 2 buses). AL contains bit-fields for PCI characteristics, and HAL checks the 2 first bits to determine the type of the BUS. My VMWare test environment has 2 PCI buses, so the number happened to be correct. This doesn't work if there is only 1 PCI bus, such as in QEMU and Vbox, as we then get an invalid PCI type of 0. Fix this and re-enable the PCI detection in HAL to properly detect the PCI type instead of assuming type 1.
svn path=/trunk/; revision=43924
This commit is contained in:
parent
3afb2efd4a
commit
ae81274578
2 changed files with 1 additions and 5 deletions
|
@ -132,7 +132,7 @@ FindPciBios(PPCI_REGISTRY_INFO BusData)
|
||||||
BusData->NoBuses = RegsOut.b.cl + 1;
|
BusData->NoBuses = RegsOut.b.cl + 1;
|
||||||
BusData->MajorRevision = RegsOut.b.bh;
|
BusData->MajorRevision = RegsOut.b.bh;
|
||||||
BusData->MinorRevision = RegsOut.b.bl;
|
BusData->MinorRevision = RegsOut.b.bl;
|
||||||
BusData->HardwareMechanism = RegsOut.b.cl;
|
BusData->HardwareMechanism = RegsOut.b.al;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -938,11 +938,7 @@ HalpInitializePciStubs(VOID)
|
||||||
ULONG VendorId = 0;
|
ULONG VendorId = 0;
|
||||||
|
|
||||||
/* Query registry information */
|
/* Query registry information */
|
||||||
#ifdef WORKED_FOR_ME
|
|
||||||
PciRegistryInfo = HalpQueryPciRegistryInfo();
|
PciRegistryInfo = HalpQueryPciRegistryInfo();
|
||||||
#else
|
|
||||||
PciRegistryInfo = NULL;
|
|
||||||
#endif
|
|
||||||
if (!PciRegistryInfo)
|
if (!PciRegistryInfo)
|
||||||
{
|
{
|
||||||
/* Assume type 1 */
|
/* Assume type 1 */
|
||||||
|
|
Loading…
Reference in a new issue