ARM MMU和ARM Linux的页表走 [英] ARM MMU and ARM Linux page table walk

查看:1614
本文介绍了ARM MMU和ARM Linux的页表走的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Linux下如何为它的3级页表步行带的ARMv7 MMU硬件的优势有点困惑。 MMU仅具有2个寄存器ttbr0和ttbr1(一个用于内核和其它用户空间)。如何MMU知道了解Linux的多级页表走?

I am little confused about how linux takes advantage of ARMv7 MMU hardware for its 3 level page table walk. MMU has only 2 registers ttbr0 and ttbr1 (one for kernel and other for user-space). How does mmu know know multi-level page table walk of linux?

谢谢,
HVR

Thanks, Hvr

推荐答案

如果虚拟地址的高 N 位均为零,那么翻译开始于 TTBR0 其他 TTBR1 N 来自 TTBCR 。在 TTBRn 寄存器包含所述第一级表的基的物理地址。的第一级表的适当条目被装载和条目的各个位确定该翻译使用第二级表,如果是其物理地址是什么。

If the upper N bits of the virtual address are all zero then the translation starts at TTBR0 else TTBR1. N comes from the TTBCR. The TTBRn registers contain the physical address of the base of the first-level table. The appropriate entry of the first-level table is loaded and various bits of the entry determine if the translation uses a second-level table and if so what its physical address is.

的MMU可以被配置为使用短描述符(32位物理地址)或长描述符(40位物理地址)。当使用短描述符,至多仅可用于翻译表中的两个电平。当使用长描述,可以有三个级别。

The MMU can be configured to use Short Descriptors (32-bit physical addresses) or Long Descriptors (40-bit physical addresses). When using short descriptors, at most only two-levels of translation table can be used. When using long descriptors, there can be three levels.

这忽略了第2阶段的翻译(管理程序)。一切都记录在ARMARM为V7-A和R段B3.3:
http://infocenter.arm.com/help/topic /com.arm.doc.ddi0406c/index.html

This ignores stage 2 translations (Hypervisors). All is documented in the ARMARM for v7-A&R section B3.3: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0406c/index.html

这篇关于ARM MMU和ARM Linux的页表走的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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