diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2017-04-24 12:57:44 +1000 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2017-04-26 14:27:27 +1000 |
commit | 975b31f80aff26addee5d70c34de9cd1b0a204ca (patch) | |
tree | 22dab6776ff304a88aa4af5d419ed1a374aab316 | |
parent | 0ba3b03ba3fee180bbd76e43434fae42b2759f6f (diff) | |
download | SLOF-975b31f80aff26addee5d70c34de9cd1b0a204ca.zip SLOF-975b31f80aff26addee5d70c34de9cd1b0a204ca.tar.gz SLOF-975b31f80aff26addee5d70c34de9cd1b0a204ca.tar.bz2 |
pci: Put non-prefetchable 64bit BARs into 32bit MMIO window
At the moment 64bit non-prefetchable BARs of devices behind PCI p2p
bridge go to a 64bit prefetchable windows which is not correct and
causes linux guests to fail to ioremap() such resources.
This moves 64bit non-prefetchable BARs 32bit non-prefetchable window.
Note that this does not make distinction between P2P and PHB so
from now on XHCI BARs will be allocated from 32bit MMIO space.
However since most 64bit-MMIO-capable devices have prefetchable BARs,
and XHCI BAR is just 4K (so it is unlikely to cause any space problems),
this should not affect usual behavior.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
---
This fixes QEMU's XHCI when it is put on a P2P PCI bridge.
There is a little naming confusion as it may look like the patch
is changing assignment for all 64bit BAR but it does not as:
- "mmio" is used for non-prefetchable memory,
- "mem" is used for prefetchable memory.
-rw-r--r-- | slof/fs/pci-properties.fs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs index e6fd843..8594e5d 100644 --- a/slof/fs/pci-properties.fs +++ b/slof/fs/pci-properties.fs @@ -166,11 +166,7 @@ \ Setup a non-prefetchable 64bit BAR and return its size : assign-mmio64-bar ( bar-addr -- 8 ) dup pci-bar-size-mem64 \ fetch size - pci-next-mem64 @ 0 = IF \ Check if we have 64-bit memory range - pci-next-mmio - ELSE - pci-next-mem64 \ for board-qemu we will use same range - THEN + pci-next-mmio assign-bar-value64 \ and set it all ; |