From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org, thuth@redhat.com
Cc: aik@ozlabs.ru, nikunj@linux.vnet.ibm.com, david@gibson.dropbear.id.au
Subject: [PATCH v2 1/4] pci: program correct bridge limit registers during probe
Date: Mon, 27 Apr 2015 13:32:30 +0530 [thread overview]
Message-ID: <1430121753-24818-2-git-send-email-nikunj@linux.vnet.ibm.com> (raw)
In-Reply-To: <1430121753-24818-1-git-send-email-nikunj@linux.vnet.ibm.com>
According to the pci-to-pci bridge specification, memory/io limit
should be the last address of the window, while currently its set to
last + 1. It broke when the memory range was increased and hit 32-bit
limit. The last address in the window is 0xFFFF.FFFF and max-mmio is
0x1.0000.0000, because of the bug 0x0000 got programmed in the memory
limit register. All the mmio reads across the pci-to-pci bridge
started failing during probe.
All pci-bridge-set-[mmio,mem,io]-base sufferred from similar problem.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
slof/fs/pci-scan.fs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/slof/fs/pci-scan.fs b/slof/fs/pci-scan.fs
index 15d0c8e..b8b9fe6 100644
--- a/slof/fs/pci-scan.fs
+++ b/slof/fs/pci-scan.fs
@@ -87,7 +87,7 @@ here 100 allot CONSTANT pci-device-vec
pci-next-mmio @ 100000 #aligned \ read the current Value and align to 1MB boundary
dup 100000 + pci-next-mmio ! \ and write back with 1MB for bridge
10 rshift \ mmio-base reg is only the upper 16 bits
- pci-max-mmio @ FFFF0000 and or \ and Insert mmio Limit (set it to max)
+ pci-max-mmio @ 1- FFFF0000 and or \ and Insert mmio Limit (set it to max)
swap 20 + rtas-config-l! \ and write it into the bridge
;
@@ -116,7 +116,7 @@ here 100 allot CONSTANT pci-device-vec
2 pick 2C + rtas-config-l! \ | and set the Limit
THEN \ FI
10 rshift \ keep upper 16 bits
- pci-max-mem @ FFFF0000 and or \ and Insert mmem Limit (set it to max)
+ pci-max-mem @ 1- FFFF0000 and or \ and Insert mmem Limit (set it to max)
swap 24 + rtas-config-l! \ and write it into the bridge
;
@@ -150,7 +150,7 @@ here 100 allot CONSTANT pci-device-vec
swap 30 + rtas-config-l! \ | and write it into the Base-Upper16-bits
THEN \ FI
8 rshift 000000FF and \ keep upper 8 bits
- pci-max-io @ 0000FF00 and or \ insert upper 8 bits of Max-Limit
+ pci-max-io @ 1- 0000FF00 and or \ insert upper 8 bits of Max-Limit
over rtas-config-l@ FFFF0000 and \ fetch original Value
or swap 1C + rtas-config-l! \ and write it into the bridge
;
--
1.8.3.1
next prev parent reply other threads:[~2015-04-27 8:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 8:02 [PATCH v2 0/4] PCI: Generic fixes and moving enumeration back to QEMU Nikunj A Dadhania
2015-04-27 8:02 ` Nikunj A Dadhania [this message]
2015-04-27 8:17 ` [PATCH v2 1/4] pci: program correct bridge limit registers during probe Thomas Huth
2015-04-27 8:02 ` [PATCH v2 2/4] pci: Support 64-bit address translation Nikunj A Dadhania
2015-04-27 9:32 ` Thomas Huth
2015-04-27 9:57 ` Benjamin Herrenschmidt
2015-04-27 10:12 ` Thomas Huth
2015-04-27 8:02 ` [PATCH v2 3/4] usb: support 64-bit pci bars Nikunj A Dadhania
2015-04-27 8:26 ` Thomas Huth
2015-04-27 8:02 ` [PATCH v2 4/4] pci: Use QEMU created PCI device nodes Nikunj A Dadhania
2015-04-27 8:38 ` Thomas Huth
2015-04-27 9:56 ` Nikunj A Dadhania
2015-04-27 10:14 ` Thomas Huth
2015-04-29 3:12 ` [PATCH v2 0/4] PCI: Generic fixes and moving enumeration back to QEMU Alexey Kardashevskiy
2015-04-29 5:22 ` Nikunj A Dadhania
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430121753-24818-2-git-send-email-nikunj@linux.vnet.ibm.com \
--to=nikunj@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).