浏览代码

In the following expression, we add the value of phys_base to the
rax register, not the address of phys_base.
addq phys_base(%rip), %rax

BTW, the value of phys_base =
the actual loaded physical address of kernel after relocation - the
likned physical address of kernel.

Signed-off-by: Firo Yang <firogh@gmail.com>

Firo Yang 7 年之前
父节点
当前提交
723b07605c
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      Initialization/linux-initialization-1.md
  2. 1 0
      contributors.md

+ 1 - 1
Initialization/linux-initialization-1.md

@@ -270,7 +270,7 @@ That's all for now. Our early paging is prepared and we just need to finish last
 Last preparation before jump at the kernel entry point
 Last preparation before jump at the kernel entry point
 --------------------------------------------------------------------------------
 --------------------------------------------------------------------------------
 
 
-After that we jump to the label `1` we enable `PAE`, `PGE` (Paging Global Extension) and put the physical address of the `phys_base` (see above) to the `rax` register and fill `cr3` register with it:
+After that we jump to the label `1` we enable `PAE`, `PGE` (Paging Global Extension) and put the content of the `phys_base` (see above) to the `rax` register and fill `cr3` register with it:
 
 
 ```assembly
 ```assembly
 1:
 1:

+ 1 - 0
contributors.md

@@ -111,3 +111,4 @@ Thank you to all contributors:
 * [Cornelius Diekmann](https://github.com/diekmann)
 * [Cornelius Diekmann](https://github.com/diekmann)
 * [Andrés Rojas](https://github.com/c0r3dump3d)
 * [Andrés Rojas](https://github.com/c0r3dump3d)
 * [Beomsu Kim](https://github.com/0xF0D0)
 * [Beomsu Kim](https://github.com/0xF0D0)
+* [Firo Yang](https://github.com/firogh)