From owner-freebsd-hackers@FreeBSD.ORG Sat May 13 00:36:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86C0F16A494 for ; Sat, 13 May 2006 00:36:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E3A443D46 for ; Sat, 13 May 2006 00:36:01 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4D0WlQm073655; Fri, 12 May 2006 18:32:48 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 12 May 2006 20:32:54 -0400 (EDT) Message-Id: <20060512.203254.62667569.imp@bsdimp.com> To: hongz@promisechina.com From: "M. Warner Losh" In-Reply-To: <1147340690$36076$55833599@hongz@promisechina.com> References: <1147340690$36076$55833599@hongz@promisechina.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: help:How to map a physical address into a kernel address? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2006 00:36:02 -0000 In message: <1147340690$36076$55833599@hongz@promisechina.com> writes: : To access sg_table in kernel address, I need to map the starting physical : address of a segment into a kernel address. As I know that, we can use : phystovirt()/bustovirt(), or kmap()/kmap_atomic() to map a bus/physical : address or a physical page into a kernel address in Linux, but I did not : find such a function in FreeBSD. Please help me on this, it is very urgent! Use busdma. Warner