From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Hollis <hollis@austin.rr.com>
Cc: Matt Porter <mporter@mvista.com>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: PReP and generic PCI resource assignment
Date: Wed, 8 Aug 2001 12:27:31 +0200 [thread overview]
Message-ID: <20010808102731.24623@smtp.adsl.oleane.com> (raw)
In-Reply-To: <01080800112002.00491@silence.internal>
>
>The problem is that root in this case is the PCI memory resource of the host
>bridge, which correctly starts at 0xc0000000... but NOT in bus terms. In bus
>terms it starts at 0x0. (CPU physical 0xc0000000 = PCI bus 0x0 [IO mem].) So
>the new resource is assigned 0xc1000000, which is written back to the BAR
>with pcibios_update_resource... which is way wrong.
The resource is in CPU space. The problem must be with
pcibios_update_resource, which is responsible for doing the proper
offset. If you look closely, it substracts hose->pci_mem_offset from the
resource before writing it to the BAR.
If your hose pci_mem_offset is wrong, then it can't work. It should be
0xc0000000 on PReP.
>Now if resources could be assigned properly in the first place this code path
>wouldn't be taken, but quite a few things fail (request_resource's and
>pci_find_parent_resource's) and it's proving difficult to track down why
>(maybe I've been staring at this too long).
>
>Anyways, when I change "root->start" above to be 0, the symptom is fixed, but
>that's clearly a hack. I don't see how anything PReP (system IO nor IO
>memory) could escape generic resource assignment unscathed though.
The fix is to have pci_mem_offset set properly when setting up the
pci_controller structure.
ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-08-08 10:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-08 5:11 PReP and generic PCI resource assignment Hollis
2001-08-08 5:43 ` ashish anand
2001-08-08 12:23 ` Benjamin Herrenschmidt
2001-08-08 10:27 ` Benjamin Herrenschmidt [this message]
2001-08-09 1:34 ` Hollis
2001-08-09 10:18 ` Benjamin Herrenschmidt
2001-08-09 16:14 ` Matt Porter
2001-08-10 8:38 ` Geert Uytterhoeven
2001-08-10 9:56 ` Benjamin Herrenschmidt
2001-08-10 10:51 ` Geert Uytterhoeven
2001-08-10 19:34 ` Hollis Blanchard
2001-08-11 17:43 ` Geert Uytterhoeven
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=20010808102731.24623@smtp.adsl.oleane.com \
--to=benh@kernel.crashing.org \
--cc=hollis@austin.rr.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=mporter@mvista.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).