embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

Misplaced ifdef guard in xil_cache leads to endless loop

Open hellow554 opened this issue 1 year ago • 2 comments

https://github.com/Xilinx/embeddedsw/blob/8fca1ac929453ba06613b5417141483b4c2d8cf3/lib/bsp/standalone/src/arm/cortexa9/xil_cache.c#L352-L359

there is the #ifdef USE_AMP inside the while loop which means, that it is an endless loop. My suggestion would be to include the while "header" inside the #ifdef guard as well.

#ifndef USE_AMP
while (tempadr < endaddr) {
    /* Invalidate L2 cache line */
    *L2CCOffset = tempadr;
    Xil_L2CacheSync();
    tempadr += cacheline;
}
#endif

Would that be correct?

hellow554 avatar Jun 22 '23 06:06 hellow554

Hi, Thanks for reporting out on this. Looks like a bug. We will get this fixed soon In our next release.

regards

anirudha1977 avatar Jun 22 '23 06:06 anirudha1977

Hi, Sorry for the delay. The patch for this is being sent out today.

Will be available in 2023.2 builds.

regards, Anirudha

anirudha1977 avatar Aug 22 '23 07:08 anirudha1977