mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "yogeshwar sonawane" <yogyas@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Accessing 64-bit BARs
Date: Thu, 4 Oct 2007 14:23:03 +0530	[thread overview]
Message-ID: <b681c62b0710040153w5b4779fat1ccc7fa3e5775c2c@mail.gmail.com> (raw)

Hello all,

For accessing memory-mapped 64bit-BAR regions of a PCI card, the
respective BAR regions has to be made accessible to the kernel using
ioremap() function. Then readl()/writel() can be used on the address
returned by ioremap().

I am doing the similar steps to access the BARs of a card.
I observed some change in the behaviour in two different kernels.

Start physical addr of BAR is allocated by BIOS.
In linux-2.6.9, whether BAR start phys addr is below OR above 4GB,
i.e. whether 32-bit BAR phys addr(all higher bits 0) OR 64-bit phys
addr(some higher bits non-zero), I am able to access the BAR region
using ioremap() & then readl()/writel().

For linux-2.6.22-8, if BAR start phys addr is below 4GB, things are
working fine here also.

But, for linux-2.6.22-8, when BAR start phys addr is above 4GB, I am
not able to read/write on the BAR region. ioremap() is not failing.
But read data is all 1's instead of actual data.

Any ideas on where to look for?
Is there any change in the way of accessing 64-bit BAR?
OR
i am missing any step ?

For info - I am using 64-bit OS on x86_64 arch.

-Yogeshwar

             reply	other threads:[~2007-10-04  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04  8:53 yogeshwar sonawane [this message]
2007-10-04 12:40 ` Rolf Eike Beer
2007-10-04 15:26   ` Roland Dreier
2007-10-05  3:57     ` yogeshwar sonawane

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=b681c62b0710040153w5b4779fat1ccc7fa3e5775c2c@mail.gmail.com \
    --to=yogyas@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®