Success! This has been painful, and I appreciate the help from the list. I just have one more question.
I am not using 2.6 anymore, I had to switch to 2.4 b/c of glibc issues. In kernel 2.4.26 I do not need to perform ioremap on memory not used due to the mem bootparam. I just need to run remap_page_range with the actual physical address in the mmap function. Why is this? Why don't I have to call ioremap and iounmap on memory above the amount set in mem= bootparam? Does this have to do with high_memory support for this kernel? Thank you, Nachum Kanovsky -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muli Ben-Yehuda Sent: Friday, May 07, 2004 1:55 PM To: Gilad Ben-Yossef Cc: Nachum Kanovsky; [EMAIL PROTECTED] Subject: Re: Debian Kernel 2.6 & bigphysarea Nachum Kanovsky wrote: > > Can anyone tell me how to go about allocating large physical memory > > for use by dma and usermode programs. I used to use > > bigphysarea_alloc, mem_map_reserve - and then for mapping I would > > set the vma to VM_LOCKED and I would call remap_page_range. > > > > What do I do with kernel 2.6 for this? How big is big, and more importantly, does it need to be physically contiguous? On Thu, May 06, 2004 at 05:12:53PM +0300, Gilad Ben-Yossef wrote: > I'm might be smoking crack here, but I seem to remember that > bigphysarea was > an outside patch and not part of Linus vanilla kernel. Not sure about it > though. That's what I recall as well. > BTW, one extremly ugly trick you can do without this patch is to use > the > kernel boot parameter "mem=" to create a "hole" in the memory map that is > managed by the kernel (same thing that happens for video card "stolen" > memroy, really) and simply mem_map_reserve and remap_page_range it. But I > wouldn't recomend going this way for anything which is not an embedded system > that you have absolute control over and even then it's ugly. You also need to be sure your arch doesn't have weird memory setups with holes that must not be writen to above what you give mem, since the kernel believes you and does not protect you from using these holes. Also, at least on one arch, the kernel will happily scribble above what you give mem. Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ ================================================================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]
