Dan Malek wrote:
How about a little more info, like what kernel are you using and what are the parameters you are sending to mmap()?
Linux (none) 2.4.31 #412 SMP Fri Jul 15 16:26:05 EDT 2005 mips unknown (unmodified kernel from linux-mips.org). It's running on the SB1 on a Broadcom 1250 board. I mmap() with: int mem_fd = open("/dev/mem", O_RDWR); void* mem_base = mmap(NULL, DRIVER_MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, DRIVER_MEM_PHYS_BASE); Where driver_mem_phys_base = 253M, and driver_mem_size=1M.
The better way to approach this is to place an mmap() function in the associated driver that works in conjunction with the application to gain shared access as you expect. This also closes a hole where an errant application could write into unexpected places through /dev/mem.
Could you point me to an example of this so I can figure out how to do it? Thanks, David