* Buggy mmap()??
@ 2004-04-02 8:15 Jacky Lam
0 siblings, 0 replies; only message in thread
From: Jacky Lam @ 2004-04-02 8:15 UTC (permalink / raw)
To: linuxppc-embedded
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-02 8:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-02 8:15 Buggy mmap()?? Jacky Lam
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).