diff options
author | jhb <jhb@FreeBSD.org> | 2015-04-01 21:48:54 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-04-01 21:48:54 +0000 |
commit | 5fdf8ec7775f40bbf293206a9670387f9b26b1e2 (patch) | |
tree | 0444ef99cffa06c0c3a81e7fa07483f56507ff35 /sys/x86/include/legacyvar.h | |
parent | 971b9a0eebccdc50b69052744c2221c13bd1a980 (diff) | |
download | FreeBSD-src-5fdf8ec7775f40bbf293206a9670387f9b26b1e2.zip FreeBSD-src-5fdf8ec7775f40bbf293206a9670387f9b26b1e2.tar.gz |
MFC 261790:
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.
PR: 197076
Diffstat (limited to 'sys/x86/include/legacyvar.h')
-rw-r--r-- | sys/x86/include/legacyvar.h | 4 |
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); |