|
|
Log in / Subscribe / Register

Driver porting: supporting mmap()

Driver porting: supporting mmap()

Posted Feb 17, 2005 6:07 UTC (Thu) by fleetinglife (guest, #27641)
Parent article: Driver porting: supporting mmap()

Does Kernel 2.6.0 support reserving the highest physical memory using "mem=*M". If it do, where should I write this into grub.conf?

Any help will be appreciated.


to post comments

Driver porting: supporting mmap()

Posted Feb 21, 2005 1:38 UTC (Mon) by fleetinglife (guest, #27641) [Link]

I test this on another machine and it succeeded. It seems the 2.6.0 kernrl didn't work normally on the original machine.

But I encounter another question now.

I reserve a 4M memory at boot time. In my driver I support mmap method by calling remap_page_range() function with (TOTAL_MEMORY_SIZE - 4M) as the physical memory start address parameter.

In the driver I access the memory block with the pointer returned by ioremap(TOTAL_MEMORY_SIZE - 4M, 4M). It seems work. In App I write some data into the pointer returned by mmap, and dump the memory block in the driver, I find the output isn't the same as I wrote at App side. What's wrong with the driver?

BTW, my driver supports read/write methods, too. In them I use copy_to_user/copy_from_user. After write in App, the driver dumps the memory block, the output is correct.

How can I support mmap correctly?

Any help will be appreciated.

Driver porting: supporting mmap()

Posted May 28, 2007 23:22 UTC (Mon) by rael (guest, #40124) [Link]

please refer to Documentation/kernel-parameters.txt:
the mem=nn[KMG] kernel parameter still exists.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds