[SLOF] [PATCH] pci: Generate a 64-bit range property if necessary
Thomas Huth
thuth at redhat.com
Fri Apr 28 13:45:07 AEST 2017
If the memory range exceeds the 32-bit boundary, we should generate
a 64-bit range property entry instead of a 32-bit entry.
Signed-off-by: Thomas Huth <thuth at redhat.com>
---
slof/fs/pci-properties.fs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
index d446473..3d14181 100644
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -411,8 +411,9 @@
4 pick 28 + rtas-config-l@ \ fetch upper Basebits ( addr paddr plen limit.31:0 base.31:0 base.63:32 )
20 lshift or swap \ and calc Base ( addr paddr plen base.63:0 limit.31:0 )
4 pick 2C + rtas-config-l@ \ fetch upper Limitbits ( addr paddr plen base.63:0 limit.31:0 limit.63:32 )
- 20 lshift or \ and calc Limit ( addr paddr plen base.63:0 limit.63:0 )
- 42000000 pci-bridge-gen-range \ and generate it ( addr paddr plen )
+ dup -rot 20 lshift or swap \ and calc Limit ( addr paddr plen base.63:0 limit.63:0 limit.63:32 )
+ IF 43000000 ELSE 42000000 THEN \ 64-bit or 32-bit? ( addr paddr plen base.63:0 limit.63:0 type )
+ pci-bridge-gen-range \ and generate it ( addr paddr plen )
;
\ generate an io space to the ranges property
--
1.8.3.1
More information about the SLOF
mailing list