Update Booting/linux-bootstrap-2md.md

This commit is contained in:
hailin cai
2016-02-23 15:42:54 -05:00
parent 0c597baa01
commit 899cca1b1e

View File

@@ -378,10 +378,10 @@ if (cpu_level < req_level) {
`check_cpu`方法做了大量的检测和设置工作下面就简单介绍一些1检查cpu标志如果cpu是64位cpu那么就设置[long mode](http://en.wikipedia.org/wiki/Long_mode), 2) 检查CPU的制造商根据制造商的不同设置不同的CPU选项。比如对于AMD出厂的cpu如果不支持SSE+SSE2那么就禁止这些选项。
Memory detection
内存侦测
--------------------------------------------------------------------------------
The next step is memory detection by the `detect_memory` function. `detect_memory` basically provides a map of available RAM to the cpu. It uses different programming interfaces for memory detection like `0xe820`, `0xe801` and `0x88`. We will see only the implementation of **0xE820** here.
接下来,内核调用`detect_memory`方法进行内存侦测,以得到系统当前内存的使用分布。It uses different programming interfaces for memory detection like `0xe820`, `0xe801` and `0x88`. We will see only the implementation of **0xE820** here.
Let's look into the `detect_memory_e820` implementation from the [arch/x86/boot/memory.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/memory.c) source file. First of all, the `detect_memory_e820` function initializes the `biosregs` structure as we saw above and fills registers with special values for the `0xe820` call: