-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TLB & PTW - Rocketchip] Research the ptw and tlb microarchitecture and output the ppt. #2
Comments
https://carrv.github.io/2020/papers/CARRV2020_paper_11_Papadopoulos.pdf You should combine this figure with rocketchip’s PTW code for understanding and reading. Page Walker 访问到 2MB 的节点,返回给 Last Level Page Walker,由 Last Level Page Walker 进行最后一级页表的访问 |
TLB: PTW: |
Check out my keynote: |
当前的配置是这样的 我需要弄懂每一个配置的作用, |
页表只能放入内存中,因为页表占用的空间太大了。 |
嵌入式系统中的用户模式和进程隔离1. 特权模式切换Riscv中,M模式可以直接访问所有的硬件资源,为了更好的保护系统代码安全,必须禁止不可信代码执行特权指令(如mret)和访问特权CSR(如mstatus)。 U模式为此功能服务。当CPU处于U模式,将拒绝执行M模式指令或访问M模式CSR。 M切换U的方法:将mstatus.MPP设为U,然后执行mret。当U模式出现异常,则控制权交会M模式。 2. 限制不可信代码只能访问各自的内存 —— PMP (Physical Memory Protection, PMP)该功能允许M模式指定哪些内存地址可让U模式访问。 方法是: PMP包含若干地址寄存器(8-16个)和相应的配置寄存器,后者用于配置读写执行的权限。 U模式的CPU尝试取指访存时,该地址X会与PMP寄存器比较。
|
Rocketchip中的PTW: PTW(Page Table Walker)是一个处理页表查询的状态机,用于高级TLB(Translation Lookaside Buffer)的页面表查询。这个状态机在TLB缓存未命中时,通过查询内存中的页表,找到所需的页表条目(PTE),并将其缓存到L2TLB或PTE缓存中。以下是对PTW状态机的详细分析: PTW 的状态机概述:
状态机中的关键事件:
PTW中的状态转换:
总结 PTW状态机在处理TLB缓存未命中的情况下,通过一系列状态转换完成页表查询,并缓存结果以加速后续访问。其主要目标是通过L2TLB和PTE缓存的命中率,减少对内存的访问,提升虚拟内存系统的性能。 |
No description provided.
The text was updated successfully, but these errors were encountered: