From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 7 19:07:29 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 0E8DC16A4DE for ; Mon, 7 Aug 2006 19:07:29 +0000 (UTC) (envelope-from nike_d@cytexbg.com) Received: from office.suresupport.com (office.suresupport.com [213.145.98.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 6E77B43D94 for ; Mon, 7 Aug 2006 19:07:14 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 27978 invoked by uid 1026); 7 Aug 2006 19:09:07 -0000 Received: from 213.145.98.14 by office.suresupport.com (envelope-from , uid 1004) with qmail-scanner-1.23 (f-prot: 4.4.2/3.14.11. Clear:RC:1(213.145.98.14):. Processed in 1.359385 secs); 07 Aug 2006 19:09:07 -0000 Received: from unknown (HELO ndenev.office.suresupport.com) (213.145.98.14) by office.suresupport.com with SMTP; 7 Aug 2006 19:09:06 -0000 From: Niki Denev To: freebsd-hackers@freebsd.org Date: Mon, 7 Aug 2006 22:03:56 +0300 User-Agent: KMail/1.9.3 References: <44D3C333.3030702@cytexbg.com> <200608071628.15316.nike_d@cytexbg.com> <20060807183406.GB99774@funkthat.com> In-Reply-To: <20060807183406.GB99774@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608072203.56320.nike_d@cytexbg.com> Cc: John-Mark Gurney Subject: Re: linux ioremap equivalent on freebsd 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: Mon, 07 Aug 2006 19:07:29 -0000 On Monday 07 August 2006 21:34, John-Mark Gurney wrote: > Because for the most part it is only suppose to be used by MD code... > > The correct way to get device's memory is to use bus_alloc_resource_any... > Make sure you review the handbook on device driver writing: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedriver >s.html > > I did a presentation at BSDcan on writing devices drivers: > http://people.freebsd.org/~jmg/drivers/ > > The handout is a cheat sheet of useful functions for writing a device > driver... I'm looking at this right now :) Looks very useful, thanks! Just one more question to clear a little confusion on my side, the device that i'm trying to write/port driver for is a cardbus device. Do i have to do something specific about this, or can i get away with accessing/using it as a plain PCI device? (yes, it appears as pci device to the system, and is shown in pciconf) Thanks again! --niki