From owner-freebsd-hackers Tue May 11 8: 5:40 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from osgroup.com (unknown [38.229.41.6]) by hub.freebsd.org (Postfix) with ESMTP id 5A6BE15A04 for ; Tue, 11 May 1999 08:05:33 -0700 (PDT) (envelope-from stan@osgroup.com) Received: from stan166 ([38.229.41.237]) by osgroup.com (8.7.6/8.6.12) with SMTP id JAA24490 for ; Tue, 11 May 1999 09:54:06 -0500 Message-ID: <00e001be9bbf$c8961390$500a0a0a@stan166> From: "Stan Shkolny" To: Subject: vmapbuf (was:Which O/S routines are subject to change?) Date: Tue, 11 May 1999 10:06:00 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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() 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