From: Oliver Korpilla <okorpil@fh-landshut.de>
To: "Heater, Daniel (GE Infrastructure)" <Daniel.Heater@gefanuc.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: [Fwd: Memory layout question]
Date: Tue, 25 May 2004 15:56:21 +0200 [thread overview]
Message-ID: <40B35085.7090006@fh-landshut.de> (raw)
In-Reply-To: <DB1DE297F535B340AEAE1E51B221C3D0016B3DCB@FTWMLVEM02.e2k.ad.ge.com>
Hello!
It's not done and over with virt_to_bus() etc.
What we basically got here is a PCI configuration and portability issue.
On the MVME2100, e.g., the PCI host bridge grabs I/O resource 0x80000000
- 0xFFFFFFFF.
On the VMIC driver it requests an I/O memory ressource, and a region on
the I/O memory is awarded.
In order to request a region being mapped by the PCI host bridge, one
would have to request a region of the PCI host bridge resource, not the
I/O resource.
As far as I can deduce from looking at kernel/resource.c
allocate_resource(), find_resource() and __request_resource() have no
recursion, so one cannot request an appropriate region from the
iomem_resource.
I guess to do it portably PCI functions may be needed, though I'm still
looking at it.
From my current knowledge, the driver may have 3 issues:
1) How to request a "safe" range of PCI addresses.
2) How to map those PCI addresses safely to virtual (kernel) and bus
(PCI device) addresses.
3) Using the safer readb/readw ... etc. calls, or stuff like memcpy_io
to portably access the VME bus, perhaps in read() and write()
implementations, perhaps deprecating the not-so-portable dereferencing
of a pointer.
1) and 2) are non-issues on the x86, because of the PCI and memory
layout. So all these 3 issues are about portability.
I'm looking into this, starting with 2) currently.
Maybe the driver would be easier to port and maintain, if the universe
gets treated like a "proper" PCI device right from the start. I'm not
experienced enough to say something about that right now.
With kind regards,
Oliver Korpilla
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-05-25 13:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 15:25 [Fwd: Memory layout question] Heater, Daniel (GE Infrastructure)
2004-05-19 6:51 ` Differing PCI layouts trigger porting driver problem [Was: " Oliver Korpilla
2004-05-25 13:56 ` Oliver Korpilla [this message]
2004-05-26 8:37 ` [Fwd: " Oliver Korpilla
2004-05-26 11:56 ` Oliver Korpilla
2004-06-02 7:42 ` Successful master window access Oliver Korpilla
2004-06-07 15:30 ` VME driver patch for PowerPC Oliver Korpilla
2004-06-08 9:05 ` VME driver patch for PowerPC [Continued] Oliver Korpilla
2004-06-08 9:59 ` VME driver change suggestion Oliver Korpilla
2004-06-09 11:25 ` VME driver patch for PowerPC Oliver Korpilla
2004-06-09 12:59 ` Oliver Korpilla
2004-06-09 13:14 ` Complete " Oliver Korpilla
-- strict thread matches above, loose matches on Subject: below --
2004-05-25 14:17 [Fwd: Memory layout question] Heater, Daniel (GE Infrastructure)
2004-05-26 6:21 ` Oliver Korpilla
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=40B35085.7090006@fh-landshut.de \
--to=okorpil@fh-landshut.de \
--cc=Daniel.Heater@gefanuc.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
/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).