Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/pci



Module Name:    src
Committed By:   thorpej
Date:           Sat Jan 18 22:17:34 UTC 2020

Modified Files:
        src/sys/dev/pci: pciconf.c

Log Message:
Fix several problems with pci_configure_bus():
- Track the 64-bit range capability of prefetchable and non-prefetchable
  memory separately.  Probe the extent maps provided by the caller to
  initialize these values.  Without this, we never get 64-bit range
  capablity on the root bus, and thus are never able to forward it along
  to downstream busses.
- Always prefer allocating space for a 64-bit memory BAR > 4GB.  We will
  fall back on a 32-bit range if no space above 4GB is available.
- Constrain allocation of 32-bit memory BARs (including expansion ROM BARs)
  to be below 4GB, even if the window has a larger range available.
- When allocating non-prefetchable memory space for a PCI-PCI bridge, ensure
  it falls below 4GB, since a bridge cannot forward a 64-bit non-prefetchable
  range.
- Account for expansion ROMs as non-prefetchable memory rather than
  prefetchable memory; expansion ROMs have 32-bit BARs, and if a device
  with an expansion ROM is downstream of a brige, a 32-bit prefetchable
  range might not be available.

Tested by jmcneill@ on an Arm Neoverse N1 SDP, where the previous
code failed to configure all devices correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/pciconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index