From: Tom Cooksey <thomas.cooksey@trolltech.com>
To: linux-embedded mailing list <linux-embedded@vger.kernel.org>
Subject: Getting physical addresses of mmap'd pages from userspace
Date: Fri, 10 Oct 2008 18:15:05 +0200 [thread overview]
Message-ID: <200810101815.06249.thomas.cooksey@trolltech.com> (raw)
Is there any way to get the physical address of mlock()'d memory from userspace?
I want to avoid writing a kernel module to do it if possible, but I can't see any API which will give me the address? I'm not sure if doing mlock() will even pin the physical address (although I can't see why the physical location would change other than when the page is swapped out and back in again). Is there a syscall I've overlooked somewhere?
The only way I can see to do it would be to pass a kernel parameter in uBoot and tell the kernel not to use e.g. the top 2MB of physical memory. I think I could then mmap /dev/mem to access the physical memory from my application, but pass the physical address to my device which reads from the memory my application has written. Does anyone think this would work?
Cheers,
Tom
next reply other threads:[~2008-10-10 16:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 16:15 Tom Cooksey [this message]
2008-10-10 16:37 ` Getting physical addresses of mmap'd pages from userspace Bart Van Assche
2008-10-10 19:12 ` Robert Schwebel
2008-10-13 6:33 ` Tom Cooksey
2008-10-13 7:00 ` Robert Schwebel
2008-10-13 7:20 ` Tom Cooksey
2008-10-13 7:28 ` Thomas Petazzoni
2008-10-13 7:31 ` Robert Schwebel
2008-10-13 12:50 ` Bill Gatliff
2008-10-13 13:23 ` Robert Schwebel
2008-10-13 15:58 ` George G. Davis
2008-10-13 16:09 ` Robert Schwebel
2008-10-14 6:36 ` Tom Cooksey
2008-10-14 15:47 ` Bill Gatliff
2008-10-15 7:06 ` Tom Cooksey
2008-10-15 8:30 ` James Chapman
2008-10-15 18:27 ` Robert Schwebel
2008-10-15 18:29 ` Bill Gatliff
2008-10-13 9:37 ` Gilad Ben-Yossef
[not found] ` <48F31155.6090603@codefidence.com>
2008-10-13 9:38 ` Tom Cooksey
2008-10-13 12:48 ` Bill Gatliff
2008-10-13 14:45 ` Tom Cooksey
2008-10-13 15:09 ` Daniel THOMPSON
2008-10-13 17:21 ` George G. Davis
2008-10-13 17:29 ` Chris
2008-10-14 6:46 ` Tom Cooksey
2008-10-14 7:31 ` Daniel J Laird
2008-10-14 9:03 ` Tom Cooksey
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=200810101815.06249.thomas.cooksey@trolltech.com \
--to=thomas.cooksey@trolltech.com \
--cc=linux-embedded@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 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.