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