This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sysbios memory protection exception

Other Parts Discussed in Thread: SYSBIOS

hello,

my sysbios is 6.32.05.54, and in my main() function, add the bellowing instructioins:


dwPerm = MemoryProtect_MPPA_LOCAL | MemoryProtect_MPPA_SR | MemoryProtect_MPPA_SX | MemoryProtect_MPPA_UR |          MemoryProtect_MPPA_UX;
  MemoryProtect_setPA((VOID*)0x10888000,(0x108e0000 - 0x10888000),dwPerm);

but when running the  MemoryProtect_setPA(), exception occurs:


Exception at 0x108c1498
EFR=0x40000000 NRP=0x108c1498
DMC Exception MPFAR=0x184a114 MPFSR=0x120
Supervisor Read violation, Fault ID=0x1
ti.sysbios.family.c64p.Ex[C66xx_1] ception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0xa079c560.
xdc.runtime.Error.raise: terminating execution

from the log, it is a supervisor read error when reading the 0x184a114, it seems a register, but dont find its defination and do not know why the error occur. and what is the DMC exception?

  • Hi Lin,

    I have moved your thread to TI-RTOS(BIOS) forum to appropriate response.

    Thanks. 

  • Hi Lin Feng1,

    Which hardware platform are you using?

    You can use the exception dump output (that you pasted above) from your console window to trace where the exception occurred.  Please refer to this SYS/BIOS FAQ for details.

    Also, I see in the ti.sysbios.family.c64p.MemoryProtect module documentation mentions that exceptions may occur:

    "Whenever setting the permission attributes of a memory range, the localCPU access field must be set, if the local CPU accesses the memory range. If the local field is not set, an exception is generated if the CPU tries to access the memory range.

    This module is to be used in correlation with the Exception module. When this module is in use, external exceptions are enabled by default. Any memory protection fault which arises generates an exception. This exception is processed and decoded by the Exception module."

    I think you are OK on the first case, since you're OR-ing in the MPPA_LOCAL flag in your call to setPA().  But, you may want to double check the second scenario.

    Lin Feng1 said:
    MemoryProtect_setPA((VOID*)0x10888000,(0x108e0000 - 0x10888000),dwPerm);

    Lastly, please double check your memory range.  It may be helpful to copy and paste your memory segments/ranges info (from your project's generated *.map file).

    Steve