Xilinx / embeddedsw

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

Misplaced ifdef guard in xil_cache leads to endless loop #254

Open hellow554 opened 1 year ago

hellow554 commented 1 year ago

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?

anirudha1977 commented 1 year ago

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

regards

anirudha1977 commented 10 months ago

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

Will be available in 2023.2 builds.

regards, Anirudha