Reputation: 117
I am currently learning about PMP in RISC-V, I understand about the TOR, but I'm getting difficulties to understand NA4 and NAPOT configuration
Can someone make an explanation ? My assumption is, if my pmpaddr
is 0xFFFFFFFE
then it means my pmp ranges from 0xFFFFFFFE00
to 0xFFFFFFFEFF
. Is this right?
Upvotes: 2
Views: 2607
Reputation: 41
I can give you the answrer.
if pmpaddr is 0xFFFFFFFE
, (1111....1110), it will matches address from 1111....111000
to 1111...111111
(8 bytes).
The length of pmpaddr is 32 bits, and the length of memory is 34 bits.
You can understand this with subnet mask of IP addr.
This means the last zero is the indicator bit, the high bits must all match.
Upvotes: 4