Hi,
I am using 6638 K2K custom board. I am running different applications on different cores which use DDR3 for data. I need to enable memory protection so one core cannot access other cores data section. On an illegal access an exception should get raised and a hook function should get called. I used MPAX registers to protect a section of memory and I deny access to that memory section to the local processor. When the local processor tries to write to that section of memory, the data is not written into the memory, as expected, but no fault is raised. Here is what i have done:
index = 4 ;
mpaxh.segSize = 23 ;
mpaxh.bAddr = 0x90000;
CSL_XMC_setXMPAXH (index, &mpaxh);
mpaxl.ux = 0;
mpaxl.uw = 0;
mpaxl.ur = 0;
mpaxl.sx = 0;
mpaxl.sw = 0;
mpaxl.sr = 0;
xx = (0x810 + coreNum * 0x01) << 12 ;
mpaxl.rAddr = xx ;
CSL_XMC_setXMPAXL (index, &mpaxl);
I then try to write to memory 0x90000000, write fails but no exception is generated. I checked the FSR register and it shows 0x0.
Below is the cfg:
var MemoryProtect = xdc.useModule('ti.sysbios.family.c64p.MemoryProtect');
Exception.exceptionHook = "&My_ExceptionHandler";
Exception.internalHook = "&My_ExceptionHandler";
Exception.externalHook = "&My_ExceptionHandler";
Exception.nmiHook = "&My_ExceptionHandler";
Exception.returnHook = "&My_ExceptionHandler";
Exception.enableExternalMPC = true;
Exception.enablePrint = true;
When i try to access null pointer, my exception handler get executed properly.
Please assist on what i am missing.
Regards, Yunas