目录
- I -
目录
序言................................................................................ 1
本书的主要目标 ........................................................ 1
现有书籍不足之处 .................................................... 1
阅读早期内核其它的好处? .................................... 2
阅读完整源代码的重要性和必要性 ........................ 2
如何选择要阅读的内核代码版本 ............................ 2
阅读本书需具备的基础知识 .................................... 3
使用早期版本是否过时? ........................................ 3
EXT2 文件系统与 MINIX 文件系统? ...................... 4
第 1 章 概述 .................................................................. 5
1.1 LINUX 的诞生和发展 ........................................... 5
1.2 内容综述 ............................................................. 9
1.3 本章小结 ........................................................... 12
第 2 章 LINUX 内核体系结构 .................................. 13
2.1 LINUX 内核模式 ................................................. 13
2.2 LINUX 内核系统体系结构 ................................. 14
2.3 LINUX 内核进程控制 ......................................... 15
2.4 LINUX 内核对内存的使用方法 ......................... 16
2.5 LINUX 内核源代码的目录结构 ......................... 18
2.6 内核系统与用户程序的关系............................ 23
2.7 LINUX 内核的编译实验环境 ............................. 23
2.8 LINUX/MAKEFILE 文件........................................ 25
2.9 本章小结 ........................................................... 33
第 3 章 引导启动程序(BOOT)............................. 35
3.1 概述 ................................................................... 35
3.2 总体功能 ........................................................... 35
3.3 BOOTSECT.S 程序 ................................................ 36
3.4 SETUP.S 程序 ....................................................... 43
3.5 HEAD.S 程序........................................................ 55
3.6 本章小结 ........................................................... 63
第 4 章 初始化程序(INIT)......................................... 65
4.1 概述 ................................................................... 65
4.2 MAIN.C 程序........................................................ 65
4.3 本章小结 ........................................................... 73
第 5 章 内核代码(KERNEL)..................................... 75
5.1 概述 ................................................................... 75
5.2 MAKEFILE 文件................................................... 78
5.3 ASM.S 程序.......................................................... 80
5.4 TRAPS.C 程序 ...................................................... 87
5.5 SYSTEM_CALL.S 程序.......................................... 94
5.6 MKTIME.C 程序 ................................................. 102
5.7 SCHED.C 程序 ....................................................104
5.8 SIGNAL.C 程序................................................... 116
5.9 EXIT.C 程序 .......................................................122
5.10 FORK.C 程序.................................................... 127
5.11 SYS.C 程序.......................................................132
5.12 VSPRINTF.C 程序..............................................138
5.13 PRINTK.C 程序 .................................................146
5.14 PANIC.C 程序 ................................................... 147
5.15 本章小结........................................................148
第 6 章 块设备驱动程序(BLOCK DRIVER).........149
6.1 概述 .................................................................149
6.2 总体功能..........................................................149
6.3 MAKEFILE 文件.................................................149
6.4 BLK.H 文件........................................................151
6.5 HD.C 程序.......................................................... 154
6.6 LL_RW_BLK.C 程序 ...........................................167
6.7 RAMDISK.C 程序................................................171
6.8 FLOPPY.C 程序...................................................175
第 7 章 字符设备驱动程序(CHAR DRIVER) .......189
7.1 概述 .................................................................189
7.2 总体功能描述..................................................189
7.3 MAKEFILE 文件.................................................192
7.4 KEYBOARD.S 程序 .............................................194
7.5 CONSOLE.C 程序................................................ 211
7.6 SERIAL.C 程序 ...................................................234
7.7 RS_IO.S 程序 .....................................................237
7.8 TTY_IO.C 程序 ...................................................240
7.9 TTY_IOCTL.C 程序.............................................250
第 8 章 数学协处理器(MATH)................................257
8.1 概述 .................................................................257
8.2 MAKEFILE 文件.................................................257
8.3 MATH-EMULATION.C 程序.................................. 258
第 9 章 文件系统(FS)...............................................261
9.1 概述 .................................................................261
9.2 总体功能描述..................................................261
9.3 MAKEFILE 文件.................................................267
9.4 BUFFER.C 程序 ..................................................269
9.5 BITMAP.C 程序...................................................283
9.6 INODE.C 程序 .................................................... 288
9.7 SUPER.C 程序 ....................................................298
9.8 NAMEI.C 程序....................................................306
9.9 FILE_TABLE.C 程序............................................ 328
9.10 BLOCK_DEV.C 程序..........................................328