diff mbox

[2/3] pci-scan: Fix handling of 32bit windows

Message ID 20170721073537.16095-3-aik@ozlabs.ru
State Rejected
Headers show

Commit Message

Alexey Kardashevskiy July 21, 2017, 7:35 a.m. UTC
From: Thomas Huth <thuth@redhat.com>

This zeroes bottom 4 bits of the prefetchable memory limit and
prefetchable memory base registers for 32bit windows
(the first hunk).

This simplifies updating of the prefetchable memory limit
(the second hunk).

Signed-off-by: Thomas Huth <thuth@redhat.com>
[aik: moved to a separate patch]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 slof/fs/pci-scan.fs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/slof/fs/pci-scan.fs b/slof/fs/pci-scan.fs
index 7bc6b98..d8f7c02 100644
--- a/slof/fs/pci-scan.fs
+++ b/slof/fs/pci-scan.fs
@@ -146,7 +146,8 @@  here 100 allot CONSTANT pci-device-vec
     ELSE
         pci-next-mem-align-1mb
         10 rshift                           \ | keep upper 16 bits
-        pci-max-mem @ 1- FFFF0000 and or    \ | and Insert mmem Limit (set it to max)
+        FFF0 and
+        pci-max-mem @ 1- FFF00000 and or    \ | and Insert mmem Limit (set it to max)
         swap 24 + rtas-config-l!            \ | and write it into the bridge
     THEN
 ;
@@ -173,10 +174,8 @@  here 100 allot CONSTANT pci-device-vec
         \ Update current variable (add space for hot-plugging and align it)
         pci-next-mem-extend-1mb
         1-                                  \ | make limit one less than boundary
-        FFFF0000 and                        \ | keep upper 16 bits
-        over 24 + rtas-config-l@
-        0000FFFF and                        \ | fetch original Value
-        or swap 24 + rtas-config-l!         \ | and write it into the bridge
+        10 rshift                           \ | keep upper 16 bits
+        swap 26 + rtas-config-w!
     THEN
 ;