摘要
内存保护机制是嵌入式操作系统研究中的一个重点和难点问题。RISCV处理器使用物理内存保护单元(PMP)进行内存访问保护,防止数据区破坏和堆栈溢出引起的系统异常。一般嵌入式系统的内核和各个任务不是孤立的,导致无法在代码区和数据区直接设置内存保护。提出了一种基于RISCV的嵌入式操作系统内存保护方法,操作系统为每个应用分配独立的代码区和数据区,从应用安装、启动、运行到任务切换来获取并设置PMP保护的参数,从而实现了高效灵活的内存保护方法,确保系统稳定可靠地运行。
Abstract
Memory protection mechanism is a key and difficult problem in embedded operating system research.RISCV processors use Physical Memory Protection Unit (PMP) for memory access protection to prevent system exceptions caused by data area corruption and stack overflow.Generally,the kernel and each task of an embedded system are not isolated,so it is impossible to directly set memory protection in the code area and data area.This paper proposes a memory protection method for embedded operating systems based on RISCV.The operating system allocates independent code areas and data areas for each application,from application installation,startup,running to task switching,to obtain and set the parameters of PMP protection,thus realizing an efficient and flexible memory protection method to ensure the stable and reliable operation of the system.
关键词
RISCV /
PMP /
内存保护 /
任务启动 /
任务切换
Key words
RISCV /
PMP /
memory protection /
task startup /
task switching
崔永旭, 王鑫, 胡启龙, 樊琳, 梁华, 刘永富.
RISCV嵌入式操作系统的一种内存保护方法研究[J]. 集成电路与嵌入式系统. 2022, 22(12): 46-48
Cui Yongxu, Wang Xin, Hu Qilong, Fan Lin, Liang Hua, Liu Yongfu.
Research on Memory Protection Method of Embedded Operating System Based on RISCV[J]. Integrated Circuits and Embedded Systems. 2022, 22(12): 46-48
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] Lin Fan,Qilong Hu,Xin Wang,et al.An implementation method of multi process MPU protection based on CortexM processor[C]//Advanced Information Technology,Electronic and Automation Control Conference,2022(6).
[2] 何先波,唐宁九,吕方,等.ELF文件格式及应用[J].电测与仪表,2001(11):144145,150.
[3] 王鑫,胡启龙,袁瑞铭,等.一种基于电能表操作系统的程序空间管理方法[J].单片机与嵌入式系统应用,2022,22(8):1619.