May 13, 2020
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 13, 2020
02:33 AM
Hello,
When memory protection is activated (PROTEN), I noticed that addresses not set in any of the protection ranges (DPR0-DPR15) are automatically considered "not allowed"
Is there a way to change the functionality so that by default addresses not set are allowed? Meaning, I only want to protect and monitor the areas I set in the Memory Protection Registers.
Example:
Say I enable PROTEN, And only set the following, while making everything else 0
DPR1_L = 0x80028000
DPR1_U = 0x80040000
Now DPRE_0 = 2 (meaning only range one is enabled)
In this case, If I say read from 0x80020000, I will get a trap, since by default anything not within the ranges is considered disabled.
Thanks for any help!
When memory protection is activated (PROTEN), I noticed that addresses not set in any of the protection ranges (DPR0-DPR15) are automatically considered "not allowed"
Is there a way to change the functionality so that by default addresses not set are allowed? Meaning, I only want to protect and monitor the areas I set in the Memory Protection Registers.
Example:
Say I enable PROTEN, And only set the following, while making everything else 0
DPR1_L = 0x80028000
DPR1_U = 0x80040000
Now DPRE_0 = 2 (meaning only range one is enabled)
In this case, If I say read from 0x80020000, I will get a trap, since by default anything not within the ranges is considered disabled.
Thanks for any help!
2 Replies
May 13, 2020
04:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 13, 2020
04:51 AM
No, there's no way to change the ranges to become not allowed instead of allowed. But you can achieve equivalent functionality by using two ranges that leave a hole:
DPRE_0 = 3 (0 and 1)
DPR0_L = 0x00000000 DPR0_U = 0x80027FF0
DPR1_L = 0x80040000 DPR1_U = 0xFFFFFFFF
DPRE_0 = 3 (0 and 1)
DPR0_L = 0x00000000 DPR0_U = 0x80027FF0
DPR1_L = 0x80040000 DPR1_U = 0xFFFFFFFF
May 13, 2020
04:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 13, 2020
04:56 AM
UC_wrangler wrote:
No, there's no way to change the ranges to become not allowed instead of allowed. But you can achieve equivalent functionality by using two ranges that leave a hole:
DPRE_0 = 3 (0 and 1)
DPR0_L = 0x00000000 DPR0_U = 0x80027FF0
DPR1_L = 0x80040000 DPR1_U = 0xFFFFFFFF
Got it.
Was trying to see if I can use all the ranges and not "waste" 2 of them.
Thanks for the answer again!