All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: "Barbier, Renaud (GE Infrastructure)" <Renaud.Barbier@ge.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: 440GX: mapping PCI address
Date: Tue, 27 Jul 2004 13:29:29 -0700	[thread overview]
Message-ID: <20040727132929.A12403@home.com> (raw)
In-Reply-To: <45ABD2373C33C4459D42B40EC4F346F2026215B0@FTWMLVEM03.e2k.ad.ge.com>; from Renaud.Barbier@ge.com on Tue, Jul 27, 2004 at 01:20:27PM -0500


On Tue, Jul 27, 2004 at 01:20:27PM -0500, Barbier, Renaud (GE Infrastructure) wrote:
>
> ok. I am lost here.
> I have checked the linux source code and can see
> comments regarding fix for the 36-bit address.
> So I would think the current BSP I have can support what I need.

Did you get the patch I mentioned? It hacks remap_page_range() to
call the 36-bit fixups and handle a u64 phys addr. What "BSP"
are you talking about?  Are you running a stock kernel tree?

> Still even though I am getting an address from mmap access, to the location freezes my machine.
> Here is the code.
> fd=open("/dev/mem", O_RDWR);
>
> /* test fd for error */
> ptr=(unsigned int *)mmap(0, 4096, PROT_READ | PROT_WRITE,
>                              MAP_SHARED, fd, 0xec00000); or /* 0x80002000 */
> printf("ptr = 0x%x\n", (unsigned int)ptr);
>
> the returned address is 0x30019000.
>
> If I understand correctly 0x0ec00000 should be translated by the kernel
> to 0x20ec00000 to map the PCI configuration register.

Only if the patch is applied.

> I can see the remapping being done when using ioremap in the drivers but not
> when doing mmap at user level. So could be wrong in my system?
>
>
> Actually, what do you do if you have 512MB of memory? I guess change the "trap" area.

I don't follow, how does 512MB of memory change things in your
case? The hack does make some assumptions but it works for most
peoples needs.

-Matt

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

  reply	other threads:[~2004-07-27 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-27 18:20 440GX: mapping PCI address Barbier, Renaud (GE Infrastructure)
2004-07-27 20:29 ` Matt Porter [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-22  9:58 Barbier, Renaud (GE Infrastructure)
2004-07-22 11:47 ` Gerhard Jaeger

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=20040727132929.A12403@home.com \
    --to=mporter@kernel.crashing.org \
    --cc=Renaud.Barbier@ge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.