From 1e215e145a3f2ada51351571dcf5d2fd41756a78 Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Sat, 28 Jun 1980 17:43:17 -0800 Subject: [PATCH] date and time created 80/06/28 10:43:17 by bill SCCS-vsn: sys/vax/stand/uba.c 1.1 --- usr/src/sys/vax/stand/uba.c | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 usr/src/sys/vax/stand/uba.c diff --git a/usr/src/sys/vax/stand/uba.c b/usr/src/sys/vax/stand/uba.c new file mode 100644 index 0000000000..6763134eab --- /dev/null +++ b/usr/src/sys/vax/stand/uba.c @@ -0,0 +1,41 @@ +/* uba.c 1.1 %G% */ + +#include "../h/param.h" +#include "../h/inode.h" +#include "../h/pte.h" +#include "../h/uba.h" +#include "../h/vm.h" +#include "saio.h" + +ubasetup(io, bdp) +register struct iob *io; +{ + register int i; + int npf; + unsigned v; + register struct pte *pte; + int o, vaddr, temp; + + v = btop(io->i_ma); + o = (int)io->i_ma & PGOFSET; + npf = btoc(io->i_cc + o) +1; + pte = &(((struct uba_regs *)PHYSUBA0)->uba_map[0]); + temp = (bdp << 21) | MRV; + if (bdp && (o & 01)) + temp |= BO; + v &= 0x1fffff; /* drop to physical addr */ + while (--npf != 0) + *(int *)pte++ = v++ | temp; + *(int *)pte++ = 0; + return ((bdp << 28) | o); +} + +ubafree(mr) + int mr; +{ + register int bdp, reg, npf, a; + + bdp = (mr >> 28) & 0x0f; + if (bdp) + ((struct uba_regs *)PHYSUBA0)->uba_dpr[bdp] |= BNE; +} -- 2.20.1