内核虚拟地址转换 [英] kernel virtual address translation

查看:87
本文介绍了内核虚拟地址转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到Linux和32位x86架构,可访问的4GB地址空间划分为3:1.用户空间分配给0-3 Gb,而3-4 Gb分配给内核. 大于3Gb并因此位于内核地址空间中的虚拟地址如何转换为物理地址?页表会变成图片吗?

Considering Linux and 32 bit x86 arch there is 3:1 divide of the accessible 4GB address space. The user space is allocated 0-3 Gb while 3-4 Gb is allocated to kernel. How does a virtual address that is greater than 3Gb and hence lies into the kernel address space is transformed to the physical address? Does page tables would come into picture?

推荐答案

Mel Gorman的书中有一些信息了解Linux虚拟内存管理器.

There is some information in Mel Gorman's book Understanding the Linux Virtual Memory Manager.

简短的回答:是的,内核设置了页表以将物理地址0转换为虚拟地址3 GiB. (第3.7.1节).这包括内核加载到的物理位置(在x86上通常为1MB).

The short answer: Yes, the kernel sets up page tables to translate physical address 0 to virtual address 3 GiB. (Section 3.7.1). This includes the physical location the kernel was loaded to (usually 1MB on x86).

这篇关于内核虚拟地址转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆