Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2006 12:48:11 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        jhb@freebsd.org
Cc:        freebsd-hackers@freebsd.org, mag@intron.ac, matthias.andree@gmx.de, julian@elischer.org, des@des.no, delphij@delphij.net
Subject:   Re: kern/99979: Get Ready for Kernel Module in C++
Message-ID:  <20060711.124811.1878034486.imp@bsdimp.com>
In-Reply-To: <200607111413.37238.jhb@freebsd.org>
References:  <200607111115.59844.jhb@freebsd.org> <20060711.103327.-8650905.imp@bsdimp.com> <200607111413.37238.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200607111413.37238.jhb@freebsd.org>
            John Baldwin <jhb@freebsd.org> writes:
: On Tuesday 11 July 2006 12:33, M. Warner Losh wrote:
: > In message: <200607111115.59844.jhb@freebsd.org>
: >             John Baldwin <jhb@freebsd.org> 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).

What's the difference in asking for a resource to be mapped, and
calling a routine that allocates and maps the resource?

Also, in FreeBSD, the resources are already allocated by the bus
code.  It just changes ownership to the child when the request comes
in...

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060711.124811.1878034486.imp>