6.828: Operating System Engineering (7)
えと、テキストの
Exercise 2. Use GDB's si (Step Instruction) command to trace into the ROM BIOS for a few more instructions, and try to guess what it might be doing. You might want to look at Phil Storrs I/O Ports Description, as well as other materials on the 6.828 reference materials page. No need to figure out all the details - just the general idea of what the BIOS is doing first.
をもっかい確認。
screen のいっこめの端末で make qemu-gdb して、にこめの端末で gdb すれば OK。ちなみにカレントディレクトリはどちらも lab なディレクトリでないと駄目です。
とりあえず The more common I/O address assignments あたりのアドレスが確認できれば良いかな的ソレ。
(gdb) si [f000:e05b] 0xfe05b: jmp 0xfefdb 0x0000e05b in ?? () (gdb)
以降、ひたすら si をナニ。って直後で cr0 を云々しとるな。
[f000:efdb] 0xfefdb: mov %cr0,%eax 0x0000efdb in ?? () (gdb) si [f000:efde] 0xfefde: and $0x9fffffff,%eax 0x0000efde in ?? () (gdb) si [f000:efe4] 0xfefe4: mov %eax,%cr0 0x0000efe4 in ?? () (gdb)
でもスルー (を
[f000:efe9] 0xfefe9: mov $0x8f,%eax 0x0000efe9 in ?? () (gdb) si [f000:efef] 0xfefef: out %al,$0x70 0x0000efef in ?? () (gdb) si [f000:eff1] 0xfeff1: in $0x71,%al 0x0000eff1 in ?? () (gdb) si [f000:eff3] 0xfeff3: cmp $0x0,%al 0x0000eff3 in ?? () (gdb)
0x70 に out してますな。NMI enable ?
このあたりは CMOS というナニがありますが、そーゆーアレなのかどうか。ちょっと限界気味なのでこのまま放っておいて明日続きを確認させて頂きます。
直前エントリなソレを確認しつつクタバります。