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.

TMS320C6657: Security violation, Local L1/L2 cache memory Fault

Part Number: TMS320C6657


Hi, 

We have a product based on C6657, and we are getting "Security violation, Local L1/L2 cache memory Fault" exception.

Our system process 2 video streams, each core processes a video from each camera.

  • Usually one core gets the exception but the other core keeps running.
  • The 2 cores share the exact same code, but each has its own data segment.
  • We have tried a few different versions of software, but all had the issue. The ones I use now are: SYS/BIOS  6.40.04.47 + XDCtool 3.30.4.52 + TI Compiler 8.2.2.
  • If we use "--opt_for_space=3", then it runs much longer.
  • If we disable MemoryProtection in config then it runs much longer -- this could be a workaround but it is the last option.

Can you please tell me what can be causing the exception? 

Is this because the core tried to access  0xd46b40 (which is in the reserved space) so cache controller tried to cache the memory?

Do you have any suggestions how to debug this? 

Here is the assembly code around the PC (0x800bd782) just in case:

......... ...
2357                s32 j = rr*(rect->wide>>1) + (_cc>>1);
800bd688:   02030001            SPMASK        M2
800bd68c:   098E6C83 || ^       MPY.M2        B19,B3,B19
800bd690:   0316CBA6 ||         LDNDW.D2T2    *+B5(B22),B7:B6
2385                    sumi += _dotpu4(pval,0x01010101);
800bd694:   037ECBA4            LDNDW.D2T1    *+B31(B22),A7:A6
800bd698:   096881B2            DOTPU4.M2     B4,B26,B18
2357                s32 j = rr*(rect->wide>>1) + (_cc>>1);
800bd69c:   00070001            SPMASK        L1
800bd6a0:   0E4EB079 || ^       ADD.L1X       A21,B19,A28
800bd6a4:   0E9081B2 ||         DOTPU4.M2     B4,B4,B29
2385                    sumi += _dotpu4(pval,0x01010101);
800bd6a8:   08E901B3            DOTPU4.M2     B8,B26,B17
800bd6ac:   0910B1B0 ||         DOTPU4.M1X    A5,B4,A18
2361                sumi = sumi2 = sumim = 0;
800bd6b0:   002B0001            SPMASK        L2,S2
800bd6b4:   0C00002B || ^       MVK.S2        0x0000,B24
800bd6b8:   0D80A35B || ^       MVK.L2        0,B27
800bd6bc:   042091B1 ||         DOTPU4.M1X    A4,B8,A8
800bd6c0:   04A101B2 ||         DOTPU4.M2     B8,B8,B9
800bd6c4:   AF67                SPMASK        L1,S1,S2,D2
800bd6c6:   0292     || ^       MVK.S1        0,A21
800bd6c8:   0C00A359 || ^       MVK.L1        0,A24
800bd6cc:   0393     || ^       MVK.S2        0,B23
800bd6ce:   19F7     || ^       MVK.D2        0,B19
800bd6d0:   039A11B1 ||         DOTPU4.M1X    A16,B6,A7
800bd6d4:   0F18E37B ||         PACKLH2.L2    B7,B6,B30
800bd6d8:   0E18C1B2 ||         DOTPU4.M2     B6,B6,B28
800bd6dc:   E14800CC            .fphead       n, h, W, BU, nobr, nosat, 0001010b
2385                    sumi += _dotpu4(pval,0x01010101);
800bd6e0:   0498C1B1            DOTPU4.M1     A6,A6,A9
800bd6e4:   0368C1B3 ||         DOTPU4.M2     B6,B26,B6
800bd6e8:   0210A37A ||         PACKLH2.L2    B5,B4,B4
2386                    sumim += _dotpu4(pval, mval);
800bd6ec:   02C4C1B1            DOTPU4.M1     A6,A17,A5
800bd6f0:   0421237B ||         PACKLH2.L2    B9,B8,B8
800bd6f4:   086BC1B2 ||         DOTPU4.M2     B30,B26,B16
2385                    sumi += _dotpu4(pval,0x01010101);
800bd6f8:   02E8D1B1            DOTPU4.M1X    A6,B26,A5
800bd6fc:   0E1081B3 ||         DOTPU4.M2     B4,B4,B28
800bd700:   0318E378 ||         PACKLH2.L1    A7,A6,A6
2389                    sumia += _dotpu4(pvala,0x01010101);
800bd704:   04FA11B1            DOTPU4.M1X    A16,B30,A9
800bd708:   03E881B2 ||         DOTPU4.M2     B4,B26,B7
2390                    sumima += _dotpu4(pvala, mval);
800bd70c:   0310B1B1            DOTPU4.M1X    A5,B4,A6
800bd710:   042101B2 ||         DOTPU4.M2     B8,B8,B8
2386                    sumim += _dotpu4(pval, mval);
800bd714:   0227907B            ADD.L2X       B28,A9,B4
800bd718:   0394E079 ||         ADD.L1        A7,A5,A7
800bd71c:   01C4C1B1 ||         DOTPU4.M1     A6,A17,A3
800bd720:   046901B2 ||         DOTPU4.M2     B8,B26,B8
800bd724:   0413A07B            ADD.L2        B29,B4,B8
800bd728:   021E4079 ||         ADD.L1        A18,A7,A4
800bd72c:   03A091B1 ||         DOTPU4.M1X    A4,B8,A7
800bd730:   089B51B2 ||         DOTPU4.M2X    B26,A6,B17
800bd734:   032121E3            ADD.S2        B9,B8,B6
800bd738:   02110079 ||         ADD.L1        A8,A4,A4
800bd73c:   0418C1B1 ||         DOTPU4.M1     A6,A6,A8
800bd740:   08FBC1B3 ||         DOTPU4.M2     B30,B30,B17
800bd744:   0494D07A ||         ADD.L2X       B6,A5,B9
800bd748:   0A92A079            ADD.L1        A21,A4,A21
800bd74c:   0B9AE07B ||         ADD.L2        B23,B6,B23
800bd750:   032361E3 ||         ADD.S2        B27,B8,B6
800bd754:   04C92842 ||         ADD.D2        B18,B9,B9
800bd758:   0970C07B            ADD.L2        B6,B28,B18
800bd75c:   031D01E3 ||         ADD.S2        B8,B7,B6
800bd760:   03C52843 ||         ADD.D2        B17,B9,B7
800bd764:   048D2078 ||         ADD.L1        A9,A3,A9
800bd768:   0318E079            ADD.L1        A7,A6,A6
800bd76c:   099A607B ||         ADD.L2        B19,B6,B19
800bd770:   0C1F01E3 ||         ADD.S2        B24,B7,B24
800bd774:   00B7     ||         ADD.D2        B16,B17,B16
800bd776:   6031                ADD.L2        B19,B16,B19
800bd778:   091B0079 ||         ADD.L1        A24,A6,A18
800bd77c:   E4080800            .fphead       n, h, W, BU, nobr, nosat, 0100000b
800bd780:   409B                ADD.S2        B18,B17,B17
800bd782:   1C66                SPKERNEL      0,0
800bd784:   0C264079 ||         ADD.L1        A18,A9,A24
800bd788:   0DA231E2 ||         ADD.S2X       B17,A8,B27
2477                  surf[j+i] = normi;
800bd78c:   0BF181E1            ADD.S1        A12,A28,A23
800bd790:   0A800042 ||         MVK.D2        0,B21

Thanks,
tamo2