|
|
1.1 ! root 1: /* qmapinit.c -- qmapinit */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <qbus.h> ! 6: #include <mem.h> ! 7: #include <mach.h> ! 8: ! 9: /*------------------------------------------------------------------------ ! 10: * qmapinit -- initialize Microvax II qbus mapping registers ! 11: * warning: only 4 megs of memory are mapped for dma access ! 12: *------------------------------------------------------------------------ ! 13: */ ! 14: ! 15: qmapinit() ! 16: { ! 17: unsigned int *pqmapreg; ! 18: unsigned int i; ! 19: ! 20: if (! isUVAXII) ! 21: return(SYSERR); ! 22: *QMMECSR = 1; /* enable parity error detection */ ! 23: for (pqmapreg = QMAP, i = 0; i < QMNMREG; ) ! 24: *pqmapreg++ = QMREGV | i++; ! 25: *QMIPCR = QMENAB; /* enable bus mapping */ ! 26: if ((int)maxaddr+sizeof(int)-1 > QMNMREG*PAGESIZE) ! 27: kprintf("warning: dma only mapped for 1st %u bytes\n", ! 28: QMNMREG*PAGESIZE); ! 29: return(OK); ! 30: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.