VMSAv8-64 translation table format descriptors
通常情况下,一个 descriptor 可能是以下的几种 entry:
- 非法或者异常的 entry。
- Table entry, 指向 next-level translation table。
- Block entry, 定义内存访问的 memory properties。
- Reserved format。
Descriptor 的 bit[1] 用于指示 descriptor 的类型,bit[0] 用于指示 descriptor 是否有效。
D4.3.1 VMSAv8-64 translation table level 0 level 1 and level 2 descriptor formats
在 VMSAv8-64 的 level 0、level 1 和 level 2 的 translation table descriptor 的格式主要存在以下的差异:
- 是否存在 block entry。
- block entry 所描述的内存块的大小。
在不同的 translation granule 下,不同 level 的差异如下:
4KB granule
Level 0 descriptor 不支持 block translation。
Block entry:
- 在 level 1 table 中,映射 1GB 的 input address range
- 在 level 2 table 中,映射 2MB 的 input address range
16KB granule
Level 0 和 level 1 descriptors 都不支持 block translation
在 Level 2 table 中,block entry 映射 32MB 的 input address range
64KB granule
不支持 Level 0 lookup 操作。
Level 1 descriptor 不支持 block translation
在 Level 2 table 中,block entry 映射 512MB 的 input address range
Figure D4-16 描述了 ARMv8 level 0, level 1, and level 2 descriptor 格式:

Descriptor encodings, ARMv8 level 0, level 1, and level 2 formats
Descriptor 的 bit[0] 指明该 descriptor 是否有效,该
bit 为 1 时,为有效的 descriptor。如果一次 lookup 操作返回一个无效的 descriptor,那么就意味着该 input
address 没有进行映射,当访问该 input address 时,会产生 Translation fault。Descriptor 的 bit[1] 指明该 descriptor 的类型,如下表所示:
| 0 | Block | Descriptor 包含了一个内存块的基地址和属性。 |
| 1 | Table | Descriptor 包含了下一级 translation table 的基地址,在 stage 1 translation 中,还包含对应的 translation 的属性信息。 |
有效的 descriptor 中的其他比特位的含义如下:
Block descriptor
Gives the base address and attributes of a block of memory, as follows:
包含一个 memory block 的基地址和属性信息,如下:
4KB translation granule
- 在 level 1 Block descriptor 中,bits[47:30] 为 output address 的 bits[47:30]。此 output address 指向一个 1GB 的 memory block。
- 在 level 2 Block descriptor 中,bits[47:21] 为 output address 的 bits[47:21]。此 output address 指向一个 2MB 的 memory block。
16KB translation granule
- 在 level 2 Block descriptor 中,bits[47:25] 为 output address 的 bits[47:25]。此 output address 指向一个 32MB 的 memory block。
64KB translation granule
- 在 level 2 Block descriptor 中,bits[47:29] 为 output address 的 bits[47:29]。此 output address 指向一个 512MB 的 memory block。
Bits[63:52, 11:2] 包含该 memory block 的属性信息。
Level 2 block descriptor 和 level 3 page descriptor 中的 Bits[63:52, 11:2] 含义是相同的。
Table descriptor
包含下一级 translation table 的基地址,如下:
4KB translation granule
- bits[47:12] 为 output address 的 bits[47:12],同时:基地址的 Bits[11:0] 为 0.
- 在 level 0 Table descriptor 中, output address 为 level 1 table 的基地址。
- 在 level 1 Table descriptor 中, output address 为 level 2 table 的基地址
- 在 level 2 Table descriptor 中, output address 为 level 3 table 的基地址
16KB translation granule
- bits[47:14] 为 output address 的 bits[47:14],同时:基地址的 Bits[13:0] 为 0.
- 在 level 0 Table descriptor 中, output address 为 level 1 table 的基地址。
- 在 level 1 Table descriptor 中, output address 为 level 2 table 的基地址
- 在 level 2 Table descriptor 中, output address 为 level 3 table 的基地址
64KB translation granule
- bits[47:16] 为 output address 的 bits[47:16],同时:基地址的 Bits[15:0] 为 0。
- 在 level 1 Table descriptor 中, output address 为 level 2 table 的基地址
- 在 level 2 Table descriptor 中, output address 为 level 3 table 的基地址
在 stage 1 translation 中, bits[63:59] 包含 next-level lookup 的属性信息。
如果 translation table 属于 Non-secure EL1&0 stage 1 translation,那么 descriptor 中的 output address 为目标 block 或者 table 的 IPA,如果不属于,那么 output address 为目标 block 或者 table 的 PA。
D4.3.2 ARMv8 translation table level 3 descriptor formats
使用 4KB granule 时,level 3 table 中的每一个 entry 都映射了 4KB 的 input address range。
使用 16KB granule 时,level 3 table 中的每一个 entry 都映射了 16KB 的 input address range。
使用 64KB granule 时,level 3 table 中的每一个 entry 都映射了 64KB 的 input address range。
Figure D4-17 描述了 ARMv8 level 3 descriptor 的格式

Descriptor 的 bit[0] 指明该 descriptor 是否有效,该 bit 为 1 时,为有效的 descriptor。如果一次 lookup 操作返回一个无效的descriptor,那么就意味着该 input address 没有进行映射,当访问该 input address 时,会产生 Translation fault。Descriptor 的 bit[1] 指明该 descriptor 的类型,如下所示:
在此 level 中,只存在 Page descriptor。Page descriptor 的其他位的含义如下:在此 level 中,只存在 Page descriptor。Page descriptor 的其他位的含义如下:
Page descriptor
该 descriptor 包含了一个 page 的地址,如下所示:
4KB translation granule
Bits[47:12] 为 page 的地址的 bits[47:12]。
16KB translation granule
Bits[47:14] 为 page 的地址的 bits[47:14]。
64KB translation granule
Bits[47:16] 为 page 的地址的 bits[47:16]。
Bits[63:52, 11:2] 包含 page 的属性信息。
NOTE:
Page descriptor 的 bits[63:52, 11:2] 与 level 0、level 1 和 level 2 中的 block descriptor 中的 bits[63:52, 11:2] 的用途是相同的。
如果 translation table 属于 Non-secure EL1&0 stage 1 translation,那么 descriptor 中的 output address 为 page 的 IPA,如果不属于,那么 output address 为 page 的 PA
VMSAv8-64 translation table format descriptors的更多相关文章
- hive 使用笔记(table format;lateral view)
1. create table 创建一张目标表,指定分隔符和存储格式: create table tmp_2 (resource_id bigint ,v int) ROW FORMAT DELIMI ...
- hive 使用笔记(table format;lateral view横表转纵表)
1. create table 创建一张目标表,指定分隔符和存储格式: create table tmp_2 (resource_id bigint ,v int) ROW FORMAT DELIMI ...
- armv8 memory translation table descriptor
上一节大致给出了descriptor的结构,这篇细致分析各个field: 1) Table Descriptor:stage2中不包含任何的attribute的field,每个level中的descr ...
- armv8 memory translation
AArch32,arm的32bit架构: AArch64,arm的64bit架构: ARMv8.2-LPA,是armv8.2中的新feature,扩大了IPA和PA的支持范围,从48bit扩展到52b ...
- Armv8-A Memory management
本文介绍Armv8-A的内存管理.内存管理指的是在系统中,内存访问是如何实现的. 使用内存管理机制,可以让每个应用之间的内存地址分离,即sandbox application,也可以让多个在物理内存上 ...
- 移植Linux-3.4.2内核到S3C2440
一.BootLoader引导内核过程 1.Bootloader的工作 1.1.将内核读入内存 2.2.保存内核启动参数到指定位置,内核启动时去这个位置解析参数 3.3. ...
- arm-linux内核start_kernel之前启动分析(1)-接过bootloader的衣钵
前段时间移植uboot细致研究过uboot启动过程,近期耐不住寂寞.想对kernel下手. Uboot启动过程分析博文连接例如以下: http://blog.csdn.net/skyflying201 ...
- Tiny4412 Linux 内核启动流程
Linux内核的启动分为压缩内核和非压缩内核两种,这里我们以压缩内核为例.压缩内核运行时,将运行一段解压缩程序,得到真正的内核镜像,然后跳转到内核镜像运行.此时,Linux进入非压缩内核入口,在非压缩 ...
- 附录:ARM 手册 词汇表
来自:<DDI0406C_C_arm_architecture_reference_manual.pdf>p2723 能够查询到:“RAZ RAO WI 等的意思” RAZ:Read-As ...
随机推荐
- HDU1075 字典树 + 字符串映射
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 ,字典树的字符串映射. 题意是给你每个火星文单词对应的英语,然后让你把一篇火星文文章给翻译成英语 ...
- 一个SAP顾问在美国的这些年
今天的文章来自我的老乡宋浩,之前作为SAP顾问在美国工作多年.如今即将加入SAP成都研究院S4CRM开发团队.我们都是大邑人. 大邑县隶属于四川省成都市,位于成都平原西部,与邛崃山脉接壤.东与崇州市交 ...
- http请求头和相应头的作用
请求头(Request Headers) Accept:application/json, text/plain, */* Accept-Encoding:gzip, deflate Accept-L ...
- 【Java-JVM】定量分析解决OutOfMemoryError: PermGen space, 来看科学量化分析
网络上搜集,有操作有分析. 一.问题 在部署大型的 Java Web项目的时候,或者在 MyEclipse 中进行调试的时候经常出现: OutOfMemoryError: PermGen space ...
- Jquery中的CheckBox、RadioButton、DropDownList的取值赋值实现代码
随着Jquery的作用越来越大,使用的朋友也越来越多.在Web中,由于CheckBox. Radiobutton . DropDownList等控件使用的频率比较高,就关系到这些控件在Jquery中的 ...
- java Html&JavaScript面试题:HTML 的 form 提交之前如何验证数值文本框的内容全部为数字? 否则的话提示用户并终止提交?
提交的验证方法(通过单个字符比较): <!DOCTYPE html> <html> <head> <meta charset="UTF-8" ...
- Express框架 --router/app.use
翻看去年自己记录的印象笔记,准备把笔记上的一些内容也同时更新到博客上,方便自己查看. 1.app.use和app.get的区别及解析 app.use(path,callback)中的callback既 ...
- win10.net 安装出问题0x800F70422
因为安装ooracle数据库的时候需要用到.net但安装的时候出了0x800F70422, 随后就去网上查了下这个错出现的原因,发现是我之前把Windows自带的更新给禁用了 只要把它再开启就行了.
- 精读《Epitath 源码 - renderProps 新用法》
1 引言 很高兴这一期的话题是由 epitath 的作者 grsabreu 提供的. 前端发展了 20 多年,随着发展中国家越来越多的互联网从业者涌入,现在前端知识玲琅满足,概念.库也越来越多.虽然内 ...
- Ansible学习 安装
对于运维人员来说,自动化工具是日常工作中比不可少的.Ansible是一个很好的自动化工具. Ansible默认使用SSH协议管理机器,在管理主机上安装Ansible,管理主机和被管理主机只要安装了py ...