* Reusing of KVA used in pmap_zero_page function !!! */
| 6613 | * Reusing of KVA used in pmap_zero_page function !!! |
| 6614 | */ |
| 6615 | static void |
| 6616 | pmap_zero_page_check(vm_page_t m) |
| 6617 | { |
| 6618 | pt2_entry_t *cmap2_pte2p; |
| 6619 | uint32_t *p, *end; |
| 6620 | struct pcpu *pc; |
| 6621 | |
| 6622 | sched_pin(); |
| 6623 | pc = get_pcpu(); |
| 6624 | cmap2_pte2p = pc->pc_cmap2_pte2p; |
| 6625 | mtx_lock(&pc->pc_cmap_lock); |
| 6626 | if (pte2_load(cmap2_pte2p) != 0) |
| 6627 | panic("%s: CMAP2 busy", __func__); |
| 6628 | pte2_store(cmap2_pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, |
| 6629 | vm_page_pte2_attr(m))); |
| 6630 | end = (uint32_t*)(pc->pc_cmap2_addr + PAGE_SIZE); |
| 6631 | for (p = (uint32_t*)pc->pc_cmap2_addr; p < end; p++) |
| 6632 | if (*p != 0) |
| 6633 | panic("%s: page %p not zero, va: %p", __func__, m, |
| 6634 | pc->pc_cmap2_addr); |
| 6635 | pte2_clear(cmap2_pte2p); |
| 6636 | tlb_flush((vm_offset_t)pc->pc_cmap2_addr); |
| 6637 | sched_unpin(); |
| 6638 | mtx_unlock(&pc->pc_cmap_lock); |
| 6639 | } |
| 6640 | |
| 6641 | int |
| 6642 | pmap_pid_dump(int pid) |
no test coverage detected