pmap_update(pmap_kernel());
mapdev(phys, virt, offset, size)	struct rom_reg *phys;	int offset, virt, size;{	vaddr_t va;	paddr_t pa;	void *ret;	static vaddr_t iobase;	unsigned int pmtype;	if (iobase == NULL)		iobase = IODEV_BASE;	size = round_page(size);	if (size == 0)		panic("mapdev: zero size");	if (virt)		va = trunc_page(virt);	else {		va = iobase;		iobase += size;		if (iobase > IODEV_END)	/* unlikely */			panic("mapiodev");	}	ret = (void *)(va | (((u_long)phys->rr_paddr + offset) & PGOFSET));			/* note: preserve page offset */	pa = trunc_page((vaddr_t)phys->rr_paddr + offset);	pmtype = PMAP_IOENC(phys->rr_iospace);	do {		pmap_kenter_pa(va, pa | pmtype | PMAP_NC,		    VM_PROT_READ | VM_PROT_WRITE);		va += PAGE_SIZE;		pa += PAGE_SIZE;	} while ((size -= PAGE_SIZE) > 0);	pmap_update(pmap_kernel());	return (ret);}