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

Function pl310_wb_range

freebsd/arm/arm/pl310.c:339–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339static void
340pl310_wb_range(vm_paddr_t start, vm_size_t size)
341{
342
343 if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
344 return;
345
346 PL310_LOCK(pl310_softc);
347 if (start & g_l2cache_align_mask) {
348 size += start & g_l2cache_align_mask;
349 start &= ~g_l2cache_align_mask;
350 }
351
352 if (size & g_l2cache_align_mask) {
353 size &= ~g_l2cache_align_mask;
354 size += g_l2cache_line_size;
355 }
356
357 while (size > 0) {
358 pl310_write4(pl310_softc, PL310_CLEAN_LINE_PA, start);
359 start += g_l2cache_line_size;
360 size -= g_l2cache_line_size;
361 }
362
363 pl310_cache_sync();
364 PL310_UNLOCK(pl310_softc);
365}
366
367static void
368pl310_inv_range(vm_paddr_t start, vm_size_t size)

Callers

nothing calls this directly

Calls 2

pl310_write4Function · 0.85
pl310_cache_syncFunction · 0.85

Tested by

no test coverage detected