Date: Mon, 21 Sep 1998 08:56:29 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: Eivind Eklund <eivind@yes.no> Cc: "Justin T. Gibbs" <gibbs@narnia.plutotech.com>, hackers@FreeBSD.ORG Subject: Re: malloc()ing 64K physically contiguous buffer in kernel Message-ID: <Pine.BSF.4.01.9809210849280.28425-100000@herring.nlsystems.com> In-Reply-To: <19980921001637.40216@follo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Sep 1998, Eivind Eklund wrote: > On Sun, Sep 20, 1998 at 04:03:22PM -0600, Justin T. Gibbs wrote: > > In article <19980920212910.21253@follo.net> you wrote: > > > On Sun, Sep 20, 1998 at 01:45:24PM -0400, Bill Paul wrote: > > >> So: is there some way to allocate 64K of contiguous memory? Or even > > >> 8/16/32K? As long as I can hit one of the allowed buffer sizes I'll > > >> be happy, although I wanted 64K in order to reduce the likelyhood of > > >> receiver overruns. > > > > > > contigmalloc(). > > > > You should use bus_dma instead of contigmalloc, but I won't think > > badly of you until I've gotten off my duff and written the man > > pages for it. (bus_dma eventually uses contigmalloc to satisfy the > > request, but this may change (very likely on other platforms)). > > Speaking of this - what is the relationship between the bus_space > stuff you've brought in from NetBSD, and the bus framework dfr has > made for the alpha port? My bus framework code is more of a 'management' layer. It tracks driver registration, probes and attaches devices and constructs a nice device tree based on the runtime-probed bus topology. It copes with dynamic device detection and removal and dynamic driver replacement (you can't replace a statically linked driver though). The framework also allows drivers to define 'interfaces' which are collections of methods implemented in the driver. The traditional probe and attach methods are implemented in a standard 'device' interface. The advantage here is that it is trivial to extend a driver with new methods and still maintain binary compatibility with old drivers. Currently it stays far away from the hardware issues of bus_space and bus_dma. I will probably extend the 'bus' interface to allow parent bus, io and memory tags to be passed to child devices. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9809210849280.28425-100000>