File:  [XINU] / xinu / sys / qmapinit.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:02 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* qmapinit.c -- qmapinit */

#include <conf.h>
#include <kernel.h>
#include <qbus.h>
#include <mem.h>
#include <mach.h>

/*------------------------------------------------------------------------
 *  qmapinit -- initialize Microvax II qbus mapping registers
 *		warning: only 4 megs of memory are mapped for dma access
 *------------------------------------------------------------------------
 */

qmapinit()
{
	unsigned int	*pqmapreg;
       	unsigned int	i;

	if (! isUVAXII)
		return(SYSERR);
	*QMMECSR = 1;		/* enable parity error detection */
	for (pqmapreg = QMAP, i = 0; i < QMNMREG; )
		*pqmapreg++ = QMREGV | i++;
	*QMIPCR = QMENAB;	/* enable bus mapping	*/
	if ((int)maxaddr+sizeof(int)-1 > QMNMREG*PAGESIZE)
		kprintf("warning: dma only mapped for 1st %u bytes\n",
			QMNMREG*PAGESIZE);
	return(OK);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.