RISC-V 處理器的記憶體管理單元與執行權限實作與驗證

Implementation and Verification of the Memory Management Unit and Supervisor Mode for A RISC-V Processor

檔案

日期

2021

類型

語言

中文

摘要

在現代的作業系統中大都對處理器有著權限管理的需求,一般行程(process)的執行是處於使用者模式(User mode)底下, 然而當執行系統呼叫(system call)或遇到例外(exception)時就必須切換到核心模式(kernel mode)處理。 這是因為前述的需求都有可能會涉及一些可能危害到系統的操作, 所有類似的高權限需求都必須要在核心模式裡作業系統的監督下處理,透過如此的權限管理可以避免無權限的指令繞過作業系統直接對硬體操作或做出傷害系統的行為。

本論文的目的是改良由陽明交通大學資訊工程系嵌入式智慧系統實驗室所開發的開源碼 RISC-V Aquila 處理器的記憶體管理單元(MMU),並實作與驗證執行權限的管理與運行。 Aquila 內含有一個支援 RV32IMA Machine mode 的 RISC-V Core,但其現有的記憶體管理單元效率低下導致處理器進行虛擬位址轉譯時需耗費大量時間。因此在本論文中將會對此進行改良, 並實作執行權限的管理,以使其滿足執行 Linux 作業系統的硬體需求。

在設計與實作完成後會使用 Verilator 模擬器進行測試以通過 RISC-V 官方所提供的單元測試集,以驗證本論文所實作的權限模式的管理與虛擬位置轉譯的行為是否符合定義。 最後,論文也會在 Xilinx KC-705 開發版上執行驗證並執行虛擬記憶體存取測試來評估其效能,並與之前開發的 Aquila 記憶體管理單元和另一個開源 RISC-V 處理器CVA6 做比較。
In modern operating systems, most of the processors have privilege-level management requirements. In general, all user processes are executed in the user mode. But when a system call is invoked or an exception is encountered, a user process must be switched to the kernel mode. All accesses to physical resources or critical system information must be handled under the supervision of the operating system in the kernel mode. Through such privilege-level management, it is possible to prevent unauthorized commands from bypassing the operating system and directly access the hardware or perform actions that may damage the system.

The purpose of this paper is to improve the memory management unit (MMU) of the open source RISC-V processor, Aquila, developed by the Embedded Intelligent System Laboratory of the Department of Computer Science, NCYU, and to implement and verify the privilege-level management. Aquila contains a RISC-V core that supports RV32IMA Machine mode, but its existing memory management unit is not pipelined and is inefficient in virtual address translation. Also, the original design on privilege-level management was not Linux compliant. Therefore, the goal of this thesis is to propose an improved design to make it more efficient and meet the hardware requirements of the Linux kernel.

In this thesis, the unit test set provided by the RISC-V official will be used to verify whether the implementation of the supervisor mode and MMU conforms to the RISC-V specification using the Verilator simulator. Finally, the Xilinx KC-705 FPGA development board is used for system synthesis and real-time performance evaluation. Two open-source RISC-V MMU implementations, namely, the existing Aquila MMU and the CVA6 MMU are used to compare against the proposed MMU design.
顯示完整詮釋資料 統計資料

引用此條目

何柏緯 (2021). RISC-V 處理器的記憶體管理單元與執行權限實作與驗證. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/77296

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/77296