MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dcache_inv_poc

Function dcache_inv_poc

freebsd/arm/include/cpu-v6.h:534–549  ·  view source on GitHub ↗

* Invalidate D-cache to PoC * * Caches are invalidated from outermost to innermost as fresh cachelines * flow in this direction. In given range, if there was no dirty cacheline * in any cache before, no stale cacheline should remain in them after this * operation finishes. */

Source from the content-addressed store, hash-verified

532 * operation finishes.
533 */
534static __inline void
535dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size)
536{
537 vm_offset_t eva = va + size;
538
539 dsb();
540 /* invalidate L2 first */
541 cpu_l2cache_inv_range(pa, size);
542
543 /* then L1 */
544 va &= ~cpuinfo.dcache_line_mask;
545 for ( ; va < eva; va += cpuinfo.dcache_line_size) {
546 _CP15_DCIMVAC(va);
547 }
548 dsb();
549}
550
551/*
552 * Discard D-cache lines to PoC, prior to overwrite by DMA engine.

Callers 2

dma_dcache_syncFunction · 0.85
bus_dmamap_syncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected