linux启动全过程

参考: http://www.staroceans.org/e-book/linux-bootstrap-1.html

1. MBR里的内容属于grub

grub-2.02\grub-core\boot\i386\pc\boot.S 就是MBR的内容,该文件最后一句 .word GRUB_BOOT_MACHINE_SIGNATURE

    GRUB_BOOT_MACHINE_SIGNATURE在boot.h 里被定义为 0xaa55

2. 现在不理解的一点是:

In the beginning of this post I wrote that the first instruction executed by the CPU is located at address 0xFFFFFFF0, which is much larger than 0xFFFFF (1MB). How can the CPU access this in real mode? This is in the coreboot documentation:

0xFFFE_0000 - 0xFFFF_FFFF: 128 kilobyte ROM mapped into address space

At the start of execution, the BIOS is not in RAM but in ROM.

既然实模式下内存地址只有20位,cpu只能访问到1MB的地址,那如何把超出1MB的地址进行映射呢? 据我所知,映射的地址必须在地址位能表达的范围之内。

参考:https://superuser.com/questions/988473/why-is-the-first-bios-instruction-located-at-0xfffffff0-top-of-ram

猜你喜欢

转载自www.cnblogs.com/bettersky/p/9271459.html