armv8 mmu 究竟如何选择TTBR0或TTBR1呢?

TTBR的选择(armv8.6手册 2578页)

Selection between TTBR0_ELx and TTBR1_ELx when two VA ranges are supported

Every translation table walk starts by accessing the translation table addressed by the TTBR_ELx for the stage 1

translation for the required translation regime.

For a stage 1 translation that can support two VA ranges, Figure D5-14 shows this VA range split when using 48-bit

VAs, and:

• TTBR0_ELx points to the initial translation table for the lower VA range, that starts at address 0x0000000000000000,

• TTBR1_ELx points to the initial translation table for the upper VA range, that runs up to address 0xFFFFFFFFFFFFFFFF.

As Figure D5-14 shows, for 48-bit VAs:

• The address range translated using TTBR0_ELx is 0x0000000000000000 to 0x0000FFFFFFFFFFFF.

• The address range translated using TTBR1_ELx is 0xFFFF000000000000 to 0xFFFFFFFFFFFFFFFF.

In an implementation that includes ARMv8.2-LVA and is using the 64KB translation granule, for 52-bit VAs:

• The address range translated using TTBR0_ELx is 0x0000000000000000 to 0x000FFFFFFFFFFFFF.

• The address range translated using TTBR1_ELx is 0xFFF0000000000000 to 0xFFFFFFFFFFFFFFFF.

Which TTBR_ELx is used depends only on the VA presented for translation. The most significant bits of the VA

must all be the same value and:

(根据最高位来选择使用TTBR0或者TTRB1)

• If the most significant bits of the VA are zero, then TTBR0_ELx is used.

• If the most significant bits of the VA are one, then TTBR1_ELx is used.

However, it is configurable whether VA[63:56] are considered when determining which TTBR_ELx is used, that is:

• In an implementation that includes ARMv8.2-LVA and is using the 64KB translation granule, whether the

determination depends on VA[63:52] or on VA[55:52].

• Otherwise, whether the determination depends on VA[63:48] or on VA[55:48].

For more information about whether VA[63:56] are considered for this determination see Address tagging in

AArch64 state on page D5-2534.

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

byd yes

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值