From: Gerhard Jaeger <g.jaeger@sysgo•com>
To: <linuxppc-embedded@lists•linuxppc.org>
Subject: Re: 440GX: mapping PCI address
Date: Thu, 22 Jul 2004 13:47:50 +0200 [thread overview]
Message-ID: <200407221347.50407.g.jaeger@sysgo.com> (raw)
In-Reply-To: <45ABD2373C33C4459D42B40EC4F346F2024CA06C@FTWMLVEM03.e2k.ad.ge.com>
Hi,
checkout
arch/ppc/mm/pgtable.c
there you'll find the ioremap function which is used to remap physical
addresses. This function calls internaly fixup_big_physaddr(), defined in
arch/ppc/kernel/ibm44x_common.c
This fixup_big_physaddr() adjusts some 32bit addresses to some corresponding
36bit addresses, which can be mapped by the kernel by calling ioremap64.
Your example:
Calling mmap with the address 0x80002000 (see also include/asm-ppc/ibm44x.h)
will map the PCI area, by trapping this 0x80002000 and making a 36bit address
out of it. There a 3 "trap" areas defined:
/*
* 36-bit trap ranges
*/
#define PPC44x_IO_LO 0x40000000
#define PPC44x_IO_HI 0x40001000
#define PPC44x_PCICFG_LO 0x0ec00000
#define PPC44x_PCICFG_HI 0x0ec7ffff
#define PPC44x_PCIMEM_LO 0x80002000
#define PPC44x_PCIMEM_HI 0xffffffff
Hope this helps,
Gerhard
On Thursday 22 July 2004 11:58, Barbier, Renaud (GE Infrastructure) wrote:
> As you know the PCI address(and other embedded device) are seen through a
> 36-bit address space.
>
> How do you map this address from user space?
>
> I have seen a message from 2002 saying it is not supported. Anything new
> since then?
>
> thanks.
--
Gerhard Jaeger g.jaeger@sysgo•com
SYSGO AG Embedded and Real-Time Software
Voice: + 49 731 94683-0 Fax: + 49 731 94683-10
www.sysgo.com | www.elinos.com | www.osek.de | www.imerva.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-22 11:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-22 9:58 440GX: mapping PCI address Barbier, Renaud (GE Infrastructure)
2004-07-22 11:47 ` Gerhard Jaeger [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-22 14:43 Barbier, Renaud (GE Infrastructure)
2004-07-22 16:20 ` Matt Porter
2004-07-27 18:20 Barbier, Renaud (GE Infrastructure)
2004-07-27 20:29 ` Matt Porter
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=200407221347.50407.g.jaeger@sysgo.com \
--to=g.jaeger@sysgo$(echo .)com \
--cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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