Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kernel 打印内核&x27;s页表条目_Kernel - Fatal编程技术网

Kernel 打印内核&x27;s页表条目

Kernel 打印内核&x27;s页表条目,kernel,Kernel,具有4级页表的虚拟内存映射: 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory ffffc80000000000 - ff

具有4级页表的虚拟内存映射:

0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory
ffffc80000000000 - ffffc8ffffffffff (=40 bits) hole
ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space
ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole
ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
ffffffff80000000 - ffffffffa0000000 (=512 MB)  kernel text mapping, from phys 0
ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space
我知道内核试图从直接映射区域的pageu偏移量开始,将物理地址直接映射到虚拟地址

ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory

但是我不知道内核中的代码在哪里保存页面表来管理这个直接映射区域,以及如何打印出这个直接映射区域中4级页面表的所有页面表条目。您知道如何打印它们吗?

内核为每个正在运行的进程维护一个
任务结构,每个
任务结构都有一个
mm\u结构,它维护进程的所有虚拟内存地址。有关如何实现页表的更多信息,请查看通用头文件(和,以及实现()

你得花很多功夫才能弄明白,祝你好运