summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-02-12 04:30:37 +0000
committerjhb <jhb@FreeBSD.org>2014-02-12 04:30:37 +0000
commit6e6e271c34f0bc0881fd2171f9d0709306b2eb8c (patch)
tree4ed418e09d2abca6c5033a32710e2f5170bc5bb4 /sys/i386
parentb3e5336bce93d0b0b1c4b9735fe419d1585ae53e (diff)
downloadFreeBSD-src-6e6e271c34f0bc0881fd2171f9d0709306b2eb8c.zip
FreeBSD-src-6e6e271c34f0bc0881fd2171f9d0709306b2eb8c.tar.gz
Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources. PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture defines a PCI_RES_BUS resource type. - Add a helper API to create top-level PCI bus resource managers for each PCI domain/segment. Host-PCI bridge drivers use this API to allocate bus numbers from their associated domain. - Change the PCI bus and CardBus drivers to allocate a bus resource for their bus number from the parent PCI bridge device. - Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the full range of bus numbers from secbus to subbus from their parent bridge. The drivers also always program their primary bus register. The bridge drivers also support growing their bus range by extending the bus resource and updating subbus to match the larger range. - Add support for managing PCI bus resources to the Host-PCI bridge drivers used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib). - Define a PCI_RES_BUS resource type for amd64 and i386. Reviewed by: imp MFC after: 1 month
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/resource.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/i386/include/resource.h b/sys/i386/include/resource.h
index edde5eb..dfcc902 100644
--- a/sys/i386/include/resource.h
+++ b/sys/i386/include/resource.h
@@ -40,5 +40,8 @@
#define SYS_RES_DRQ 2 /* isa dma lines */
#define SYS_RES_MEMORY 3 /* i/o memory */
#define SYS_RES_IOPORT 4 /* i/o ports */
+#ifdef NEW_PCIB
+#define PCI_RES_BUS 5 /* PCI bus numbers */
+#endif
#endif /* !_MACHINE_RESOURCE_H_ */
OpenPOWER on IntegriCloud