aboutsummaryrefslogtreecommitdiff
path: root/slof
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-07-14 11:45:54 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2017-07-21 15:03:29 +1000
commitc4dd5b62f0d027dc653888f6e049bbb77f832cc4 (patch)
treee62734f4d30d25503c3e79824d1c3d524d356ea8 /slof
parent206cff5fc88231d06ec2465873814da1f85e2b00 (diff)
downloadSLOF-c4dd5b62f0d027dc653888f6e049bbb77f832cc4.zip
SLOF-c4dd5b62f0d027dc653888f6e049bbb77f832cc4.tar.gz
SLOF-c4dd5b62f0d027dc653888f6e049bbb77f832cc4.tar.bz2
pci: Avoid 32-bit prefetchable memory area if possible
PCI bridges can only have one prefetchable memory area. If we are already using 64-bit prefetchable memory regions, we can not use a dedicated 32-bit prefetchable memory region anymore. In that case the 32-bit BARs should all be located in the 32-bit non- prefetchable memory space instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'slof')
-rw-r--r--slof/fs/pci-properties.fs7
1 files changed, 6 insertions, 1 deletions
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
index b7bb534..6f8f013 100644
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -159,7 +159,12 @@
\ Setup a prefetchable 32bit BAR and return its size
: assign-mem32-bar ( bar-addr -- 4 )
dup pci-bar-size-mem32 \ fetch size
- pci-next-mem \ var to change
+ \ Do we have a dedicated 32-bit prefetchable area? If not, use MMIO
+ pci-next-mem @ IF
+ pci-next-mem
+ ELSE
+ pci-next-mmio
+ THEN
assign-bar-value32 \ and set it all
;