MCF5206 privilege violation
‎11-22-2007
01:16 PM
1,242 Views
NE555
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I've encontered a strange problem when trying to change privilege level on a MCF5206e
Using the simple code below:
I'm not sure why this is happening, but the most likely awnser is that I'm forgeting something.
Can any one help me?
Thanks
Mário Isidoro
I've encontered a strange problem when trying to change privilege level on a MCF5206e
Using the simple code below:
Code:
move.l #PROCESS_STACK_TOP,d0 //PROCESS_STACK_TOP points to ram //full read,write and execute permissions move.l d0,SP move.l #0x00002700,d0 move d0,SR jsr test move.l #0x00000700,d0 move.w d0,SR //after the execution of the move.w move.l #1,d0 //all instructions generate a privilege move.l #1,d1 //violation add.l d1,d0 jsr test trap #15 test: rts
Can any one help me?
Thanks
Mário Isidoro
2 Replies
‎11-23-2007
04:04 PM
437 Views
taigbr
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mario,
maybe your ACR registers declare your program space to supervisor only
and since you changed SR to user every further access produces a
privilege violation.
Kind regards,
Georg
maybe your ACR registers declare your program space to supervisor only
and since you changed SR to user every further access produces a
privilege violation.
Kind regards,
Georg
‎11-24-2007
11:09 AM
437 Views
NE555
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I contacted Freescale technical support and they told me it was a problem with the bdm driver.
After recieving the reply, I tried putting the program in FLASH and running with no debug support, this made the problem go away.
This means it is not possible to use all the BDM capabilities to debug a program runing in user mode.
Mário Isidoro
After recieving the reply, I tried putting the program in FLASH and running with no debug support, this made the problem go away.
This means it is not possible to use all the BDM capabilities to debug a program runing in user mode.
Mário Isidoro