Can't mmap the top 1MB of /dev/mem?

Dan Malek dan at
Fri Jun 23 04:54:29 EST 2000

Pavel Roskin wrote:

> I know that program. FLASH_MEM_SIZE is a small number used only in the
> first mmap() to determine the size of the flash.

Yes, but then it re-maps based upon the flash devices found....but I'll
bet I don't map the top boot sector.......

> ..... If you make it so big
> that (int)(FLASH_MEM_ADDR+FLASH_MEM_SIZE)==0 then mmap() fails.

So, this should be a pretty obvious boundary condition bug in
drivers/char/mem.c or one of the Linux MM functions.  You want to
learn about MMUs?  Go check some of those files for inspiration......

	-- Dan

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list