summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2023-03-30 16:10:23 -0500
committerJoel Sherrill <joel@rtems.org>2023-04-05 08:21:18 -0500
commit4667eca6e3018959ec94289590112d49906b558d (patch)
tree75498ec5356e4dd4421842b9d4233b8e6b8c5d86
parentrtemslwip/xil_shims: Avoid hang in IRQ context (diff)
downloadrtems-lwip-4667eca6e3018959ec94289590112d49906b558d.tar.bz2
rtemslwip/xil_shims: Perform flush with invalidate
Xilinx wrote their A53 HAL with the assumption that the CPU did not support cache invalidation without a flush, so the flush and invalidation functions were combined and all range invalidations are promoted to flush/invalidate. The implementation written for lwIP was written to the original intent of the function and thus was not flushing in some cases when it needed to. This resolves that issue which prevents DMA transmit errors in some cases.
-rw-r--r--rtemslwip/zynqmp/xil_shims.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rtemslwip/zynqmp/xil_shims.c b/rtemslwip/zynqmp/xil_shims.c
index 2eda0c5..1b1b3cf 100644
--- a/rtemslwip/zynqmp/xil_shims.c
+++ b/rtemslwip/zynqmp/xil_shims.c
@@ -102,7 +102,12 @@ void XScuGic_DisableIntr ( u32 DistBaseAddress, u32 Int_Id )
rtems_interrupt_vector_disable( Int_Id );
}
+/*
+ * The Xilinx code was written such that it assumed there was no invalidate-only
+ * functionality on A53 cores. This function must flush and invalidate because
+ * of how they mapped things.
+ */
void Xil_DCacheInvalidateRange( INTPTR adr, INTPTR len )
{
- rtems_cache_invalidate_multiple_data_lines( (const void *) adr, len );
+ rtems_cache_flush_multiple_data_lines( (const void *) adr, len );
}