May 11, 2020
05:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 11, 2020
05:36 AM
Hello
I am using the memory protection system and have ran into an issue.
Say the program encounters a read/write violation, and thus activates the trap; is there a way to know what memory location caused the violation?
For code execution protection this is solved since the trap saves the last PC location in the a11 register. But I can't find how to get the address the code tried to read from/write to.
Example:
(Say I have PROTEN enabled and my memory protection policy does not allow the following)
Once I jump to the Trap (Class 1), How Can I get that [a10]0x38 value (or any value for that matter)?
Thanks.
I am using the memory protection system and have ran into an issue.
Say the program encounters a read/write violation, and thus activates the trap; is there a way to know what memory location caused the violation?
For code execution protection this is solved since the trap saves the last PC location in the a11 register. But I can't find how to get the address the code tried to read from/write to.
Example:
(Say I have PROTEN enabled and my memory protection policy does not allow the following)
ld.d e2, [a10]0x38
Once I jump to the Trap (Class 1), How Can I get that [a10]0x38 value (or any value for that matter)?
Thanks.
2 Replies
May 11, 2020
06:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 11, 2020
06:06 AM
Check DEADD:
Data Memory Protection Traps
Data memory protection traps (MPW, MPR, MPP, MPN) are raised by the memory protection system when a protection violation occurs.
Whenever a data memory protection trap occurs the DSTR (Data synchronous trap register) and the DEADD (Data Error Address Register) are updated.
May 11, 2020
06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 11, 2020
06:23 AM
UC_wrangler wrote:
Check DEADD:
Yes!
Thank you very much.
This widget could not be displayed.