From: loic@myri.com
To: ultralinux@vger.rutgers.edu, linux-alpha@vger.rutgers.edu,
linuxppc-dev@lists.linuxppc.org
Cc: feldy@myri.com
Subject: ioremap, virt_to_phys and pcidev->base_address consistency issues
Date: Thu, 17 Jun 1999 00:23:58 +0000 (XXX) [thread overview]
Message-ID: <14184.12536.601868.330309@blue1.myri.com> (raw)
[ I am not currently subscribed to all the mailing-lists, sorry
if this issue has been brought recently]
Hello,
I am looking for a simple way to map PCI memory space to both kernel
and user-space, and to map kernel memory to user-space.
ioremap, virt_to_phys and the base_address field of the pci_dev
structure have different meaning across architectures which makes it
more difficult that needed, to support all the linux archs.
Here is the status of things as I understand it:
ioremap function:
x86:
take a physical==bus address (note there is both ioremap and
ioremap_nocache. On >= P6 processors, if the kernel is not compiled
with mtrr support, the "cacheability" behaviour of plain ioremap may
depend on the BIOS, so you may want to use ioremap_nocache instead)
Alpha:
take a virtual kernel address
sparc64:
powerpc:
take a physical address
pcidev->base_address:
x86:
base_adress register === bus address + type bits
alpha:
gives a "special address" that code the bus number + bus base
address" meant to be used with the alpha specific dense_mem function.
sparc64:
gives the kernel virtual address to access the device from kernel
powerpc:
has some hacks so that it gives the physical address for some devices,
gives the bus address the rest of the time
virt_to_phys:
x86, Alpha, powerpc:
same than __pa() => give physical address
sparc64:
same than virt_to_bus => gives DMAable PCI bus address
(so I just use __pa now instead of virt_to_phys).
So what would be the right person to contact to try to make things
more consistent? Is there currently a standard way to map PCI memory
space both in the kernel and in user-space aside from using some
#ifdefs?
Loic PRYLLI
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
next reply other threads:[~1999-06-17 0:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-17 0:23 loic [this message]
1999-06-17 0:36 ` ioremap, virt_to_phys and pcidev->base_address consistency issues David S. Miller
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=14184.12536.601868.330309@blue1.myri.com \
--to=loic@myri.com \
--cc=feldy@myri.com \
--cc=linux-alpha@vger.rutgers.edu \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=ultralinux@vger.rutgers.edu \
/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).