freebsd-dev/sys/conf
John Baldwin 83c41143ca Reimplement how PCI-PCI bridges manage their I/O windows. Previously the
driver would verify that requests for child devices were confined to any
existing I/O windows, but the driver relied on the firmware to initialize
the windows and would never grow the windows for new requests.  Now the
driver actively manages the I/O windows.

This is implemented by allocating a bus resource for each I/O window from
the parent PCI bus and suballocating that resource to child devices.  The
suballocations are managed by creating an rman for each I/O window.  The
suballocated resources are mapped by passing the bus_activate_resource()
call up to the parent PCI bus.  Windows are grown when needed by using
bus_adjust_resource() to adjust the resource allocated from the parent PCI
bus.  If the adjust request succeeds, the window is adjusted and the
suballocation request for the child device is retried.

When growing a window, the rman_first_free_region() and
rman_last_free_region() routines are used to determine if the front or
end of the existing I/O window is free.  From using that, the smallest
ranges that need to be added to either the front or back of the window
are computed.  The driver will first try to grow the window in whichever
direction requires the smallest growth first followed by the other
direction if that fails.

Subtractive bridges will first attempt to satisfy requests for child
resources from I/O windows (including attempts to grow the windows).  If
that fails, the request is passed up to the parent PCI bus directly
however.

The PCI-PCI bridge driver will try to use firmware-assigned ranges for
child BARs first and only allocate a "fresh" range if that specific range
cannot be accommodated in the I/O window.  This allows systems where the
firmware assigns resources during boot but later wipes the I/O windows
(some ACPI BIOSen are known to do this) to "rediscover" the original I/O
window ranges.

The ACPI Host-PCI bridge driver has been adjusted to correctly honor
hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge
makes a wildcard request for an I/O window range.

The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option
is enabled.  This is a transition aide to allow platforms that do not
yet support bus_activate_resource() and bus_adjust_resource() in their
Host-PCI bridge drivers (and possibly other drivers as needed) to use the
old driver for now.  Once all platforms support the new driver, the
kernel option and old driver will be removed.

PR:		kern/143874 kern/149306
Tested by:	mav
2011-05-03 17:37:24 +00:00
..
defines
files Add files for wpi(4) 2011-05-01 18:42:56 +00:00
files.amd64 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.arm Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.i386 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.ia64 Stop linking against a direct-mapped virtual address and instead 2011-04-30 20:49:00 +00:00
files.mips Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.pc98 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.powerpc Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.sparc64 Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
files.sun4v Compile in in_cksum* implementations for both IPv6 and IPv6. 2011-04-20 12:58:30 +00:00
kern.mk Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those 2011-05-02 10:35:27 +00:00
kern.post.mk Add an x86/include directory to the kernel to hold headers that are common 2010-11-01 17:34:04 +00:00
kern.pre.mk Allow MKMODULESENV being preset from other sources like makeoptions 2011-04-30 17:51:39 +00:00
kmod_syms.awk
kmod.mk Remove support for the Intel C Compiler from the build infrastructure. 2011-04-19 18:09:21 +00:00
ldscript.amd64 The new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000 2011-03-28 06:35:17 +00:00
ldscript.arm
ldscript.i386 Step 2: sync sys/conf/ldscript.i386 with the binutils 2.17.50 version, 2010-11-05 19:40:27 +00:00
ldscript.ia64 Stop linking against a direct-mapped virtual address and instead 2011-04-30 20:49:00 +00:00
ldscript.mips Let the linker pick the right output format automatically 2010-11-13 18:38:35 +00:00
ldscript.mips.cfe Remove commented out _DYNAMIC sections. 2011-01-20 19:20:23 +00:00
ldscript.mips.mips64 Remove commented out _DYNAMIC sections. 2011-01-20 19:20:23 +00:00
ldscript.mips.octeon1 In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.powerpc In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.powerpc64 In fact, we don't need any of these __DYNAMIC. it is a.out leftover and commented out. 2011-01-20 19:24:50 +00:00
ldscript.sparc64 Merge binutils 2.17.50 to head. This brings a number of improvements to 2011-02-18 20:54:12 +00:00
Makefile.amd64 Upgrade our copy of llvm/clang to r126079, from upstream's trunk. 2011-02-20 19:33:47 +00:00
Makefile.arm Convert Marvell ARM platforms to FDT convention. 2010-06-13 13:28:53 +00:00
Makefile.i386 Upgrade our copy of llvm/clang to r126079, from upstream's trunk. 2011-02-20 19:33:47 +00:00
Makefile.ia64 Remove definition of the GCC3 variable. It was introduced in rev. 2007-06-02 21:30:39 +00:00
Makefile.mips Remove unnecessary 'cat'. 2011-01-10 05:13:06 +00:00
Makefile.pc98
Makefile.powerpc MFppc64: 2010-07-13 05:32:19 +00:00
Makefile.sparc64
Makefile.sun4v
makeLINT.mk Add LINT-NOINET6 which we have inofficially supported for years 2011-05-02 22:54:24 +00:00
makeLINT.sed
newvers.sh Clean up stray line in 213077 2010-09-23 17:29:59 +00:00
NOTES These are of course i386/amd64 only. 2011-05-01 19:05:54 +00:00
options Reimplement how PCI-PCI bridges manage their I/O windows. Previously the 2011-05-03 17:37:24 +00:00
options.amd64 Merging mptable under x86 left this option undefined for amd64 case. 2010-10-29 18:38:36 +00:00
options.arm Add options I missed in the additionnal AT91 support commits. 2010-10-07 09:30:35 +00:00
options.i386 Make "options XENHVM" compile for i386, not just amd64 -- a largely 2011-01-04 14:49:54 +00:00
options.ia64 Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
options.mips Put the ARGE_DEBUG behind a kernel config option. 2011-04-05 05:29:10 +00:00
options.pc98 Unbreak the build for pc98. Specify the newly introduced, for ia32, 2010-01-16 12:24:12 +00:00
options.powerpc Import support for the Sony Playstation 3 using the OtherOS feature 2011-01-06 04:12:29 +00:00
options.sparc64 Add a driver for the `Fire' JBus to PCIe bridges found in at least 2009-12-27 16:55:44 +00:00
options.sun4v
systags.sh