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.
Key words
RISCV /
PMP /
memory protection /
task startup /
task switching
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
References
[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.