MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_mmu_unmap

Function rt_hw_mmu_unmap

libcpu/aarch64/common/mmu.c:349–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void rt_hw_mmu_unmap(rt_aspace_t aspace, void *v_addr, size_t size)
350{
351 // caller guarantee that v_addr & size are page aligned
352 size_t npages = size >> ARCH_PAGE_SHIFT;
353
354 if (!aspace->page_table)
355 {
356 return;
357 }
358
359 while (npages--)
360 {
361 MM_PGTBL_LOCK(aspace);
362 if (rt_hw_mmu_v2p(aspace, v_addr) != ARCH_MAP_FAILED)
363 _kenrel_unmap_4K(aspace->page_table, v_addr);
364 MM_PGTBL_UNLOCK(aspace);
365 v_addr = (char *)v_addr + ARCH_PAGE_SIZE;
366 }
367}
368
369#ifdef ARCH_USING_ASID
370/**

Callers

nothing calls this directly

Calls 2

rt_hw_mmu_v2pFunction · 0.70
_kenrel_unmap_4KFunction · 0.70

Tested by

no test coverage detected