summaryrefslogtreecommitdiffstats
path: root/sys/x86/include/legacyvar.h
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/x86/include/legacyvar.h
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/x86/include/legacyvar.h')
-rw-r--r--sys/x86/include/legacyvar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h
index 5f2e29c..856b352 100644
--- a/sys/x86/include/legacyvar.h
+++ b/sys/x86/include/legacyvar.h
@@ -57,6 +57,10 @@ int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
uintptr_t value);
struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child,
int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
+int legacy_pcib_adjust_resource(device_t dev, device_t child, int type,
+ struct resource *r, u_long start, u_long end);
+int legacy_pcib_release_resource(device_t dev, device_t child, int type,
+ int rid, struct resource *r);
int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count,
int maxcount, int *irqs);
int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq);
OpenPOWER on IntegriCloud