aboutsummaryrefslogtreecommitdiff
path: root/slof
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2017-04-28 15:21:57 +1000
committerAlexey Kardashevskiy <aik@ozlabs.ru>2017-04-28 16:56:42 +1000
commit75a42176b7bca4551664be3db47bd23de1425b74 (patch)
tree298c9e52d1b12abc49bd2a04abb07d31b384ab80 /slof
parentd90e32c661608d3ba9cbf77d66c6b8efb6219bdc (diff)
downloadSLOF-75a42176b7bca4551664be3db47bd23de1425b74.zip
SLOF-75a42176b7bca4551664be3db47bd23de1425b74.tar.gz
SLOF-75a42176b7bca4551664be3db47bd23de1425b74.tar.bz2
pci: Fix assigned-addresses for 64bit nonprefetchable BAR
975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window" moved 64bit non-prefetchable BARs into 32bit non-prefetchable window of a bridge. However the resource would still be advertised as 64bit in the "assigned-addresses" property so fix the resource type. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'slof')
-rw-r--r--slof/fs/pci-properties.fs6
1 files changed, 4 insertions, 2 deletions
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
index 8594e5d..693db65 100644
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -250,14 +250,16 @@
\ ***************************************************************************************
\ Generating the assigned-addresses property
\ ***************************************************************************************
-\ generate assigned-addresses property for 64Bit MEM-BAR and return BAR-reg-size
+\ generate assigned-addresses property for non-prefetchable 64Bit MEM-BAR and
+\ return BAR-reg-size. Note: We use "32-bit" as space code here, since these
+\ BARs are allocated from the 32-bit MMIO window (see assign-mmio64-bar)
: gen-mem64-bar-prop ( prop-addr prop-len bar-addr -- prop-addr prop-len 8 )
dup pci-bar-size-mem64 \ fetch BAR Size ( paddr plen baddr bsize )
dup IF \ IF Size > 0
>r dup rtas-config-l@ \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size)
over 4 + rtas-config-l@ \ | fetch upper 32 bits ( paddr plen baddr val.lo val.hi R: size)
20 lshift + -10 and >r \ | calc 64 bit value and save it ( paddr plen baddr R: size val )
- 83000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val )
+ 82000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val )
r> encode-64+ \ | Encode assigned addr ( paddr plen R: size )
r> encode-64+ \ | Encode size ( paddr plen )
ELSE \ ELSE