[BACK]Return to 5.me CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / doc / papers / bus_dma

Annotation of src/share/doc/papers/bus_dma/5.me, Revision 1.1

1.1     ! thorpej     1: .\"    $NetBSD$
        !             2: .\"
        !             3: .\" Copyright (c) 1998 Jason R. Thorpe.
        !             4: .\" All rights reserved.
        !             5: .\"
        !             6: .\" Redistribution and use in source and binary forms, with or without
        !             7: .\" modification, are permitted provided that the following conditions
        !             8: .\" are met:
        !             9: .\" 1. Redistributions of source code must retain the above copyright
        !            10: .\"    notice, this list of conditions and the following disclaimer.
        !            11: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            12: .\"    notice, this list of conditions and the following disclaimer in the
        !            13: .\"    documentation and/or other materials provided with the distribution.
        !            14: .\" 3. All advertising materials mentioning features or use of this software
        !            15: .\"    must display the following acknowledgements:
        !            16: .\"    This product includes software developed for the NetBSD Project
        !            17: .\"    by Jason R. Thorpe.
        !            18: .\" 4. The name of the author may not be used to endorse or promote products
        !            19: .\"    derived from this software without specific prior written permission.
        !            20: .\"
        !            21: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            22: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            23: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            24: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            25: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
        !            26: .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        !            27: .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
        !            28: .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        !            29: .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            30: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            31: .\" SUCH DAMAGE.
        !            32: .\"
        !            33: .sh 1 "Conclusions"
        !            34: .pp
        !            35: The \fIbus_dma\fR interface was introduced into the NetBSD kernel
        !            36: at development version 1.2G, just before the release cycle for NetBSD 1.3
        !            37: began.  When the code was committed to the NetBSD master sources, several
        !            38: drivers, mostly for SCSI controllers, were converted to the interface at
        !            39: the same time.  (All of these drivers had been previously converted to
        !            40: use the \fIbus_space\fR interface.)  Not only did these drivers provide
        !            41: an example of the correct use of \fIbus_dma\fR, but they provided
        !            42: functionality that had
        !            43: not previously existed in the NetBSD kernel: support for bus mastering ISA
        !            44: devices in PCs with more than 16MB of RAM.
        !            45: .pp
        !            46: The first real test of the interface on the Alpha platform came by
        !            47: installing a bus mastering ISA device (an Adaptec 1542 SCSI controller)
        !            48: in an AXPpci33 computer.  After addressing a small bug in the Alpha
        !            49: implementation of \fIbus_dmamap_load\fR(), the device worked flawlessly.
        !            50: .pp
        !            51: When converting device drivers to use the new interface, developers
        !            52: discovered that a fair amount of mostly-similar code could be removed
        !            53: from each driver converted.  The code in question was the loop that
        !            54: built the software scatter-gather list.  In some cases, the drivers
        !            55: performed noticeably better, due to the fact that the implementation
        !            56: of this loop within \fIbus_dmamap_load()\fR is more efficient and
        !            57: supports segment concatenation.
        !            58: .pp
        !            59: Most of the machine-independent drivers that use DMA have been converted
        !            60: to the new interface, and more platforms have implemented the
        !            61: necessary back-ends.  The results have been very encouraging.  Nearly
        !            62: every device/platform combination that has been tested has worked without
        !            63: additional modifications to the device driver.  The few exceptions to this
        !            64: have generally been to handle differences in host and device byte-order,
        !            65: and are not directly related to DMA.
        !            66: .pp
        !            67: The \fIbus_dma\fR interface has also paved the way for additional
        !            68: machine-independent bus autoconfiguration frameworks, such as for VME.
        !            69: Eventually, this will help support PCI-to-VME bridges, and allow
        !            70: Sun, Motorola, and Intel systems to share common VME device drivers.
        !            71: .pp
        !            72: We have found the \fIbus_dma\fR interface to be a major architectural
        !            73: benefit in the NetBSD kernel, greatly simplifying the process of porting
        !            74: the kernel to new platforms, and making portable device driver development
        !            75: considerably easier.  In short, the abstraction has delivered what it was
        !            76: designed to deliver: a means of supporting a wide range of platforms with
        !            77: maximum code reuse.

CVSweb <webmaster@jp.NetBSD.org>