On Feb 2, 2010, at 10:06 AM, Masao Uebayashi wrote: > I need to add zero-page to support XIP. Unallocated blocks are redirected > to this. Basically it's a static simgle page filled with zero. > > void *pmap_zeropage; > paddr_t pmap_zeropage_phys_addr; > > and initialized by pmap.c like: > > pmap_zeropage = (void *)uvm_pageboot_alloc(PAGE_SIZE); > pmap_zeropage_phys_addr = MIPS_KSEG0_TO_PHYS(pmap_zeropage); > > Because it's used publically (from the coming custome genfs_getpages()), it's > defined somewhere like uvm_page.h.
This can be done completely within UVM. Simply allocate a pool page and fill it with zeroes.