From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 11 20:18:30 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 806D516A4DD for ; Tue, 11 Jul 2006 20:18:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3706A43D68 for ; Tue, 11 Jul 2006 20:18:25 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6BKILLO077005; Tue, 11 Jul 2006 16:18:24 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: mag@intron.ac Date: Tue, 11 Jul 2006 15:50:00 -0400 User-Agent: KMail/1.9.1 References: <200607111413.37238.jhb@freebsd.org> <1152645913.31340@origin.intron.ac> In-Reply-To: <1152645913.31340@origin.intron.ac> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607111550.00346.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 11 Jul 2006 16:18:24 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1591/Mon Jul 10 15:41:02 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org Subject: Re: kern/99979: Get Ready for Kernel Module in C++ 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: Tue, 11 Jul 2006 20:18:30 -0000 On Tuesday 11 July 2006 15:21, mag@intron.ac wrote: > John Baldwin wrote: > > > On Tuesday 11 July 2006 12:33, M. Warner Losh wrote: > >> In message: <200607111115.59844.jhb@freebsd.org> > >> John Baldwin writes: > >> : and OS X both of which I've written a PCI driver for) we require device > >> : driver writers to go through a lot more hoops to do certain things like > >> : allocate resources. At the very least there is much that can be improved > > in > >> : our driver model. > >> > >> bus_alloc_resources goes a long ways in this respect. > > > > Yes, but in OS X I didn't even have to do that. All I had to do was ask it to > > map a BAR if I wanted to use it. It already "allocated" all the resources > > regardless. Windows was the same way (though a bit weirder, you get a > > message that lists all your resources and you have to map them if you want to > > use them). > > > > -- > > John Baldwin > > Do you mean that the kernel pre-allocate resources for all devices whether > a device has been attached by a device driver? > Does BIOS do the same thing before OS boots? Maybe (kernel can allocate it once probe has succeeded perhaps, or just always do it) and Yes (if PNP OS is set to No, that is what PNP OS means, is if the OS is smart enough to alloc the resources on its own). -- John Baldwin