Comment 100 for bug 341681

Bjorn Helgaas (bjorn-helgaas) wrote :

Thanks, Peter!

Here's what happens without "pci=use_crs":

  ACPI: PCI Root Bridge [PCI0] (0000:00)
  pci_root PNP0A08:00: host bridge window [mem 0xc0000000-0xfebfffff] (ignored)
  pci 0000:00:01.0: PCI bridge to [bus 01-01]
  pci 0000:00:01.0: bridge window [mem 0xbfe00000-0xbfefffff] <= outside host bridge window
  pci 0000:00:01.0: bridge window [mem 0xc0000000-0xdfffffff 64bit pref]
  pci 0000:01:00.0: reg 18: [mem 0xbfef0000-0xbfefffff] <= video device, outside host bridge window
  pci 0000:01:00.1: reg 10: [mem 0xbfeec000-0xbfeeffff] <= hda-intel, outside host bridge window

So it looks like both devices on bus 01 have memory BARs programmed where accesses will never reach the devices, because they aren't forwarded by the host bridge. With "pci=use_crs", we reprogram them to be inside the host bridge window:

  pci 0000:00:01.0: no compatible bridge window for [mem 0xbfe00000-0xbfefffff] <= P2P window outside upstream (host bridge) window
  pci 0000:01:00.0: no compatible bridge window for [mem 0xbfef0000-0xbfefffff] <= device outside P2P window (which has now been closed)
  pci 0000:01:00.1: no compatible bridge window for [mem 0xbfeec000-0xbfeeffff]
  pci 0000:00:01.0: BAR 14: assigned [mem 0xf2600000-0xf29fffff] <= moved P2P bridge mem window, now inside host bridge window
  pci 0000:01:00.0: BAR 2: assigned [mem 0xf2620000-0xf262ffff] <= video BAR moved inside P2P window
  pci 0000:01:00.1: BAR 0: assigned [mem 0xf2630000-0xf2633fff] <= hda-intel BAR moved inside P2P window

The fact that these two bus 01 devices are unreachable looks like a BIOS bug to me. The BIOS normally programs at least the video device so it works, and Linux shouldn't have to touch it. I think it just happens that with "pci=use_crs", we have enough information to work around the BIOS problem. I expect this is just a point problem with this particular BIOS, and it probably doesn't affect a whole class of machines.

It would be interesting to know what Windows reports for the host bridge windows, the P2P bus windows, and the bus 01 device BARs (you can see this information in the Device Manager). I assume it must be doing basically the same thing Linux does with "pci=use_crs".