Re: pmap_enter vs pmap_qenter

看板DFBSD_kernel作者時間15年前 (2011/01/12 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
:Hi, : :If I have a vm_page_t array, 'mp' for this exercise, should: : : pmap_qenter(addr, mp, npages); : :be equivalent to : : for (i = 0; i < npages; i += PAGE_SIZE) : pmap_enter(&kernel_pmap, addr + i, mp[i / PAGE_SIZE], VM_PROT_ALL, 1); : :if all of the pages in the array have had m->valid set to :VM_PAGE_BITS_ALL and vm_page_wire() called on them? : :Thanks, :-- vs Well, pmap_kenter() and pmap_qenter() are designed for the kernel_map only, whereas pmap_enter() is designed for user pmaps but happens to also work on the kernel_map. p.s. on that example my assumption is 'npages' is meant to be in bytes and not pages. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1DBGIL8e (DFBSD_kernel)
文章代碼(AID): #1DBGIL8e (DFBSD_kernel)