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

Function _init_map_2M

libcpu/aarch64/common/mmu.c:736–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736static int _init_map_2M(unsigned long *lv0_tbl, unsigned long va,
737 unsigned long pa, unsigned long count,
738 unsigned long attr)
739{
740 unsigned long i;
741 int ret;
742
743 if (va & ARCH_SECTION_MASK)
744 {
745 return -1;
746 }
747 if (pa & ARCH_SECTION_MASK)
748 {
749 return -1;
750 }
751 for (i = 0; i < count; i++)
752 {
753 ret = _map_single_page_2M(lv0_tbl, va, pa, attr, RT_FALSE);
754 va += ARCH_SECTION_SIZE;
755 pa += ARCH_SECTION_SIZE;
756 if (ret != 0)
757 {
758 return ret;
759 }
760 }
761 return 0;
762}
763
764static unsigned long *_query(rt_aspace_t aspace, void *vaddr, int *plvl_shf)
765{

Callers 1

rt_hw_mem_setup_earlyFunction · 0.85

Calls 1

_map_single_page_2MFunction · 0.85

Tested by

no test coverage detected