http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / Documentation / DocBook / kernel-api.tmpl
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[]>
2 <book id="LinuxKernelAPI">
3  <bookinfo>
4   <title>The Linux Kernel API</title>
5   
6   <legalnotice>
7    <para>
8      This documentation is free software; you can redistribute
9      it and/or modify it under the terms of the GNU General Public
10      License as published by the Free Software Foundation; either
11      version 2 of the License, or (at your option) any later
12      version.
13    </para>
14       
15    <para>
16      This program is distributed in the hope that it will be
17      useful, but WITHOUT ANY WARRANTY; without even the implied
18      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19      See the GNU General Public License for more details.
20    </para>
21       
22    <para>
23      You should have received a copy of the GNU General Public
24      License along with this program; if not, write to the Free
25      Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26      MA 02111-1307 USA
27    </para>
28       
29    <para>
30      For more details see the file COPYING in the source
31      distribution of Linux.
32    </para>
33   </legalnotice>
34  </bookinfo>
35
36 <toc></toc>
37
38   <chapter id="Basics">
39      <title>Driver Basics</title>
40      <sect1><title>Driver Entry and Exit points</title>
41 !Iinclude/linux/init.h
42      </sect1>
43
44      <sect1><title>Atomic and pointer manipulation</title>
45 !Iinclude/asm-i386/atomic.h
46 !Iinclude/asm-i386/unaligned.h
47      </sect1>
48
49 <!-- FIXME:
50   kernel/sched.c has no docs, which stuffs up the sgml.  Comment
51   out until somebody adds docs.  KAO
52      <sect1><title>Delaying, scheduling, and timer routines</title>
53 X!Ekernel/sched.c
54      </sect1>
55 KAO -->
56   </chapter>
57
58   <chapter id="adt">
59      <title>Data Types</title>
60      <sect1><title>Doubly Linked Lists</title>
61 !Iinclude/linux/list.h
62      </sect1>
63   </chapter>
64
65   <chapter id="libc">
66      <title>Basic C Library Functions</title>
67
68      <para>
69        When writing drivers, you cannot in general use routines which are
70        from the C Library.  Some of the functions have been found generally
71        useful and they are listed below.  The behaviour of these functions
72        may vary slightly from those defined by ANSI, and these deviations
73        are noted in the text.
74      </para>
75
76      <sect1><title>String Conversions</title>
77 !Ilib/vsprintf.c
78 !Elib/vsprintf.c
79      </sect1>
80      <sect1><title>String Manipulation</title>
81 !Ilib/string.c
82 !Elib/string.c
83      </sect1>
84      <sect1><title>Bit Operations</title>
85 !Iinclude/asm-i386/bitops.h
86      </sect1>
87   </chapter>
88
89   <chapter id="mm">
90      <title>Memory Management in Linux</title>
91      <sect1><title>The Slab Cache</title>
92 !Emm/slab.c
93      </sect1>
94      <sect1><title>User Space Memory Access</title>
95 !Iinclude/asm-i386/uaccess.h
96 !Iarch/i386/lib/usercopy.c
97      </sect1>
98   </chapter>
99
100   <chapter id="proc">
101      <title>The proc filesystem</title>
102  
103      <sect1><title>sysctl interface</title>
104 !Ekernel/sysctl.c
105      </sect1>
106   </chapter>
107
108   <chapter id="vfs">
109      <title>The Linux VFS</title>
110      <sect1><title>The Directory Cache</title>
111 !Efs/dcache.c
112 !Iinclude/linux/dcache.h
113      </sect1>
114      <sect1><title>Inode Handling</title>
115 !Efs/inode.c
116 !Efs/bad_inode.c
117      </sect1>
118      <sect1><title>Registration and Superblocks</title>
119 !Efs/super.c
120      </sect1>
121      <sect1><title>File Locks</title>
122 !Efs/locks.c
123 !Ifs/locks.c
124      </sect1>
125   </chapter>
126
127   <chapter id="netcore">
128      <title>Linux Networking</title>
129      <sect1><title>Socket Buffer Functions</title>
130 !Iinclude/linux/skbuff.h
131 !Enet/core/skbuff.c
132      </sect1>
133      <sect1><title>Socket Filter</title>
134 !Enet/core/filter.c
135      </sect1>
136   </chapter>
137
138   <chapter id="netdev">
139      <title>Network device support</title>
140      <sect1><title>Driver Support</title>
141 !Edrivers/net/net_init.c
142 !Enet/core/dev.c
143      </sect1>
144      <sect1><title>8390 Based Network Cards</title>
145 !Edrivers/net/8390.c
146      </sect1>
147      <sect1><title>Synchronous PPP</title>
148 !Edrivers/net/wan/syncppp.c
149      </sect1>
150   </chapter>
151
152   <chapter id="modload">
153      <title>Module Support</title>
154      <sect1><title>Module Loading</title>
155 !Ekernel/kmod.c
156      </sect1>
157      <sect1><title>Inter Module support</title>
158         <para>
159            Refer to the file kernel/module.c for more information.
160         </para>
161 <!-- FIXME: Removed for now since no structured comments in source
162 X!Ekernel/module.c
163 -->
164      </sect1>
165   </chapter>
166
167   <chapter id="hardware">
168      <title>Hardware Interfaces</title>
169      <sect1><title>Interrupt Handling</title>
170 !Iarch/i386/kernel/irq.c
171      </sect1>
172
173      <sect1><title>MTRR Handling</title>
174 !Earch/i386/kernel/cpu/mtrr/main.c
175      </sect1>
176      <sect1><title>PCI Support Library</title>
177 !Edrivers/pci/pci.c
178      </sect1>
179      <sect1><title>PCI Hotplug Support Library</title>
180 !Edrivers/pci/hotplug/pci_hotplug_core.c
181      </sect1>
182      <sect1><title>MCA Architecture</title>
183         <sect2><title>MCA Device Functions</title>
184            <para>
185               Refer to the file arch/i386/kernel/mca.c for more information.
186            </para>
187 <!-- FIXME: Removed for now since no structured comments in source
188 X!Earch/i386/kernel/mca.c
189 -->
190         </sect2>
191         <sect2><title>MCA Bus DMA</title>
192 !Iinclude/asm-i386/mca_dma.h
193         </sect2>
194      </sect1>
195   </chapter>
196
197   <chapter id="devfs">
198      <title>The Device File System</title>
199 !Efs/devfs/base.c
200   </chapter>
201
202   <chapter id="security">
203      <title>Security Framework</title>
204 !Esecurity/security.c
205   </chapter>
206
207   <chapter id="pmfuncs">
208      <title>Power Management</title>
209 !Ekernel/power/pm.c
210   </chapter>
211
212   <chapter id="blkdev">
213      <title>Block Devices</title>
214 !Edrivers/block/ll_rw_blk.c
215   </chapter>
216
217   <chapter id="miscdev">
218      <title>Miscellaneous Devices</title>
219 !Edrivers/char/misc.c
220   </chapter>
221
222   <chapter id="viddev">
223      <title>Video4Linux</title>
224 !Edrivers/media/video/videodev.c
225   </chapter>
226
227   <chapter id="snddev">
228      <title>Sound Devices</title>
229 !Esound/sound_core.c
230 <!-- FIXME: Removed for now since no structured comments in source
231 X!Isound/sound_firmware.c
232 -->
233   </chapter>
234
235   <chapter id="uart16x50">
236      <title>16x50 UART Driver</title>
237 !Edrivers/serial/serial_core.c
238 !Edrivers/serial/8250.c
239   </chapter>
240
241   <chapter id="z85230">
242      <title>Z85230 Support Library</title>
243 !Edrivers/net/wan/z85230.c
244   </chapter>
245
246   <chapter id="fbdev">
247      <title>Frame Buffer Library</title>
248
249      <para>
250        The frame buffer drivers depend heavily on four data structures.  
251        These structures are declared in include/linux/fb.h.  They are 
252        fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. 
253        The last three can be made available to and from userland. 
254      </para>
255
256      <para>
257        fb_info defines the current state of a particular video card. 
258        Inside fb_info, there exists a fb_ops structure which is a 
259        collection of needed functions to make fbdev and fbcon work.
260        fb_info is only visible to the kernel.
261      </para>
262
263      <para>
264        fb_var_screeninfo is used to describe the features of a video card 
265        that are user defined.  With fb_var_screeninfo, things such as
266        depth and the resolution may be defined.
267      </para>
268
269      <para>
270        The next structure is fb_fix_screeninfo. This defines the 
271        properties of a card that are created when a mode is set and can't 
272        be changed otherwise.  A good example of this is the start of the 
273        frame buffer memory.  This "locks" the address of the frame buffer
274        memory, so that it cannot be changed or moved.
275      </para>
276
277      <para>
278        The last structure is fb_monospecs. In the old API, there was 
279        little importance for fb_monospecs. This allowed for forbidden things 
280        such as setting a mode of 800x600 on a fix frequency monitor. With 
281        the new API, fb_monospecs prevents such things, and if used 
282        correctly, can prevent a monitor from being cooked.  fb_monospecs
283        will not be useful until kernels 2.5.x.
284      </para>
285
286      <sect1><title>Frame Buffer Memory</title>
287 !Edrivers/video/fbmem.c
288      </sect1>
289      <sect1><title>Frame Buffer Console</title>
290 !Edrivers/video/console/fbcon.c
291      </sect1>
292      <sect1><title>Frame Buffer Colormap</title>
293 !Edrivers/video/fbcmap.c
294      </sect1>
295 <!-- FIXME:
296   drivers/video/fbgen.c has no docs, which stuffs up the sgml.  Comment
297   out until somebody adds docs.  KAO
298      <sect1><title>Frame Buffer Generic Functions</title>
299 X!Idrivers/video/fbgen.c
300      </sect1>
301 KAO -->
302      <sect1><title>Frame Buffer Video Mode Database</title>
303 !Idrivers/video/modedb.c
304 !Edrivers/video/modedb.c
305      </sect1>
306      <sect1><title>Frame Buffer Macintosh Video Mode Database</title>
307 !Idrivers/video/macmodes.c
308      </sect1>
309      <sect1><title>Frame Buffer Fonts</title>
310         <para>
311            Refer to the file drivers/video/console/fonts.c for more information.
312         </para>
313 <!-- FIXME: Removed for now since no structured comments in source
314 X!Idrivers/video/console/fonts.c
315 -->
316      </sect1>
317   </chapter>
318 </book>