首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux X86_64物理内存布局

Linux X86_64物理内存布局
EN

Unix & Linux用户
提问于 2020-07-22 06:56:47
回答 1查看 956关注 0票数 0

根据Linux内核文档https://www.kernel.org/doc/Documentation/x86/boot.txt,有一个从X+10000X+08000的内核真正模式代码。我有两个问题;

代码语言:javascript
复制
For a modern bzImage kernel with boot protocol version >= 2.02, a
memory layout like the following is suggested:

    ~                        ~
        |  Protected-mode kernel |
100000  +------------------------+
    |  I/O memory hole   |
0A0000  +------------------------+
    |  Reserved for BIOS     |  Leave as much as possible unused
    ~                        ~
    |  Command line      |  (Can also be below the X+10000 mark)
X+10000 +------------------------+
    |  Stack/heap        |  For use by the kernel real-mode code.
X+08000 +------------------------+  
    |  Kernel setup      |  The kernel real-mode code.
    |  Kernel boot sector    |  The kernel legacy boot sector.
X       +------------------------+
    |  Boot loader       |  <- Boot sector entry point 0000:7C00
001000  +------------------------+
    |  Reserved for MBR/BIOS |
000800  +------------------------+
    |  Typically used by MBR |
000600  +------------------------+ 
    |  BIOS use only     |
000000  +------------------------+

1.真正的模式代码是GRUB的一部分还是bzImage的一部分。2.如果真正的模式代码位于X+10000X+08000之间,那么long mode/64 bit模式内核代码的物理位置在哪里?

EN

回答 1

Unix & Linux用户

发布于 2020-07-22 07:35:39

(我将参考最新版本的引导协议文档,您所查看的文档是旧的。)

实模式内核引导扇区和安装代码是内核的一部分,请参见第1.2节。他们生活在X和X+0x08000之间。

保护模式内核以0x100000的速度加载,这是上表中的第一项。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/599697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档