MCF5206 privilege violation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCF5206 privilege violation

1,094件の閲覧回数
NE555
Contributor I
Hi

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
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
 


ラベル(1)
0 件の賞賛
2 返答(返信)

289件の閲覧回数
taigbr
Contributor I
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

0 件の賞賛

289件の閲覧回数
NE555
Contributor I
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
0 件の賞賛