AnsweredAssumed Answered

Supervisor mode protection for DMEM

Question asked by Yixin Wu on Mar 15, 2017
Latest reply on Mar 22, 2017 by Yixin Wu

Hello community,

I want to use DMEM under supervisor mode by configuration of DMEMCTL1 and MPU as followed.

 

  asm("e_lis r3, 0xAAAA");
  asm("e_or2i r3, 0xAAAA");
  /* dcr 498: DMEMCTL1, all S/U access to 4 DMEM quadrants according to MPU */
  asm("mtdcr 498, r3");


  //DMEMSREC       0x5080C000 -0x5080FFFF          
  VALID|SELECTMPU|ENTRY4|SW|UXR|SXR,           //0xA0040700
  PID_ALL,              //0                           
  ADR_DMEMSREC_END,     //0x5080FFFF
  ADR_DMEMSREC_START    //0x5080C000

 

But I can still write in the address from 0x5080C000 to 0x5080FFFF, when I am in user mode. What have I done wrong?

Outcomes