riscv-tee
riscv-tee copied to clipboard
ePMP question for RLB bit
Hello
There is a question about RLB bit
- ePMP spec (9ffec2d) says:
- RLB is RW if all pmpcfg[n].L = 0
- RLB is RW0C if any pmpcfg[n].L = 1
- ePMP spec (ba757e7) says:
- remains 0 if at least one of pmpcfg[i].L = 1
The 2 revisions are different behavior I think. The latest revision behavior is "RLB bit is cleared to 0 if one of pmpcfg[i].L is set". Is it correct?
Thanks, Larry
Hi Larry, I think that both versions convey the same concept with different wordings. you can set RLB if no entry is locked but if one of the total entries is locked RLB can not be set.
You are saying that:
The latest revision behavior is "RLB bit is cleared to 0 if one of pmpcfg[i].L is set".
No RLB is not cleared if we lock one of the entries. RLB provides the flexibility of changing the configuration of the locked entry. but you can only set RLB when none of the entries are locked. I Suppose,
- On reset the very first time, you write let's say pmpcfg[0].L = 1, Now if you will try to set RLB it will not set until PMP is reset and pmpcfg[0].L becomes 0.
- If you have not entry locked you set RLB = 1, it will be set successfully. Now you set pmpcfg[0].L = 1, now here RLB plays the role if RLB was not used&&set, you would never be able to unlock the locked entry, but when RLB = 1, you can unlock the locked rule by writing pmpcfg[0].L = 0
I hope I was able to elaborate. thanks