Thanks for your reply Sander!

I am using MAP_PRIVATE becouse if I use MAP_SHARED I get "Bus error"
and I my program ends. I am doing this:
f=fopen("/dev/mem","rw");
registros_dsp = mmap (0, 8096, PROT_READ | PROT_WRITE,
                                      MAP_FILE  | MAP_SHARED,
                                      fileno(f), 0x88500000);

I can read without any problem:
printf ("0x88500000: 0x%X\n", registros_dsp [0]);

But if I try to write (for example: registros_dsp [0] = 25;)
I get the error:
do_wp_page: bogus page at address 4012c000
VM: killing process control

Thanks,
Carlos
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to