上一节大致给出了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. 使用c#反射实现接口可视化调试页面

    直接上代码,引用CommTools.dll.包括aspx显示页面和aspx.cs获取反射数据源代码 using System; using System.Collections.Generic; us ...

  2. [centos][ntp][administrator] chrony ntp

    以下内容,适用于 CentOS 7 (systemd 体系) 一. 首先,确认你是否启用了 ntp 服务: [root@nlb2-liantiao ~]# timedatectl Local time ...

  3. [knowledge] netmap

    900MHz的单核处理10GB的包收/发. netmap has been implemented in FreeBSD and Linux and Gbit/s network adapters. ...

  4. Flink - InputGate

    初始化 Task List<InputGateDeploymentDescriptor> consumedPartitions = tdd.getInputGates(); // Cons ...

  5. Python多线程中阻塞(join)与锁(Lock)的使用误区

    参考资料:https://blog.csdn.net/cd_xuyue/article/details/52052893 1使用两个循环分别处理start和join函数.即可实现并发. threads ...

  6. 什么是restful api

    https://blog.csdn.net/laotianv5/article/details/81634997 什么是Restful API Restful API 从字面就可以知道,他是rest式 ...

  7. JTAG 工作原理

  8. PHP三种运行方式(转载)

    三种运行方式:mod_php5.cgi.fast-cgi 1. 通过HTTPServer内置的模块来实现, 例如Apache的mod_php5,类似的Apache内置的mod_perl可以对perl支 ...

  9. mysql触发器:插入数据前更新创建时间为服务器的时间

    DROP TRIGGER IF EXISTS `upd_patientquestionnaire`; create trigger upd_patientquestionnaire BEFORE in ...

  10. 报错解决——make: *** No targets specified and no makefile found. Stop

    wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz tar zxvf ncurses-5.6.tar.gz #切换目录到ncurses ...