From owner-freebsd-hackers@FreeBSD.ORG Thu May 11 09:45:03 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 BC61B16A410 for ; Thu, 11 May 2006 09:45:03 +0000 (UTC) (envelope-from hongz@promisechina.com) Received: from mxdxt7.hichina.com (mxdxt7.hichina.com [218.244.143.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E64C43D6E for ; Thu, 11 May 2006 09:44:59 +0000 (GMT) (envelope-from hongz@promisechina.com) Received: from 222.128.58.137 (HELO hongzhao) (envelope-from hongz@promisechina.com) by mxdxt7.hichina.com (quarkmail-1.2.1) with ESMTP id S5174738AbWEKJou for freebsd-hackers@freebsd.org; Thu, 11 May 2006 17:44:50 +0800 From: To: Date: Thu, 11 May 2006 17:45:00 +0800 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcZ035HVljCqpd8VQaWcxPYKaR/2rg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 Message-ID: <1147340690$36076$55833599@hongz@promisechina.com> X-Mailman-Approved-At: Thu, 11 May 2006 11:58:24 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Thu, 11 May 2006 09:45:04 -0000 Hi guys: 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! Thanks a lot! Hong