这是一份对于ARM1176JZF-S芯片上MMU内存地址转换/映射过程的整理,内容完全来自ARM官网的技术手册。

ARM1176JZF-S属于ARMv6产品系列,支持两种页表项的格式,一种是向ARMv4和ARMv5兼容的格式,另一新是ARMv6的新格式。v4/v5的格式在相应的技术手册里描述得非常清楚,但是对于v6格式的描述显得有点散,所以本文只关注ARMv6格式。

内容保持英文原文,没有翻译以免造成误解弄巧成拙。

Level 1 Translation

When the CP15 Control Register c1 Bit 23 is set to 1 in the corresponding world, the subpage AP bits are disabled and the page tables have support for ARMv6 MMU features.

LEVEL 1 DESCRIPTOR FORMAT

As shown in Figure above, bits [1:0] of a level 1 page table entry determine the type of the entry.

Explanation of each bit:

Bits Meaning
Bits [1:0] == b00 Translation fault.
Bits [1:0] == b01 The entry points to a second-level page table, called a Coarse page table. Figure 6.8 shows the formats of the possible entries in the Coarse page table.
Bits [1:0] == b10 The entry points to a either a 1MB Section of memory or a 16MB Supersection of memory. Bit [18] of the descriptor selects between a Section and a Supersection. For details of supersections see Supersections.
Bits [1:0] == b11 Reserved.
SBZ SBZ = Should Be Zero, there bits should be set as 0 value.
NS Defines the world for the processor:0 = Secure, reset value,1 = Non-secure.
Domain A domain is a collection of memory regions. ARM1176JZF-S supports 16 Domains in the Secure world and 16 Domains in the Non-secure world. Domains provide support for multi-user operating systems. All regions of memory have an associated domain.
nG The Not-Global (nG) bit, determines if the translation is marked as global (0), or process-specific (1) in the TLB. For process-specific translations the translation is inserted into the TLB using the current ASID, from the ContextID Register, CP15 c13.
S The Shared (S) bit, determines if the translation is for Non-Shared (0), or Shared (1) memory. This only applies to Normal memory regions. Device memory can be Shared or Non-Shared as determined by the TEX bits and the C and B bits.
XN The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable (1).
APX Three access permission bits.The access permissions extension (APX) bit, provides an extra access permission bit.See “Access Permissions”.
AP
P ARM1176JZF-S processors do not support the P bit.
TEX See “TEX, C and B bits”.
C
B

TEX, C AND B BITS

TEX, C AND B BITS PROVIDE OPTIONS FOR INNER AND OUTER CACHABILITY.

The ARMv6 MMU architecture originally defined five bits to describe all of the options for inner and outer cachability. These five bits, the Type Extension Field, TEX[2:0], Cacheable, C, and Bufferable, B bits, are set in the descriptors.

Few applications make use of all these options simultaneously. For this reason, a new configuration bit, TEX remap, bit [28] in the CP15 Control Register, permits the core to support a smaller number of options by using only the TEX[0], C and B bits.

The OS can configure this subset of options through a remap mechanism for these TEX[0], C, and B bits. The TEX[2:1] bits in the descriptor then become 2 OS managed page table bits.

See detail of ARM1176JZF-S Technical Reference Manual 6.6.1 for TexRemap=0 configuration/TexRemap=1 configuration.

ACCESS PERMISSIONS

The access permission bits control access to the corresponding memory region. If an access is made to an area of memory without the required permissions, then a permission fault is raised.

The access permissions are determined by a combination of the AP and APX bits in the page table, and the S and R bits in CP15 Control Register c1. For page tables not supporting the APX bit, the value 0 is used.

Access permission bit encoding:

VIRTUAL-PHISICAL ADDRESS TRANSLATION

Translation for a 1MB section, ARMv6 format

Level 2 Translation

LEVEL 2 DESCRIPTOR FORMAT

Explanation of each bit:

Bits Meaning
Bits [1:0] == b00 Translation fault.
Bits [1:0] == b01 The entry points to a 64KB Large page in memory.
Bits [1:0] == b1x The entry points to a 4KB Extended small page in memory.Bit [0] of the entry is the XN bit for the entry.

 

VIRTUAL-PHISICAL ADDRESS TRANSLATION

Large page table walk, ARMv6 format:

4KB extended small page translations, ARMv6 format:

转载于:https://blog.51cto.com/2ndmoon/1283723

ARM1176JZF-S/S3C6410 内存地址转换相关推荐

  1. 六、操作系统——内存管理的概念(空间的分配与回收、空间的扩充、地址转换、存储保护)

    一.概述 二.操作系统作为系统资源的管理者,当然也需要对内存进行管理,要管些什么呢? 1. 内存空间的分配与回收 连续分配:指为用户进程分配的必须是一个连续的内存空间. 1. 单一连续分配 在单一连续 ...

  2. 玄铁C910内存管理与地址转换技术

    玄铁C910内存管理与地址转换技术 玄铁 C910 简介 C910 兼容 RISC-V 架构,采用12级超标量流水线,针对算术运算.内存访问以及多核同步等方面进行了优化,同时标配内存管理单元,可运行 ...

  3. Linux内核内存管理:地址转换和MMU

    地址转换和MMU 虚拟内存是一个概念,是给进程的一种错觉,因此它认为自己拥有巨大的.几乎无限的内存,有时甚至比系统实际拥有的内存还要多.每次访问内存位置时,由CPU将虚拟地址转换为物理地址.这种机制称 ...

  4. 【Socket网络编程】3.字节序转换函数htons、htonl ,地址转换函数inet_ntoa、inet_ntop、inet_pton、inet_addr

    字节序转换函数htons.htonl 地址转换函数inet_ntoa.inet_ntop.inet_pton.inet_addr 1.字节序转换函数 #include <arpa/inet.h& ...

  5. 更灵活的定位内存地址的方法---汇编学习笔记

    更灵活的定位内存地址的方法 前面,我们用[0].[bx]的方法,在访问内存的指令中,定位内存单元的地址.本章将用更灵活的方式来定位内存地址. 7.1 and和or指令 (1)and指令:逻辑与指令,按 ...

  6. iptables实现网络防火墙及地址转换

    iptables主机防火墙功能及常用命令 FSM:Finite State Machine 有限状态机 客户端:closed -->syn_sent -->established --&g ...

  7. java 怎么输出地址,Java中char[]输出不是内存地址的原因详解

    前言 Java中共有八种基本数据类型:byte,int,short,long,float,double,char,boolean. 计算机中的基础数据单位是bit, 1byte=8bit. 数据类型 ...

  8. 1.socket编程:socket编程,网络字节序,函数介绍,IP地址转换函数,sockaddr数据结构,网络套接字函数,socket相关函数,TCP server和client

     1  Socket编程 socket这个词可以表示很多概念: 在TCP/IP协议中,"IP地址+TCP或UDP端口号"唯一标识网络通讯中的一个进程,"IP 地址+端 ...

  9. 【linux网络编程】网络字节序、地址转换

    网络字节序 故事的起源 "endian"这个词出自<格列佛游记>.小人国的内战就源于吃鸡蛋时是究竟从大头(Big-Endian)敲开还是从小头(Little-Endia ...

最新文章

  1. 与优秀的人在一起,自己也会优秀起来!高质量技术群等你加入!
  2. python 正方形去畸变_opencv 角点检测+相机标定+去畸变+重投影误差计算
  3. long long c语言_带你打开C语言的大门之C语言的变量
  4. JDK 7和JDK 8中大行读取速度较慢的原因
  5. 分析容灾备份建设需求
  6. Linux内核同步机制之信号量与锁
  7. Codeforces 988D Points and Powers of Two 【性质】【卡常】
  8. QT之tableWidget删除全部行
  9. windows下cmd下载文件
  10. 办公室电脑里的文件和家里电脑的文件同步,有什么便签软件可以实现
  11. 扬州大学c语言作业,扬州大学c语言0600706期末试题
  12. rtx3080和rtx3080ti性能差距 rtx3080和rtx3080ti 参数对比哪个好
  13. 非线性方程的数值解法:牛顿法及牛顿下山法(含Matlab程序)
  14. Android UI 字体库(.ttf文件)的使用 -- xml方式
  15. linux下 mysql的重启,启动,停止命令
  16. 最小生成树Prim算法java实现
  17. 2020-12-26[B]比赛总结
  18. 波数与波长 matlab,Matlab求解方同轴波导的截止波长和特性阻抗
  19. Vins_mono重力对齐理解
  20. 计算机硕士可以入伍么,2021年下半年“征兵”已开始,大学生在校入伍好,还是毕业入伍好...

热门文章

  1. 《机器学习》 第 5 章 神经网络
  2. P2894 [USACO08FEB]酒店Hotel
  3. 【逆天的算法】这几首宋词,你能看出来是出自计算机之手吗?
  4. 【VBA编程】15.WorkSheet对象常用属性
  5. KindEditor富文本编辑器, 从客户端中检测到有潜在危险的 Request.Form 值
  6. jquery validate 插件:(2)简单示例
  7. Re:[转]如何基于discuz开发网站通行证的功能
  8. Java 变量声明和赋值
  9. Python踩坑:类与类对象类型参数传递与使用
  10. 64位CentOs7源码安装mysql-5.6.35过程分享