static m197_atc_initialized = FALSE;
static int m197_atc_initialized = FALSE;
pmap_map(vm_offset_t virt, vm_offset_t start, vm_offset_t end, vm_prot_t prot){	int		aprot;	unsigned	npages;	unsigned	num_phys_pages;	unsigned	cmode;	pt_entry_t	*pte;	pte_template_t	template;#ifdef MVME197	static m197_atc_initialized = FALSE;#endif	/*	 * cache mode is passed in the top 16 bits.	 * extract it from there. And clear the top	 * 16 bits from prot.	 */	cmode = (prot & 0xffff0000) >> 16;	prot &= 0x0000ffff;#ifdef DEBUG	if ((pmap_con_dbg & (CD_MAP | CD_NORM)) == (CD_MAP | CD_NORM))		printf ("(pmap_map :%x) phys address from %x to %x mapped at virtual %x, prot %x cmode %x\n",			curproc, start, end, virt, prot, cmode);#endif	if (start > end)		panic("pmap_map: start greater than end address");	aprot = m88k_protection (kernel_pmap, prot);	template.bits = trunc_page(start) | aprot | cmode | DT_VALID;	npages = atop(round_page(end) - trunc_page(start));	for (num_phys_pages = npages; num_phys_pages > 0; num_phys_pages--) {		if ((pte = pmap_pte(kernel_pmap, virt)) == PT_ENTRY_NULL)			if ((pte = pmap_expand_kmap(virt, VM_PROT_READ|VM_PROT_WRITE)) == PT_ENTRY_NULL)				panic ("pmap_map: Cannot allocate pte table");#ifdef DEBUG		if ((pmap_con_dbg & (CD_MAP | CD_FULL)) == (CD_MAP | CD_FULL))			if (pte->dtype)				printf("(pmap_map :%x) pte @ 0x%x already valid\n", curproc, (unsigned)pte);#endif		*pte = template.pte;#ifdef MVME197		/* hack for MVME197 */		if (cputyp == CPU_197 && m197_atc_initialized == FALSE) {			int i;			for (i = 0; i < 32; i++)				m197_load_patc(i, virt, 					       (vm_offset_t)template.bits, 1);			m197_atc_initialized = TRUE;		}#endif 		virt += PAGE_SIZE;		template.bits += PAGE_SIZE;	}	return (virt);} /* pmap_map() */