ReacOS启动分析

1.代码从MBR启动(boot\freeldr\bootsect\dosmbr.asm)

2.转到硬盘启动分区(boot\freeldr\bootsect\fat32.asm),它负责寻找freeldr.sys。找到后加载到0000:8000h,然后找到freeldr.sys的入口地址。

3.代码跳转到_mainCRTStartup代码(boot\freeldr\freeldr\arch\i386\fathelp.asm)。

4._mainCRTStartup是三个字节的16位代码,跳转到boot\freeldr\freeldr\arch\i386\Arch.S中的RealEntryPoint。

5.RealEntryPoint切换到保护模式,设置启动参数,然后执行函数_BootMain。

6.BootMain已经变成C语言了。

posted @ 2011-03-15 16:24  Fan Zhang  阅读(369)  评论(0)    收藏  举报