Add a stopgap for the EBus breakage on sparc64 since the PCI code does

resource pre-allocation. The problem is that the BARs of the EBus bridges
contain the ranges for the resources for the EBus devices beyond the bridge.
So when the EBus code tries to allocate the resource for an EBus device
it's already allocated by the PCI code.
To be removed again as soon as we have a proper solution in the EBus Code.

Reviewed by:	tmm
Approved by:	marcel (mentor)
This commit is contained in:
marius 2004-04-23 15:48:48 +00:00
parent 0beecc7268
commit 541bfdc704

View File

@ -825,6 +825,14 @@ pci_add_map(device_t pcib, device_t bus, device_t dev,
if (base == 0)
return 1;
#ifdef __sparc64__
/* Sun EBus bridges contain the ranges for the devices beyond them */
if ((pci_get_class(dev) == PCIC_BRIDGE) &&
(pci_get_vendor(dev) == 0x108e) &&
(pci_get_device(dev) == 0x1000 || pci_get_device(dev) == 0x1100))
return 1;
#endif
start = base;
end = base + (1 << ln2size) - 1;
count = 1 << ln2size;