panic("sramva %x: SRAM not free", sramva);
panic("sramva %lx: SRAM not free", sramva);
cpu_startup(){	caddr_t v;	int sz, i;	vsize_t size;	int base, residual;	vaddr_t minaddr, maxaddr, uarea_pages;	/*	 * Initialize error message buffer (at end of core).	 * avail_end was pre-decremented in mvme_bootstrap() to compensate.	 */	for (i = 0; i < btoc(MSGBUFSIZE); i++)		pmap_kenter_pa((paddr_t)msgbufp + i * NBPG,		    avail_end + i * NBPG, VM_PROT_READ | VM_PROT_WRITE);	pmap_update(pmap_kernel());	initmsgbuf((caddr_t)msgbufp, round_page(MSGBUFSIZE));	/*	 * Good {morning,afternoon,evening,night}.	 */	printf(version);	identifycpu();	printf("real mem  = %d\n", ctob(physmem));	/*	 * Find out how much space we need, allocate it,	 * and then give everything true virtual addresses.	 */	sz = (int)allocsys((caddr_t)0);	if ((v = (caddr_t)uvm_km_zalloc(kernel_map, round_page(sz))) == 0)		panic("startup: no room for tables");	if (allocsys(v) - v != sz)		panic("startup: table size inconsistency");	/*	 * Grab UADDR virtual address	 */	uarea_pages = UADDR;	uvm_map(kernel_map, (vaddr_t *)&uarea_pages, USPACE,	    NULL, UVM_UNKNOWN_OFFSET, 0,	      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,	        UVM_ADV_NORMAL, 0));	if (uarea_pages != UADDR)		panic("uarea_pages %x: UADDR not free", uarea_pages);	/*	 * Grab machine dependent memory spaces	 */	switch (brdtyp) {#ifdef MVME187	case BRD_187:		/*		 * Grab the SRAM space that we hardwired in pmap_bootstrap		 */		sramva = SRAM_START;		uvm_map(kernel_map, (vaddr_t *)&sramva, SRAM_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (sramva != SRAM_START)			panic("sramva %x: SRAM not free", sramva);		/*		 * Grab the BUGROM space that we hardwired in pmap_bootstrap		 */		bugromva = BUG187_START;		uvm_map(kernel_map, (vaddr_t *)&bugromva, BUG187_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (bugromva != BUG187_START)			panic("bugromva %x: BUGROM not free", bugromva);		/*		 * Grab the OBIO space that we hardwired in pmap_bootstrap		 */		obiova = OBIO_START;		uvm_map(kernel_map, (vaddr_t *)&obiova, OBIO_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (obiova != OBIO_START)			panic("obiova %x: OBIO not free", obiova);		break;#endif#ifdef MVME197	case BRD_197:		/*		 * Grab the FLASH space that we hardwired in pmap_bootstrap		 */		flashva = FLASH_START;		uvm_map(kernel_map, (vaddr_t *)&flashva, FLASH_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (flashva != FLASH_START)			panic("flashva %x: FLASH not free", flashva);		/*		 * Grab the OBIO space that we hardwired in pmap_bootstrap		 */		obiova = OBIO_START;		uvm_map(kernel_map, (vaddr_t *)&obiova, OBIO_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (obiova != OBIO_START)			panic("obiova %x: OBIO not free", obiova);		break;#endif#ifdef MVME188	case BRD_188:		/*		 * Grab the UTIL space that we hardwired in pmap_bootstrap		 */		utilva = MVME188_UTILITY;		uvm_map(kernel_map, (vaddr_t *)&utilva, MVME188_UTILITY_SIZE,		    NULL, UVM_UNKNOWN_OFFSET, 0,		      UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,		        UVM_ADV_NORMAL, 0));		if (utilva != MVME188_UTILITY)			panic("utilva %x: UTILITY area not free", utilva);		break;#endif	}	/*	 * Now allocate buffers proper.  They are different than the above	 * in that they usually occupy more virtual memory than physical.	 */	size = MAXBSIZE * nbuf;	if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size),	    NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_NONE,	      UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)))		panic("cpu_startup: cannot allocate VM for buffers");	minaddr = (vaddr_t)buffers;	if ((bufpages / nbuf) >= btoc(MAXBSIZE)) {		/* don't want to alloc more physical mem than needed */		bufpages = btoc(MAXBSIZE) * nbuf;	}	base = bufpages / nbuf;	residual = bufpages % nbuf;	for (i = 0; i < nbuf; i++) {		vsize_t curbufsize;		vaddr_t curbuf;		struct vm_page *pg;		/*		 * Each buffer has MAXBSIZE bytes of VM space allocated.  Of		 * that MAXBSIZE space, we allocate and map (base+1) pages		 * for the first "residual" buffers, and then we allocate		 * "base" pages for the rest.		 */		curbuf = (vaddr_t)buffers + (i * MAXBSIZE);		curbufsize = PAGE_SIZE * ((i < residual) ? (base+1) : base);		while (curbufsize) {			pg = uvm_pagealloc(NULL, 0, NULL, 0);			if (pg == NULL)				panic("cpu_startup: not enough memory for "				      "buffer cache");			pmap_kenter_pa(curbuf, VM_PAGE_TO_PHYS(pg),			    VM_PROT_READ | VM_PROT_WRITE);			curbuf += PAGE_SIZE;			curbufsize -= PAGE_SIZE;		}	}	pmap_update(pmap_kernel());	/*	 * Allocate a submap for exec arguments.  This map effectively	 * limits the number of processes exec'ing at any time.	 */	exec_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,	    16 * NCARGS, VM_MAP_PAGEABLE, FALSE, NULL);	/*	 * Allocate map for physio.	 */	phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,	    VM_PHYS_SIZE, 0, FALSE, NULL);	/*	 * Allocate map for external I/O.	 */	iomap_map = uvm_km_suballoc(kernel_map, &iomapbase, &maxaddr,	    IOMAP_SIZE, 0, FALSE, NULL);	iomap_extent = extent_create("iomap", iomapbase,	    iomapbase + IOMAP_SIZE, M_DEVBUF, NULL, 0, EX_NOWAIT);	if (iomap_extent == NULL)		panic("unable to allocate extent for iomap");	printf("avail mem = %ld (%ld pages)\n", ptoa(uvmexp.free), uvmexp.free);	printf("using %d buffers containing %d bytes of memory\n", nbuf,	    bufpages * PAGE_SIZE);	/*	 * Set up buffers, so they can be used to read disk labels.	 */	bufinit();	/*	 * zero out intr_handlers	 */	bzero((void *)intr_handlers, 256 * sizeof(struct intrhand *));	setupiackvectors();	/*	 * Configure the system.	 */	if (boothowto & RB_CONFIG) {#ifdef BOOT_CONFIG		user_config();#else		printf("kernel does not support -c; continuing..\n");#endif	}}