From: mark slutz <mystuff.mark@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: mmap going to wrong physical address
Date: Wed, 3 Nov 2004 14:51:50 -0700 [thread overview]
Message-ID: <6707bb6404110313514013794e@mail.gmail.com> (raw)
I am writting an application that needs control over large (1gig+)
portions of contiguous memory. I am currently doing this by using
mem=1024m during boot. My system is a dual opteron with 5 gig of
memory. In my program I have
if ((fd=open("/dev/mem", O_RDWR))<0)
{
perror("open");
exit(-1);
}
PtrMemoryBase = (void *) mmap64(
NULL,
size,
PROT_READ | PROT_WRITE,
MAP_FILE | MAP_SHARED,
fd,
base );
size = 1MB
I also have -D_FILE_OFFSET_BITS=64.
If base is between 1 and 3 gig the process works fine. When base is 4
gig + the mmap64 works but the memory does not seem to be mapped to
the base location. I write a pattern to PtrMemoryBase then have my
hardware start doing DMA transfers from the base address but I do not
get the data I wrote to PtrMemoryBase.
Thanks for any help
Mark
next reply other threads:[~2004-11-03 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-03 21:51 mark slutz [this message]
2004-11-04 21:38 ` mmap going to wrong physical address Bill Davidsen
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=6707bb6404110313514013794e@mail.gmail.com \
--to=mystuff.mark@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 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.