I've tried goodle, and reading as many manuals and books I've found, but I still seems to miss something. So, and help or a pointer to the right guide will be great.
We have a customized board, with a PPC cpu (MPC 5200 from Motorola), that I've ported both U-Boot and linux to work with (linux version is Linux-2.4.21-rc1).
On this board, we have two memories:
SDRAM, on Chip Select (CS) 0, mapped to 0x00000000-0x03ffffff (8MB) - I have no problem with accessing this memory.
SRAM, on CS1, mapped to 0xef000000-0xefffffff (but only part of it is really available - up to 0xef03ffff).
I need to let user space application access the second memory (the SRAM) directly, so I'm trying to write a drive which will support "mmap" system call.
So, I have a char device, which is registered OK, open OK, have couple of IOCTLs (for some other stuff I need there), and everything works just fine.
Then I've implemented the mmap function, using "remap_page_range", everything seems to be working fine (I've checked all returned codes to be sure, both in the driver, and in the user space application.
Calling mmap from the user application returns an address, but trying to access this address, yields an error message:
do_wp_page: bogus page at address 30027024 (page 0xc23358e0) VM: killing process testSram
(0x30027000 is the address that mmap returned, and I tried to access 24 bytes after this. I've mapped 0x40000 bytes, so there shouldn't be a problem).
The memory (the same byte I try to access above), is accessible from the boot loader (U-boot).
Any idea? Any other way to give the user access to the memory without mmap?
Thanks, Ilan
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]