From owner-freebsd-drivers@FreeBSD.ORG Mon Aug 21 16:49:07 2006 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B1C316A4E7 for ; Mon, 21 Aug 2006 16:49:07 +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 3F94643D76 for ; Mon, 21 Aug 2006 16:49:05 +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 k7LGlFgH022441; Mon, 21 Aug 2006 10:47:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 21 Aug 2006 10:47:20 -0600 (MDT) Message-Id: <20060821.104720.-432838016.imp@bsdimp.com> To: namaskar_alok@yahoo.co.in From: "M. Warner Losh" In-Reply-To: <20060821104912.3899.qmail@web8905.mail.in.yahoo.com> References: <20060821104912.3899.qmail@web8905.mail.in.yahoo.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 21 Aug 2006 10:47:16 -0600 (MDT) Cc: freebsd-drivers@freebsd.org Subject: Re: Device configuration and Structure X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 16:49:07 -0000 In message: <20060821104912.3899.qmail@web8905.mail.in.yahoo.com> Alok Barsode writes: : I wanted to know how r memory-mapped devices : configured during initialization? : : Like for example if i have a PCI ethernet card,which : is attached to the PCI bus.The PCI bus will probe the : attached device, call all the associated drivers (in : the driver list in devclass pcibus)during autoconf and : associate a driver which bids the max,But what if i : have a onboard memory-mapped ethernet controller? what : bus will it attach itself to? If this device is just hanging out in memory space, and isn't on the PCI bus, then you'll need to arrange via some other means to have it probed/attached. On the AT91RM9200 port that I just did enumerated all the devices I knew the CPU had in the atmelarm bus driver with known resources. This was all hard coded. I plan on migrating to using a hinted scheme shortly so that we can support other members of the arm9 at91 family. This sounds like an embedded box of some flavor, so you may need to do this. If this is a x86 box, then you can just list a hint on the ISA bus, just like you would for any other ISA device. This is a small lie, but likely not a fatal one. The only issue becomes how to route the interrupt. Does that help? Warner : I am developing a device driver for a onboard memory : mapped ethernet controller. : : Thanks, : Alok. : : __________________________________________________ : Do You Yahoo!? : Tired of spam? Yahoo! Mail has the best spam protection around : http://mail.yahoo.com : _______________________________________________ : freebsd-drivers@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-drivers : To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" : :