MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_zero_page_area

Function pmap_zero_page_area

freebsd/arm/arm/pmap-v6.c:5888–5910  ·  view source on GitHub ↗

* pmap_zero_page_area zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. * * off and size may not cover an area beyond a single hardware page. */

Source from the content-addressed store, hash-verified

5886 * off and size may not cover an area beyond a single hardware page.
5887 */
5888void
5889pmap_zero_page_area(vm_page_t m, int off, int size)
5890{
5891 pt2_entry_t *cmap2_pte2p;
5892 struct pcpu *pc;
5893
5894 sched_pin();
5895 pc = get_pcpu();
5896 cmap2_pte2p = pc->pc_cmap2_pte2p;
5897 mtx_lock(&pc->pc_cmap_lock);
5898 if (pte2_load(cmap2_pte2p) != 0)
5899 panic("%s: CMAP2 busy", __func__);
5900 pte2_store(cmap2_pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW,
5901 vm_page_pte2_attr(m)));
5902 if (off == 0 && size == PAGE_SIZE)
5903 pagezero(pc->pc_cmap2_addr);
5904 else
5905 bzero(pc->pc_cmap2_addr + off, size);
5906 pte2_clear(cmap2_pte2p);
5907 tlb_flush((vm_offset_t)pc->pc_cmap2_addr);
5908 sched_unpin();
5909 mtx_unlock(&pc->pc_cmap_lock);
5910}
5911
5912/*
5913 * pmap_copy_page copies the specified (machine independent)

Callers 1

pmap_unwire_pt2_allFunction · 0.70

Calls 13

sched_pinFunction · 0.85
get_pcpuFunction · 0.85
pte2_loadFunction · 0.85
pte2_storeFunction · 0.85
vm_page_pte2_attrFunction · 0.85
bzeroFunction · 0.85
pte2_clearFunction · 0.85
tlb_flushFunction · 0.85
sched_unpinFunction · 0.85
pagezeroFunction · 0.70
mtx_lockFunction · 0.50
panicFunction · 0.50

Tested by

no test coverage detected