Date: Tue, 11 May 1999 10:06:00 -0500 From: "Stan Shkolny" <stan@osgroup.com> To: <hackers@FreeBSD.ORG> Subject: vmapbuf (was:Which O/S routines are subject to change?) Message-ID: <00e001be9bbf$c8961390$500a0a0a@stan166>
next in thread | raw e-mail | index | archive | help
Well, I see that I need to ask a more precise question. My character device driver receives a pointer to a user data buffer in the user's address space. I need to DMA those data. For this, I need to bring the pages into memory and lock them before initiating the DMA. My book tells about physio(). However, I found it unconvenient for me. One reason is that its functionality doesn't fit well into my driver's architecture. Another reason is that it calls the vmapbuf() to bring the data buffer into memory. vmapbuf(), in turn, maps the buffer into the kernel address space. I don't want to do this, since I have no need for the data buffer in the kernel space since the only thing that touches it is the DMA engine. In other words, I want to write my own routine. In general, physio() looks like this: if useracc() vmapbuf() *strategy() vunmapbuf() endif And vmapbuf() like this: vm_fault_quick() vm_page_hold() pmap_kenter() // maps the memory into the kernel space And I want to write something like this in my driver: if useracc() vm_fault_quick() vm_page_hold() <initiating DMA> endif So, is this likely for the above 3 functions to change or disappear in the next versions? Can they be considered "stable"? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00e001be9bbf$c8961390$500a0a0a>