上一节大致给出了descriptor的结构,这篇细致分析各个field:

1) Table Descriptorstage2中不包含任何的attribute的field,每个level中的descriptor高位作为下一个level的attr配置。

    

  NSTable,bit[63], 定义subsequent lookup的secure state

  APTable,bit[62:61],

  UXNTable,bit[60],

  PXNTable,bit[59],

2) Block and Page descriptorstage1,stage2都可以设置,每个memory attr分为upper block和lower block

Stage1:

    

Upper:

  PBHA,bit[62:59],用来支持ARMv8.2-TTPBHA,

  XN、UXN,bit[54],

  PXN,bit[53],

  Contiguous,bit[52],根据颗粒的大小,表示一定数量的相邻的table,被选中。

  DBM,Dirty Bit Modifier,bit[51]

Lower:

  AF,bit[10],Access flag

  SH,bit[9:8],Shareability field

  AP,bit[7:6],Data Access Permission

  NS,bit[5],non-secure bit

  Attrindex,bit[4:2],Stage1 memory attributes index, for MAIR_ELx

Stage2:

    

  新的field包括:

  S2AP,bit[7:6],Stage2 Data Access Permission

  MemAttr,bit[5:2],Stage2 memory attributes,

接下来分为access permission和memory attributes来分析field。

Access Permission,控制data access和instruction fetch。

Pstate,在ARMv8.2中,是一个描述process state的寄存器,包括

  1) condition flags---------N(negative),Z(zero),C(carry),V(overflow)

  2) execution state--------EL(current except level),SP(Stack Pointer)

  3) exception mask bit

  4) access control bit----PAN(privilege access never),UAO(User Access Override)

Stage1中的AP[2:1],

  1) AP[2],在read-only和write-read之间选择;

  2) AP[1],在EL0和更高的exception level中选择;(none表示mmu报错)

    

S2AP,在non-secure的EL0、EL1中,

AP和S2AP都设置时,都会起作用。

  

TCR_ELn寄存器中的APTable[1:0],

    

总结,关于execution 的 access

    

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

AF(access flag),是软件的应用,表明目前该page是否被访问过,优化在OS memory control中的实现。

还有dirty state bit,也是做软件优化使用的,具体看armv8 doc

Bit[58:55],不论是block descripter还是table descripter,中都会预留,为OS使用。可以存放page是否dirty等信息。

memory region atribute,只针对block和page类型的descriptor

  stage1中,AttrIndx[2:0],选定某个MAIR_ELn,实现memory attri的配置;

    

      SH[1:0]对于normal memory,定义Shareability;

        

  stage2中的MemAttr,4bit实现类似MARI的配置、

    SH[1:0]对于normal memory,实现shareability的配置。

stage1和stage2都配置时,都会起作用,优先级以及覆盖情况,详见armv8 doc

MAIR_ELn64位寄存器,一共有三个,分为EL1,EL2,EL3,64bit被分为8个byte,每个byte内部编码指定attribute。

    

armv8 memory translation table descriptor的更多相关文章

  1. armv8 memory translation

    AArch32,arm的32bit架构: AArch64,arm的64bit架构: ARMv8.2-LPA,是armv8.2中的新feature,扩大了IPA和PA的支持范围,从48bit扩展到52b ...

  2. VMSAv8-64 translation table format descriptors

    通常情况下,一个 descriptor 可能是以下的几种 entry: 非法或者异常的 entry. Table entry, 指向 next-level translation table. Blo ...

  3. memcached vs MySQL Memory engine table 速度比较_XMPP Jabber即时通讯开发实践_百度空间

    memcached vs MySQL Memory engine table 速度比较_XMPP Jabber即时通讯开发实践_百度空间 memcached vs MySQL Memory engin ...

  4. Memory Translation and Segmentation.内存地址转换与分段

    原文标题:Memory Translation and Segmentation 原文地址:http://duartes.org/gustavo/blog/ [注:本人水平有限,只好挑一些国外高手的精 ...

  5. Virtual Memory PAGE TABLE STRUCTURE

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The basic mechanism f ...

  6. armv8 memory system

    在armv8中,由于processor的预取,流水线, 以及多线程并行的执行方式,而且armv8-a中,使用的是一种weakly-ordered memory model, 不保证program or ...

  7. MySQL memory引擎 table is full 问题处理

    解决mysql的内存表“table is full”错误   101209 13:13:32 [ERROR] /usr/local/mysql/bin/mysqld: The table ‘test_ ...

  8. org.apache.hadoop.hbase.DoNotRetryIOException: Class org.apache.phoenix.coprocessor.MetaDataEndpointImpl cannot be loaded Set hbase.table.sanity.checks to false at conf or table descriptor if you want

    https://stackoverflow.com/questions/38495331/apache-phoenix-unable-to-connect-to-hbase 这个坑不该啊 首选配置hb ...

  9. 关于ARMv8另外几个问题

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/qianlong4526888/article/details/27510675 问题1:支持ARMv ...

随机推荐

  1. nslookup dig iptables,sudoer,jenkins

    [NSLOOKUPm]http://roclinux.cn/?p=2441 nslookup media.ucampus.unipus.cn [DIG]http://roclinux.cn/?p=24 ...

  2. instrument之Time Profiler总结

    一.工欲善其事必先利其器 time profile时间分析工具用来检测应用CPU的使用情况,可以看到应用程序中各个方法正在消耗CPU时间,使用大量CPU不一定是个问题.客户端中动画就对CPU依赖就非常 ...

  3. Flink – JobManager.submitJob

    JobManager作为actor, case SubmitJob(jobGraph, listeningBehaviour) => val client = sender() val jobI ...

  4. $ORACLE_HOME/OPatch/opatch lsinventory查oracle补丁

    > $ORACLE_HOME/OPatch/opatch lsinventoryInvoking OPatch 10.2.0.4.2 Oracle Interim Patch Installer ...

  5. ajax 上传文件,显示进度条,进度条100%,进度条隐藏,出现卡顿就隐藏进度条,显示正在加载,再显示上传完成

    <form id="uploadForm" method="post" enctype="multipart/form-data"&g ...

  6. PyChram快捷键

  7. Apache Spark支持三种分布式部署方式 standalone、spark on mesos和 spark on YARN区别

    链接地址: http://dongxicheng.org/framework-on-yarn/apache-spark-comparing-three-deploying-ways/ Spark On ...

  8. Linux中程序开机自启

    Linux中程序开机自启 https://www.itbulu.com/debian-ubuntu-rclocal.html

  9. JSONObject,String,Map互相转换

    JSONObject和String相互转换 JSONObject jsonObject = new JSONObject(); JSONArray jsonArray = new JSONArray( ...

  10. (转)redis分布式锁-SETNX实现

    Redis有一系列的命令,特点是以NX结尾,NX是Not eXists的缩写,如SETNX命令就应该理解为:SET if Not eXists.这系列的命令非常有用,这里讲使用SETNX来实现分布式锁 ...