摘要 |
<p>Herein disclosed are a memory protection method and device therefor which can achieve memory protection with the addition of only a small number of hardware resources, by designing a layout of individual processes in a memory so that a memory protection function is realized for each process. The MSB to X<th> bit of a program counter and the MSB to X<th> bit of a memory space are allotted for memory protection fields, thereby providing 2<x> privilege levels. When instructions under execution include a memory access, the privilege level (the value of the X<th> bit) of the program counter and the privilege level (the value of the X<th> bit) of an address to be accessed are compared with each other. If the privilege level of the program counter is lower than that of the address to be accessed, a memory access is inhibited. <IMAGE></p> |