Xilinx / embeddedsw

Xilinx Embedded Software (embeddedsw) Development
Other
885 stars 1.05k forks source link

Bug in function Xil_DCacheInvalidateRange when compiling with USE_AMP=1 (infinite loop) #262

Open motasSynth opened 10 months ago

motasSynth commented 10 months ago

Function "Xil_DCacheInvalidateRange" has an infinite loop possibility when USE_AMP=1 This has taken me days of head scratching with lock-ups on Core1 of Zynq device....

The offending lines are: while (tempadr < endaddr) {

ifndef USE_AMP

        /* Invalidate L2 cache line */
        *L2CCOffset = tempadr;
        Xil_L2CacheSync();
        tempadr += cacheline;

endif

    }

As you can see, if USE_AMP is 1 then while loop can possibly execute and never exit....

Just realised this was already spotted in issue #254

anirudha1977 commented 10 months ago

Hi, Sorry that we missed this earlier also, though we had promised to fix. The patch for this is being sent today. The fix will be there in 2023.2 release.

Thanks for reporting this.

regards, Anirudha