
OS2006 Lab#1 Documentation TA: Tao Jie (052053007@fudan.edu.cn)
第 1 页 共 19 页
Lab#1 Documentation
Part I: Lab Overview ...............................................................2
1, Goals.....................................................................................................................................2
2, Technology Disclaimer........................................................................................................3
3, Welcome to x86 Kernel Programming ..............................................................................3
3.1 Kernel Programming: Always Assuming the Worst ..............................................3
3.2 Privilege Levels..........................................................................................................4
3.3 Segmentation .............................................................................................................4
3.4 Communicating with Devices...................................................................................5
3.5 Hardware Interrupts.................................................................................................5
3.6 Software Interrupts and Exceptions........................................................................6
3.7 Writing an Interrupt Handler..................................................................................8
4, Console Device Driver Specification..................................................................................9
4.1 Writing a Character to the Console.........................................................................9
4.2 Communicating with the CRTC ..............................................................................9
4.3 Console Device Driver Interface............................................................................10
5, Timer Device Driver Specification...................................................................................11
5.1 Configuring the Timer............................................................................................11
5.2 Timer Device Driver Interface...............................................................................12
6, Keyboard Device Driver Specification............................................................................12
6.1 Interacting with the Keyboard...............................................................................12
6.2 Keyboard Device Driver Interface.........................................................................13
7, Skeleton Kernel (VOS, mytest, _test choices in GRUB) ................................................13
8, Provided C Functions .......................................................................................................13
9, Testing ................................................................................................................................14
10, Other Important Notes ...................................................................................................14
11, Testing and Debugging with Simics ...............................................................................14
12, A Note on "Triple Faults"...............................................................................................15
Part II: Lab Specification ......................................................16
1, About Quadruple Images .................................................................................................16
2, Devices Driver ...................................................................................................................16
3, Simple VOS Game.............................................................................................................16
4, Simics Debugging Exercise...............................................................................................17
4.1 Job 1 – Register accessing.......................................................................................18
4.2 Job 2 – Virtual memory..........................................................................................18
4.3 Job3 - Symbolic Debugging....................................................................................18
5, How to submit your work?...............................................................................................18
6, The gap between Part1 and Part2 ...................................................................................19
Contact with the TA-in-charge of Lab#1..............................19
评论0