Annotation of htdocs/docs/kernel/programming.html, revision 1.15

1.1       dsieger     1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                      2: <html>
                      3: <head>
                      4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                      5: <meta name="generator" content="Website XSL Stylesheet V2.6.0">
                      6: <link rel="home" href="../../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
                      7: <link rel="up" href="../../docs/kernel/." title="NetBSD Documentation: Kernel">
                      8: <link rel="previous" href="../../docs/kernel/pseudo/." title="NetBSD Documentation: Writing a pseudo device">
                      9: <link rel="next" href="../../docs/kernel/uvm.html" title="NetBSD Documentation: UVM, the new Virtual Memory system">
                     10: <link rel="first" href="../../docs/kernel/lazyfpu.html" title="NetBSD Documentation: How lazy FPU context switch works">
                     11: <link rel="last" href="../../docs/kernel/elf-notes.html" title="NetBSD Documentation: Vendor-specific ELF Note Elements">
1.10      dsieger    12: <link rel="stylesheet" href="../../global.css" type="text/css">
1.1       dsieger    13: 
                     14:     
                     15:     
                     16:     <title>NetBSD Documentation: Kernel Programming FAQ</title>
                     17:   </head>
                     18: <body class="website"><div class="webpage">
1.3       dsieger    19: <a name="docs-kernel-programming"></a><div id="top"><a href="#mainContent" class="doNotDisplay doNotPrint">Skip to main content.</a></div>
                     20: <div id="header">
                     21: <div class="topNavigation">
1.6       dsieger    22: <span>» </span><a href="../../docs/guide/en/">
                     23:          The Guide</a> |
1.3       dsieger    24:        <a href="http://man.NetBSD.org/">Manual pages</a> |
1.8       kano       25:        <a href="../../mailinglists/">
1.6       dsieger    26:          Mailing lists</a> and
1.3       dsieger    27:        <a href="http://mail-index.NetBSD.org/">Archives</a> |
                     28:        <a href="http://cvsweb.NetBSD.org/">CVS repository</a> |
1.6       dsieger    29:        <a href="http://www.NetBSD.org/cgi-bin/sendpr.cgi?gndb=netbsd">Report</a>
                     30:        or 
1.9       kano       31:        <a href="../../support/query-pr.html">
                     32:          query</a> a bug |
1.6       dsieger    33:        <a href="../../docs/software/packages.html">
                     34:          Software Packages
                     35:        </a>
1.3       dsieger    36: </div>
                     37: <div class="centralHeader">
1.15    ! spz        38: <a href="../../"><img alt="[NetBSD Logo]" width="506" height="90" src="../../images/NetBSD-headerlogo.png"></a><div class="headerTools"><div id="headerSearch">
        !            39: <div id="header-cse-search-form" style="width: 24%;">Google custom search</div>
        !            40: <script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"> 
        !            41:                  google.load('search', '1', {language : 'en'});
        !            42:                  google.setOnLoadCallback(function() {
        !            43:                    var header_customSearchControl = new google.search.CustomSearchControl('006277936787196004968:mbdhrauy1wm');
        !            44:                    header_customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
        !            45:                    var header_options = new google.search.DrawOptions();
        !            46:                    header_options.enableSearchboxOnly("http://google.com/cse?cx=006277936787196004968:mbdhrauy1wm");    
        !            47:                    header_customSearchControl.draw('header-cse-search-form', header_options);
        !            48:                  }, true);
        !            49:                </script><link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css">
        !            50: </div></div>
1.3       dsieger    51: </div>
                     52: <div class="navBar">
1.6       dsieger    53: <span class="doNotDisplay">
                     54:          Navigation:
                     55:        </span><a href="../../">
                     56:          Home</a> | 
                     57:        <a href="../../about/">
                     58:          About</a> | 
1.12      hubertf    59:        <a href="../../gallery/">
                     60:          Gallery</a> | 
1.6       dsieger    61:        <a href="../../releases/">
                     62:          Download</a> | 
                     63:        <a href="../../docs/">
                     64:          Documentation</a> | 
                     65:        <a href="../../support/">
                     66:          Support</a> | 
                     67:        <a href="../../community/">
                     68:          Community</a> | 
                     69:        <a href="../../ports/">
                     70:          Ports</a>
1.3       dsieger    71: </div>
                     72: </div>
                     73: <div id="content"><div class="fullWidth"><div class="rowOfBoxes">
                     74: <h1>NetBSD Documentation: Kernel Programming FAQ</h1>
1.1       dsieger    75: <h3 class="title"><a name="misc">Misc</a></h3>
                     76: <ul>
                     77: <li><a href="#knf">What is KNF</a></li>
                     78: <li><a href="#packed-attribute">Using the `packed' attribute</a></li>
                     79: <li><a href="#printf">Using printf() for debugging</a></li>
                     80: <li><a href="#forcing-ddb">Forcing code to enter DDB</a></li>
                     81: <li><a href="#adding_a_new_driver">Adding a new driver to the kernel</a></li>
                     82: <li><a href="#autoconf">How does all this autoconf stuff work?</a></li>
                     83: <li><a href="#adding_a_system_call">Adding a system call</a></li>
                     84: <li><a href="#adding_a_sysctl">Adding a sysctl</a></li>
                     85: <li><a href="#mmap_in_pseudo-device">How to implement mmap(2) in a pseudo-device</a></li>
                     86: <li><a href="#accessing_a_kernel_structure_from_userland">Accessing a kernel structure from userland</a></li>
                     87: <li><a href="#sample_driver">Is there a simple PCI driver I can use as an example?</a></li>
                     88: <li><a href="#other-related-links">Other related links</a></li>
                     89: </ul>
                     90: <hr>
                     91: <h3 class="title">Misc</h3>
                     92:        <h4 class="title">
                     93: <a name="knf"></a>What is KNF (<a href="#misc">top</a>)
                     94:   </h4>
                     95: 
                     96:        <p>KNF stands for "Kernel Normal Form" - it's a C coding
                     97:          style documented in
                     98:          <code class="filename">/usr/share/misc/style</code>, which is
                     99:          included in the source tree as <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/share/misc/style?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/share/misc/style</code></a>.</p>
                    100:       
                    101:        <h4 class="title">
                    102: <a name="packed-attribute"></a>Using the `packed' attribute (<a href="#misc">top</a>)
                    103:   </h4>
                    104:        
                    105:        <p>Always use the <code class="code">`packed'</code> attribute in
                    106:          structures which describe wire protocol data formats.</p>
                    107:       
                    108:        <h4 class="title">
                    109: <a name="printf"></a>Using <code class="code">printf()</code> for debugging (<a href="#misc">top</a>)
                    110:   </h4>
                    111: 
                    112:        <p>Probably the simplest way of generating debugging
                    113:          information from a kernel driver is to use
                    114:          <code class="code">printf()</code>. The kernel printf will send output to
                    115:          the console, so beware of generating too much output and
                    116:          making the system unusable.</p>
                    117:       
                    118:        <h4 class="title">
                    119: <a name="forcing-ddb"></a>Forcing code to enter DDB (<a href="#misc">top</a>)
                    120:   </h4>
                    121: 
                    122:        <p>Ensure your kernel config file contains
                    123:          '<code class="code">options DDB</code>', the file has
                    124:          '<code class="code">#include "opt_ddb.h"</code>', then use
                    125:          '<code class="code">Debugger()</code>'.</p>
                    126:       
                    127:        <h4 class="title">
                    128: <a name="adding_a_new_driver"></a>Adding a new driver to the kernel (<a href="#misc">top</a>)
                    129:   </h4>
                    130: 
                    131:        <p>Every driver needs at least:
                    132:          </p>
1.15    ! spz       133: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
        !           134: <li class="listitem">
1.1       dsieger   135: <code class="code"><span class="emphasis"><em>xxx</em></span>probe()</code> (
                    136:              during which NetBSD will attempt to determine if the
                    137:              device is present)</li>
1.15    ! spz       138: <li class="listitem">
1.1       dsieger   139: <code class="code"><span class="emphasis"><em>xxx</em></span>attach()</code>
                    140:              routine which will configure and attach the
                    141:              device.</li>
                    142: </ul></div>
                    143: <p>
                    144:        </p>
                    145: 
                    146:        <p>Once probe and attach routines have been written, add
                    147:          an entry to 
                    148:          <code class="filename">/usr/src/sys/arch/&lt;your-arch&gt;/&lt;your-arch&gt;/conf.c</code>.</p>
                    149:        
                    150:        <p>There are two tables:
                    151:          </p>
1.15    ! spz       152: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
        !           153: <li class="listitem">
1.1       dsieger   154: <code class="code">cdevsw</code> for character devices.</li>
1.15    ! spz       155: <li class="listitem">
1.1       dsieger   156: <code class="code">bdevsw</code> for block devices (for those
                    157:              that also perform "block" I/O and use a strategy
                    158:              routine).</li>
                    159: </ul></div>
                    160: 
                    161:        <p>Most entries will be of the form
                    162:          <code class="code">cdev_<span class="emphasis"><em>xxx</em></span>_init()</code>, which
                    163:          is a macro handling prototyping of the standard Unix
                    164:          device switch routines.</p>
                    165: 
                    166:        <p>The probe/attach routines are called at boot time.  The
                    167:          <code class="code">open()</code>, <code class="code">close()</code>,
                    168:          <code class="code">read()</code>, and <code class="code">write()</code> routines are
                    169:          called when you open up the device special file who's major
                    170:          number corresponds to the index into that table.  For
                    171:          example, if you open up a device who's major number is 18,
                    172:          the "open" routine for device number 18 in
                    173:          <code class="code">cdevsw[]/bdevsw</code> will be called.</p>
                    174: 
                    175:        <p>Most drivers are split between bus specific attach code, and
                    176:          a machine independent core. As an example, the driver for
                    177:          the PCI lance ethernet chip has entries in the following files:
                    178: 
                    179:          </p>
1.15    ! spz       180: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
        !           181: <li class="listitem">
1.1       dsieger   182: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/pci/files.pci?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/dev/pci/files.pci</code></a>
                    183:              - attach information (look for 'le at pci').</li>
1.15    ! spz       184: <li class="listitem">
1.1       dsieger   185: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/pci/if_le_pci.c?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/dev/pci/if_le_pci.c</code></a> 
                    186:              - PCI bus attach code for the driver.</li>
                    187: </ul></div>
                    188: <p>
                    189:        </p>
                    190:        
                    191:        <p>
                    192:          </p>
1.15    ! spz       193: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
        !           194: <li class="listitem">
1.1       dsieger   195: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/conf/files?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/conf/files</code></a>
                    196:              - MI core attach information (look for 'le:').</li>
1.15    ! spz       197: <li class="listitem">
1.1       dsieger   198: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/ic/am7990.c?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/dev/ic/am7990.c</code></a>
                    199:              - MI driver 24bit access code.</li>
1.15    ! spz       200: <li class="listitem">
1.1       dsieger   201: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/ic/am79900.c?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/dev/ic/am79900.c</code></a>
                    202:              - MI driver 32bit access code.</li>
1.15    ! spz       203: <li class="listitem">
1.1       dsieger   204: <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/sys/dev/ic/lance.c?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/sys/dev/ic/lance.c</code></a>
                    205:              - MI core driver code.</li>
                    206: </ul></div>
                    207: <p>
                    208:        </p>
                    209: 
1.12      hubertf   210:        <p>See also <a class="ulink" href="#autoconf" target="_top">the autoconf explanation</a>.</p>
1.1       dsieger   211:       
                    212:        <h4 class="title">
                    213: <a name="autoconf"></a>How does all this autoconf stuff work? (<a href="#misc">top</a>)
                    214:   </h4>
                    215:        
                    216:        <p>The autoconf machinery is quite simple once you figure
                    217:          out the way it works. If you want to ignore the exact
                    218:          details of how the device probe tree is built and walked
                    219:            on runtime, the bits needed for each individual
1.15    ! spz       220:          <span class="quote">&#8220;<span class="quote">leaf</span>&#8221;</span> driver are like this:
1.1       dsieger   221:          
                    222:          </p>
1.15    ! spz       223: <div class="orderedlist"><ol class="orderedlist" type="1">
        !           224: <li class="listitem">each driver specifies a structure holding
1.1       dsieger   225:              three things - size of its private structure, probe
                    226:              function and attach function; this is compiled in and
                    227:              used in runtime - example:
                    228:              <pre class="programlisting">
                    229: struct cfattach foo_baz_ca = {
                    230:     sizeof(struct foo_baz_softc), foo_baz_match, foo_baz_attach
                    231: };</pre>
                    232: </li>
1.15    ! spz       233: <li class="listitem">on kernel startup, once the time comes to
1.1       dsieger   234:              attach the device, autoconf code calls device's
                    235:              probe routine and passes it pointer to parent
                    236:              (<code class="code">struct device *parent</code>), pointer
                    237:              to attach tag structure (<code class="code">void *aux</code>),
                    238:              and appropriate   autoconf node (<code class="code">struct cfdata
                    239:                *cf</code>). The driver is expected to find out if
                    240:              it's where it's supposed to be (commonly, the location
                    241:              and configuration information is passed by the attach
                    242:              tag). If yes, the probe routine should return 1. If
                    243:              device is not there, probe routine has to return 0.
                    244:              <span class="bold"><strong>NO STATE SHOULD BE KEPT</strong></span>
                    245:              in either case.</li>
1.15    ! spz       246: <li class="listitem">if probe returned success, autoconf allocates
1.1       dsieger   247:              chunk of memory sized as specified in device's *_ca
                    248:              and calls its attach routine, passing it pointer to
                    249:              parent (<code class="code">struct device *parent</code>), 
                    250:              pointer to the freshly allocated memory
                    251:              (<code class="code">struct device *self</code>) and the attach tag
                    252:              (<code class="code">void *aux</code>). Driver is expected to find
                    253:              out exact ports and memory, allocate resources and
                    254:              initialize its internal structure
                    255:              accordingly. Preferably, all driver instance specific
                    256:              information should be kept in the allocated
                    257:              memory.</li>
                    258: </ol></div>
                    259: <p>
                    260:        </p>
                    261:        
                    262:        <p>Example: Let's have a PCI ethernet device 'baz',
                    263:          kernel config chunk looks like this:
                    264:          </p>
                    265: <pre class="programlisting">
                    266: pci*    at mainbus?
                    267: baz*    at pci? dev ? function ?</pre>
                    268: <p>
                    269: 
                    270:          At runtime, autoconf iterates over all physical devices
                    271:          present on machine's PCI bus. For each physical device, it
                    272:          iterates over all devices registered in kernel to be on
                    273:          pci bus, and calls drivers' probe routine. If any probe
                    274:          routine claims the device by returning 1, autoconf stops
                    275:          iterating and does the job described under 3). Once the
                    276:          attach function returns, autoconf continues with next
                    277:          physical device.</p>
                    278:        
1.12      hubertf   279:        <p>See also <a class="ulink" href="#adding_a_new_driver" target="_top">Adding a new driver</a>.</p>
1.1       dsieger   280:       
                    281:        <h4 class="title">
                    282: <a name="adding_a_system_call"></a>Adding a system call (<a href="#misc">top</a>)
                    283:   </h4>
                    284:        
                    285:        <p>Add an entry in <code class="code">syscalls.master</code>, and add
                    286:          the syscall stub to the appropriate place in 
                    287:          <code class="code"><a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/lib/libc/sys/Makefile.inc?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/lib/libc/sys/Makefile.inc</code></a></code>.</p>
1.12      hubertf   288:        <p>See the <a class="ulink" href="../internals/en/chap-processes.html#syscall_howto" target="_top">
                    289:             HOWTO</a> and related documentation in the <a class="ulink" href="../internals/en/" target="_top">
1.1       dsieger   290:            NetBSD Internals Guide</a> for more information.
                    291:        </p>
                    292:       
                    293:        <h4 class="title">
                    294: <a name="adding_a_sysctl"></a>Adding a sysctl (<a href="#misc">top</a>)
                    295:   </h4>
                    296:        
1.12      hubertf   297:        <p>See a <a class="ulink" href="http://mail-index.NetBSD.org/tech-kern/2001/06/24/0000.html" target="_top">posting</a>
                    298:          answering this question on  <a class="ulink" href="http://mail-index.NetBSD.org/tech-kern/" target="_top">tech-kern</a>.</p>
1.1       dsieger   299:        
                    300:        <p>Note that NetBSD 1.6 and up has a special
1.15    ! spz       301:          <span class="quote">&#8220;<span class="quote">vendor</span>&#8221;</span> sysctl category that is reserved for vendor
        !           302:          specific entries. See <a href="http://netbsd.gw.com/cgi-bin/man-cgi?sysctl+8+NetBSD-5.1+i386">sysctl(8)</a> for more
1.1       dsieger   303:          information.</p>
                    304:       
                    305:        <h4 class="title">
1.15    ! spz       306: <a name="mmap_in_pseudo-device"></a>How to implement <a href="http://netbsd.gw.com/cgi-bin/man-cgi?mmap+2+NetBSD-5.1+i386">mmap(2)</a> in a pseudo-device (<a href="#misc">top</a>)
1.1       dsieger   307:   </h4>
                    308:        
                    309:        <p>Your device is most likely a character device, so
                    310:          you will be using the device pager (the VM system hides
                    311:          all of this from you, don't worry).</p>
                    312:        
                    313:        <p>The first thing you need to do is pick some
                    314:          arbitrary offsets for your mmap interface.  Something
                    315:          like "mmap offset 0-M gives object A, N-O gives object
                    316:          B", etc.</p>
                    317:        
                    318:        <p>After that, your mmap routine would look something
                    319:          like this:
                    320:          </p>
                    321: <pre class="programlisting">
                    322: int
                    323: foommap(dev_t dev, int off, int prot)
                    324: {
                    325: 
                    326:         if (off &amp; PAGE_MASK)
                    327:                 panic("foommap");
                    328: 
                    329:         if ((u_int)off &gt;= FOO_REGION1_MMAP_OFFSET &amp;&amp;
                    330:             (u_int)off &lt; (FOO_REGION1_MMAP_OFFSET + FOO_REGION1_SIZE))
                    331:                 return (atop(FOO_REGION1_ADDR + ((u_int)off -
                    332:                     FOO_REGION1_MMAP_OFFSET)));
                    333: 
                    334:         if ((u_int)off &gt;= FOO_REGION2_MMAP_OFFSET &amp;&amp;
                    335:             (u_int)off &lt; (FOO_REGION2_MMAP_OFFSET + FOO_REGION2_SIZE))
                    336:                 return (atop(FOO_REGION1_ADDR + ((u_int)off -
                    337:                     FOO_REGION2_MMAP_OFFSET)));
                    338: 
                    339:         /* Page not found. */
                    340:         return (-1);
                    341: }</pre>
                    342: 
                    343:          <p>Now, this is slightly more complicated by the fact
                    344:            that you are going to be mmap'ing what are simply
                    345:            kernel memory objects (it is a pseudo-device after
                    346:            all).</p>
                    347:          
                    348:          <p>In order to make this work, you're going to want
                    349:            to make sure you allocate the memory objects to be
                    350:            mmap'd on page-aligned boundaries.  If you are
                    351:            allocating something &gt;= <code class="code">PAGE_SIZE</code> in
                    352:            size, this is guaranteed. Otherwise, you are going to
                    353:            have to use <code class="code">uvm_km_alloc()</code>, and round
                    354:            your allocation size up to page size.</p>
                    355:          
                    356:          <p>Then it would look a bit more like this:
                    357:            </p>
                    358: <pre class="programlisting">
                    359: int
                    360: foommap(dev_t dev, int off, int prot)
                    361: {
                    362:         paddr_t pa;
                    363: 
                    364:         if (off &amp; PAGE_MASK)
                    365:                 panic("foommap: offset not page aligned");
                    366: 
                    367:         if ((u_int)off &gt;= FOO_REGION1_MMAP_OFFSET &amp;&amp;
                    368:             (u_int)off &lt; (FOO_REGION1_MMAP_OFFSET + FOO_REGION1_SIZE)) {
                    369:                 if ((vaddr_t)foo_object1 &amp; PAGE_MASK)
                    370:                         panic("foommap: foo_object1 not page aligned");
                    371:                 if (pmap_extract(pmap_kernel(), foo_object1 +
                    372:                     (u_int)off - FOO_REGION1_MMAP_OFFSET, &amp;pa) == FALSE)
                    373:                         panic("foommap: foo_object1 page not mapped");
                    374:                 return (atop(pa));
                    375:         }
                    376: 
                    377:         if ((u_int)off &gt;= FOO_REGION2_MMAP_OFFSET &amp;&amp;
                    378:             (u_int)off &lt; (FOO_REGION2_MMAP_OFFSET + FOO_REGION2_SIZE)) {
                    379:                 if ((vaddr_t)foo_object2 &amp; PAGE_MASK)
                    380:                         panic("foommap: foo_object2 not page aligned");
                    381:                 if (pmap_extract(pmap_kernel(), foo_object2 +
                    382:                     (u_int)off - FOO_REGION2_MMAP_OFFSET, &amp;pa) == FALSE)
                    383:                         panic("foommap: foo_object2 page not mapped");
                    384:                 return (atop(pa));
                    385:         }
                    386: 
                    387:         /* Page not found. */
                    388:         return (-1);
                    389: }</pre>
                    390:       
                    391:        <h4 class="title">
                    392: <a name="accessing_a_kernel_structure_from_userland"></a>Accessing a kernel structure from userland (<a href="#misc">top</a>)
                    393:   </h4>
                    394:        
                    395:        <p>The canonical example for this is:  <code class="code">
                    396:            <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/src/usr.bin/vmstat/dkstats.c?rev=HEAD&amp;content-type=text/x-cvsweb-markup" target="_top"><code class="filename">src/usr.bin/vmstat/dkstats.c</code></a></code>
                    397:          , which reads disk statistics.</p>
                    398:       
                    399:        <h4 class="title">
                    400: <a name="sample_driver"></a>Is there a simple PCI driver I can use as an example? (<a href="#misc">top</a>)
                    401:   </h4>
                    402:        <p>You can look at
                    403:          <code class="filename">sys/dev/pci/puc.c</code>, which is one of
                    404:          the simplest drivers. PUCs are devices with one or more
                    405:          serial or parallel ports on it, usually using standard
                    406:          chips (e.g. 16550 UART for serial). This driver just
                    407:          locates the I/O addresses of the registers of the serial or
                    408:          parallel controller and passes it to the serial or
                    409:          parallel driver.</p> 
                    410:       
                    411:        <h4 class="title">
                    412: <a name="other-related-links"></a>Other related links (<a href="#misc">top</a>)
                    413:   </h4>
                    414:        
1.15    ! spz       415: <div class="itemizedlist"><ul class="itemizedlist" type="disc">
        !           416: <li class="listitem">
        !           417: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?driver+9+NetBSD-5.1+i386">driver(9)</a> - NetBSD autoconfiguration
1.1       dsieger   418:            interface utilised by device drivers</li>
1.15    ! spz       419: <li class="listitem">
        !           420: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?autoconf+9+NetBSD-5.1+i386">autoconf(9)</a> - General description on the
1.1       dsieger   421:            NetBSD autoconfiguration framework</li>
1.15    ! spz       422: <li class="listitem">
        !           423: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?config+9+NetBSD-5.1+i386">config(9)</a> - The autoconfiguration
1.1       dsieger   424:            framework ``device definition'' language</li>
1.15    ! spz       425: <li class="listitem">
        !           426: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?bus_dma+9+NetBSD-5.1+i386">bus_dma(9)</a> - NetBSD's bus and machine
1.12      hubertf   427:            independent DMA framework, described in its own <a class="ulink" href="bus_dma.pdf" target="_top">paper</a> (64k, PDF)</li>
1.15    ! spz       428: <li class="listitem">
        !           429: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?bus_space+9+NetBSD-5.1+i386">bus_space(9)</a> - NetBSD's bus space
1.1       dsieger   430:            manipulation interface</li>
1.15    ! spz       431: <li class="listitem">
1.12      hubertf   432: <a class="ulink" href="scsidma.html" target="_top">How SCSI DMA
1.1       dsieger   433:              works</a> - by Tohru Nishimura</li>
1.15    ! spz       434: <li class="listitem">
1.12      hubertf   435: <a class="ulink" href="lazyfpu.html" target="_top">How lazy FPU context
1.1       dsieger   436:              switch works</a> - by Tohru Nishimura</li>
1.15    ! spz       437: <li class="listitem"><a class="ulink" href="converting-ethernet-drivers.html" target="_top">Converting ancient BSD Ethernet drivers to NetBSD-1.2D and later</a></li>
        !           438: <li class="listitem"><a class="ulink" href="porting-freebsd-net.html" target="_top">Notes on porting FreeBSD network drivers to NetBSD</a></li>
1.1       dsieger   439: </ul></div>
1.3       dsieger   440:       <hr>Back to  <em><a href="./">NetBSD Documentation: Kernel</a></em>
                    441: </div></div></div>
                    442: <div class="navfoot"></div>
1.13      mishka    443: <div id="footer"><div id="footerContent"><center>
1.3       dsieger   444: <span class="footfeed"><a href="http://www.NetBSD.org/cgi-bin/feedback.cgi">
                    445:          Contact</a> |
1.9       kano      446:       </span><span class="footcopy"><a href="../../about/disclaimer.html">
1.3       dsieger   447:       Disclaimer</a> |
                    448: 
1.15    ! spz       449:       <span class="copyright">Copyright © 1994-2011 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
1.3       dsieger   450:        Foundation, Inc.</span>
1.13      mishka    451: </center></div></div>
1.1       dsieger   452: </div></body>
                    453: </html>

CVSweb <webmaster@jp.NetBSD.org>