* Add a list of wired pages to the kva * this routine is only used for temporary * kernel mappings that do not need to have * page modification or references recorded. * Note that old mappings are simply written * over. The page *must* be wired. * Note: SMP coherent. Uses a ranged shootdown IPI. */
| 1563 | * Note: SMP coherent. Uses a ranged shootdown IPI. |
| 1564 | */ |
| 1565 | void |
| 1566 | pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) |
| 1567 | { |
| 1568 | pd_entry_t *pde; |
| 1569 | pt_entry_t *pte, pa; |
| 1570 | vm_offset_t va; |
| 1571 | vm_page_t m; |
| 1572 | int i, lvl; |
| 1573 | |
| 1574 | va = sva; |
| 1575 | for (i = 0; i < count; i++) { |
| 1576 | pde = pmap_pde(kernel_pmap, va, &lvl); |
| 1577 | KASSERT(pde != NULL, |
| 1578 | ("pmap_qenter: Invalid page entry, va: 0x%lx", va)); |
| 1579 | KASSERT(lvl == 2, |
| 1580 | ("pmap_qenter: Invalid level %d", lvl)); |
| 1581 | |
| 1582 | m = ma[i]; |
| 1583 | pa = VM_PAGE_TO_PHYS(m) | ATTR_DEFAULT | |
| 1584 | ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_XN | |
| 1585 | ATTR_S1_IDX(m->md.pv_memattr) | L3_PAGE; |
| 1586 | pte = pmap_l2_to_l3(pde, va); |
| 1587 | pmap_load_store(pte, pa); |
| 1588 | |
| 1589 | va += L3_SIZE; |
| 1590 | } |
| 1591 | pmap_invalidate_range(kernel_pmap, sva, va); |
| 1592 | } |
| 1593 | |
| 1594 | /* |
| 1595 | * This routine tears out page mappings from the |
nothing calls this directly
no test coverage detected