linux-0.01 のナニ
boot/head.s に paging な初期設定がありますね。そういや別場所でコード読みの予定があるのですが、成果をどうするか検討してないかも。
それは良いのですが
linux-0.01 なナニは startup_32 が 0x0 に配置されてその後そこが page directory になるらしい。
* head.s contains the 32-bit startup code. * * NOTE!!! Startup happens at absolute address 0x00000000, which is also where * the page directory will exist. The startup code will be overwritten by * the page directory.
で、page directory とか page table とかは以下に、なのかな。
.org 0x1000 pg0: .org 0x2000 pg1: .org 0x3000 pg2: # This is not used yet, but if you # want to expand past 8 Mb, you'll have # to use it.
これ、面白いですね。直後に以下なコードがあるのですが、
.org 0x4000 after_page_tables:
startup_32 から after_page_tables に jmp するんですが、その時点でメモリに配置される、という理解で良いのかどうなのか。で、その後に after_page_tables から setup_paging に制御が移るんですが、そこで page table を云々した後に protect mode に移行している模様。
0.01 はコメント含め、別途確認の方向で。これから pmap.c に記述されている UT の確認をしたいと思います。