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

Function rt_aspace_map_phy_static

components/mm/mm_aspace.c:838–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838int rt_aspace_map_phy_static(rt_aspace_t aspace, rt_varea_t varea,
839 rt_mm_va_hint_t hint, rt_size_t attr,
840 rt_size_t pa_off, void **ret_va)
841{
842 int err;
843
844 if (varea && hint)
845 {
846 varea->start = hint->prefer;
847 varea->size = hint->map_size;
848 hint->flags |= (MMF_STATIC_ALLOC);
849 LOG_D("%s: start %p size %p phy at %p", __func__, varea->start, varea->size, pa_off << MM_PAGE_SHIFT);
850 err = _mm_aspace_map_phy(aspace, varea, hint, attr, pa_off, ret_va);
851 }
852 else
853 {
854 err = -RT_EINVAL;
855 }
856
857 return err;
858}
859
860int _aspace_unmap(rt_aspace_t aspace, void *addr)
861{

Callers 3

rt_hw_mmu_setupFunction · 0.85
rt_hw_mmu_setupFunction · 0.85
aspace_delete_tcFunction · 0.85

Calls 1

_mm_aspace_map_phyFunction · 0.85

Tested by 1

aspace_delete_tcFunction · 0.68