]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC 233662,233677-233678,250418,252166:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Jun 2013 21:02:26 +0000 (21:02 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Jun 2013 21:02:26 +0000 (21:02 +0000)
commit95a7fbcdf6878910eb5879c697bf570a5ad2d754
tree4f3e6c5b31257e56bc6b1b3ced3ac2b306afed76
parent9d8454382d1aad5be45637c4407e4ae6a92aeb92
MFC 233662,233677-233678,250418,252166:
If the firmware/BIOS assigns conflicting ranges to BARs then leaving the
BARs alone could result in one device stealing mmio accesses intended to go
to a second device.  Previously the PCI bus driver attempted to handle this
case by clearing the BAR to 0 depending on BARs based at 0 not decoding (which
is not guaranteed to be true).  Now when a conflicting BAR is detected the
following steps are taken:

 1) If hw.pci.realloc_bars (a new tunable) is enabled (default is disabled),
    then ignore the current BAR setting from the firmware and attempt to
    allocate a fresh resource range for the BAR.

 2) If 1) failed (or was disabled), disable decoding for the relevant
    BAR type (e.g. disable mem decoding for a memory BAR) and emit a
    warning if booting verbose.

git-svn-id: svn://svn.freebsd.org/base/stable/8@252318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/pci/pci.c