On Sun, Jan 30, 2005 at 12:48:27PM +0200, Ilan Finci wrote: > 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.
remap_page_range has some peculiarities. In particular, are you setting the pages you are mapping to PageReserved first? See this discussion: http://lwn.net/Articles/28746/ (which also recommends using a nopage VM op rather than remap_page_range). > 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 Are your pages appearing in mem_map? the error implies that they aren't. The best generic advice I can give you is to find some code someone else already wrote (that works...) that does the same thing or something close to it. In this case, that would be a driver that maps memory that is not accessible as part of normal system ram - maybe graphics memory? Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/
signature.asc
Description: Digital signature