440GX: mapping PCI address

2 messages, 2 authors, 2004-07-22 · open the first message on its own page

440GX: mapping PCI address

From: Barbier, Renaud (GE Infrastructure) <hidden>
Date: 2004-07-22 09:58:03

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.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: 440GX: mapping PCI address

From: Gerhard Jaeger <hidden>
Date: 2004-07-22 11:47:50

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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help