在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 5819|回复: 0

关于ARM中TLB锁存的问题?

[复制链接]
发表于 2003-10-6 23:12:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
下面是ARM手册上的一段TLB lockdown procedure,看不太明白,请指点………… (其中  
的第二步,第三步有什么用?他只是锁存指令或数据到TLB,为什么要失效整个TLB,而且第  
二步是什么意思?)                                                              
   The normal procedure to lock down N TLB entries is as follows:  
1. Ensure that no processor exceptions can occur during the execution of this   
procedure, by disabling  
interrupts, and so on.  
2. If an instruction TLB or unified TLB is being locked down, write the approp  
riate version of register  
10 with base == N, index == N, and P == 0. If appropriate, also turn off facil  
ities like branch  
prediction that make instruction prefetching harder to understand.  
3. Invalidate the entire TLB to be locked down.  
4. If an instruction TLB is being locked down, ensure that all TLB entries are  
loaded which relate to any  
instruction that could be prefetched by the rest of the lockdown procedure. (P  
rovided care is taken  
about where the lockdown procedure starts, it is normally possible for one TLB  
entry to cover all of  
these, in which case the first instruction prefetch after the TLB is invalidat  
ed can do this job.)  
If a data TLB is being locked down, ensure that all TLB entries are loaded whi  
ch relate to any data  
accessed by the rest of the lockdown procedure, including any inline literals   
used by its code. (This  
is usually best done by avoiding the use of inline literals in the lockdown pr  
ocedure and by putting  
all other data used by it in an area covered by a single TLB entry, then loadi  
ng one data item.)  
If a unified TLB is being locked down, do both of the above.  
5. For each of i = 0 to N-1:  
a. Write to register 10 with base == i, victim == i, and P == 1.  
b. Force a translation table walk to occur for the area of memory whose transl  
ation table walk  
result is to be locked into TLB entry i, by:  
• If a data TLB or unified TLB is being locked down, loading an item of   
data from the  
area of memory.  
• If an instruction TLB is being locked down, using the register 7 prefe  
tch instruction  
cache line operation defined in Register 7: Cache functions on page B5-15 to c  
ause an  
instruction to be prefetched from the area of memory.  
6. Write to register 10 with base == N, victim == N, and P == 0.  
  
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条


小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-1-21 05:00 , Processed in 0.022672 second(s), 23 queries , Gzip On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表