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

Function _load_mpr_area

components/mm/mm_page.c:1244–1265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1242}
1243
1244static int _load_mpr_area(void *head, void *tail)
1245{
1246 int err = 0;
1247 char *iter = (char *)((rt_ubase_t)head & ~ARCH_PAGE_MASK);
1248 tail = (void *)CEIL(tail, ARCH_PAGE_SIZE);
1249
1250 while (iter != tail)
1251 {
1252 void *paddr = rt_kmem_v2p(iter);
1253 if (paddr == ARCH_MAP_FAILED)
1254 {
1255 err = rt_aspace_load_page(&rt_kernel_space, iter, 1);
1256 if (err != RT_EOK)
1257 {
1258 LOG_E("%s: failed to load page", __func__);
1259 break;
1260 }
1261 }
1262 iter += ARCH_PAGE_SIZE;
1263 }
1264 return err;
1265}
1266
1267static int _get_mpr_ready_n_install(rt_ubase_t inst_head, rt_ubase_t inst_end)
1268{

Callers 1

_get_mpr_ready_n_installFunction · 0.85

Calls 2

rt_kmem_v2pFunction · 0.85
rt_aspace_load_pageFunction · 0.85

Tested by

no test coverage detected