* Removes a 1MB page mapping from the kernel pmap. */
| 3566 | * Removes a 1MB page mapping from the kernel pmap. |
| 3567 | */ |
| 3568 | static void |
| 3569 | pmap_remove_kernel_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_offset_t va) |
| 3570 | { |
| 3571 | vm_page_t m; |
| 3572 | uint32_t pte1_idx; |
| 3573 | pt2_entry_t *fpte2p; |
| 3574 | vm_paddr_t pt2_pa; |
| 3575 | |
| 3576 | PMAP_LOCK_ASSERT(pmap, MA_OWNED); |
| 3577 | m = pmap_pt2_page(pmap, va); |
| 3578 | if (m == NULL) |
| 3579 | /* |
| 3580 | * QQQ: Is this function called only on promoted pte1? |
| 3581 | * We certainly do section mappings directly |
| 3582 | * (without promotion) in kernel !!! |
| 3583 | */ |
| 3584 | panic("%s: missing pt2 page", __func__); |
| 3585 | |
| 3586 | pte1_idx = pte1_index(va); |
| 3587 | |
| 3588 | /* |
| 3589 | * Initialize the L2 page table. |
| 3590 | */ |
| 3591 | fpte2p = page_pt2(pt2map_pt2pg(va), pte1_idx); |
| 3592 | pmap_clear_pt2(fpte2p); |
| 3593 | |
| 3594 | /* |
| 3595 | * Remove the mapping. |
| 3596 | */ |
| 3597 | pt2_pa = page_pt2pa(VM_PAGE_TO_PHYS(m), pte1_idx); |
| 3598 | pmap_kenter_pte1(va, PTE1_LINK(pt2_pa)); |
| 3599 | |
| 3600 | /* |
| 3601 | * QQQ: We do not need to invalidate PT2MAP mapping |
| 3602 | * as we did not change it. I.e. the L2 page table page |
| 3603 | * was and still is mapped the same way. |
| 3604 | */ |
| 3605 | } |
| 3606 | |
| 3607 | /* |
| 3608 | * Do the things to unmap a section in a process |
no test coverage detected