--- researchv9/sys/sun3/mem.c 2018/04/24 17:21:59 1.1 +++ researchv9/sys/sun3/mem.c 2018/04/24 17:30:22 1.1.1.2 @@ -318,3 +318,48 @@ fault: u.u_error = EFAULT; return; } + +/*ARGSUSED*/ +mmmmap(dev, off, prot) + dev_t dev; + off_t off; +{ + int pf; + + switch (minor(dev)) { + + case M_MEM: + pf = btop(off); + if (pf < physmem) + return (PGT_OBMEM | pf); + break; + + case M_VME16D16: + if (off >= VME16_SIZE) + break; + return (PGT_VME_D16 | btop(off + VME16_BASE)); + + case M_VME16D32: + if (off >= VME16_SIZE) + break; + return (PGT_VME_D32 | btop(off + VME16_BASE)); + + case M_VME24D16: + if (off >= VME24_SIZE) + break; + return (PGT_VME_D16 | btop(off + VME24_BASE)); + + case M_VME24D32: + if (off >= VME24_SIZE) + break; + return (PGT_VME_D32 | btop(off + VME24_BASE)); + + case M_VME32D16: + return (PGT_VME_D16 | btop(off)); + + case M_VME32D32: + return (PGT_VME_D32 | btop(off)); + + } + return (-1); +}