From: "Jacky Lam" <jackylam@astri.org>
To: <linuxppc-embedded@lists.linuxppc.org>
Subject: Buggy mmap()??
Date: Fri, 2 Apr 2004 16:15:17 +0800 [thread overview]
Message-ID: <000c01c4188a$a2ce7790$0a14050a@JACKYLAM> (raw)
Dear all,
Currently,I write a small program to access /dev/mem. However, I find
that the data I get from mmap() is different from what I get from normal
read(). I have heard about there is some bug in mmap() in PPC. Is there any
patch to solve this? (I am using Monvista vista 3.0 kernel and libraries)
The program I used is:
void main(void)
{
int fd;
char *addr;
char c;
fd=open("/dev/mem", O_RDONLY);
addr=mmap(NULL, 0x00100000, PROT_READ, MAP_SHARED, fd, 0x00300000);
printf("%x\n", *addr);
lseek(fd, 0x00300000, SEEK_SET);
read(fd, &c, 1);
printf("%x\n", c);
close(fd);
}
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
reply other threads:[~2004-04-02 8:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='000c01c4188a$a2ce7790$0a14050a@JACKYLAM' \
--to=jackylam@astri.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox