SCCS-vsn: sys/vax/mba/hp.c 4.17
SCCS-vsn: sys/vax/mba/mba.c 4.11
SCCS-vsn: sys/vax/vax/conf.c 4.21
SCCS-vsn: sys/vax/uba/uba.c 4.18
SCCS-vsn: sys/vax/uba/up.c 4.27
SCCS-vsn: sys/vax/vax/autoconf.c 4.19
SCCS-vsn: sys/vax/uba/rk.c 4.17
SCCS-vsn: sys/vm/vm_swap.c 4.3
-/* hp.c 4.16 81/02/27 */
+/* hp.c 4.17 81/02/28 */
#include "hp.h"
#if NHP > 0
#include "hp.h"
#if NHP > 0
while ((hpaddr->hpds & HP_DRY) == 0) /* shouldn't happen */
printf("hp dry not set\n");
while ((hpaddr->hpds & HP_DRY) == 0) /* shouldn't happen */
printf("hp dry not set\n");
- if (hpaddr->hpds & HP_ERR || mbasr & MBAEBITS)
- if (++mi->mi_tab.b_errcnt < 28 && (hpaddr->hper1&HP_WLE) == 0) {
+ if (hpaddr->hpds&HP_ERR || mbasr&MBAEBITS)
+ if (++mi->mi_tab.b_errcnt < 28 && (hpaddr->hper1&HP_WLE)==0) {
if ((hpaddr->hper1&0xffff) != HP_DCK) {
hpaddr->hpcs1 = HP_DCLR|HP_GO;
if ((mi->mi_tab.b_errcnt&07) == 4) {
if ((hpaddr->hper1&0xffff) != HP_DCK) {
hpaddr->hpcs1 = HP_DCLR|HP_GO;
if ((mi->mi_tab.b_errcnt&07) == 4) {
printf("%D ", bp->b_blkno + npf);
prdev("ECC", bp->b_dev);
mask = rp->hpec2&0xffff;
printf("%D ", bp->b_blkno + npf);
prdev("ECC", bp->b_dev);
mask = rp->hpec2&0xffff;
- if (mask == 0) {
- rp->hpof = HP_FMT22;
- return (0);
- }
i = (rp->hpec1&0xffff) - 1; /* -1 makes 0 origin */
bit = i&07;
i = (rp->hpec1&0xffff) - 1; /* -1 makes 0 origin */
bit = i&07;
-/* mba.c 4.10 81/02/26 */
+/* mba.c 4.11 81/02/28 */
#include "mba.h"
#if NMBA > 0
#include "mba.h"
#if NMBA > 0
#include "rk.h"
#if NHK > 0
#include "rk.h"
#if NHK > 0
-int rkflags,rkerrs; /* GROT */
/*
* RK11/RK07 disk driver
*
/*
* RK11/RK07 disk driver
*
} rk_softc[NHK];
/* THIS SHOULD BE READ OFF THE PACK, PER DRIVE */
} rk_softc[NHK];
/* THIS SHOULD BE READ OFF THE PACK, PER DRIVE */
daddr_t nblocks;
int cyloff;
} rk7_sizes[] ={
daddr_t nblocks;
int cyloff;
} rk7_sizes[] ={
u_short er = rkaddr->rker;
if (sc->sc_recal)
printf("recal CERR\n");
u_short er = rkaddr->rker;
if (sc->sc_recal)
printf("recal CERR\n");
#ifdef notdef
/* THIS ATTEMPTED TO FIND OUT IF THE DRIVE IS SPUN */
/* DOWN BUT IT DOESN'T SEEM TO WORK... THE DRIVE SEEMS TO */
#ifdef notdef
/* THIS ATTEMPTED TO FIND OUT IF THE DRIVE IS SPUN */
/* DOWN BUT IT DOESN'T SEEM TO WORK... THE DRIVE SEEMS TO */
ds&RKDS_HARD || er&RKER_HARD || cs2&RKCS2_HARD) {
bp->b_flags |= B_ERROR;
harderr(bp);
ds&RKDS_HARD || er&RKER_HARD || cs2&RKCS2_HARD) {
bp->b_flags |= B_ERROR;
harderr(bp);
- printf("rk%d cs2 %b ds %b er %b\n",
+ printf("rk%d cs2=%b ds=%b er=%b\n",
dkunit(bp), cs2, RKCS2_BITS, ds,
RKDS_BITS, er, RKER_BITS);
} else
dkunit(bp), cs2, RKCS2_BITS, ds,
RKDS_BITS, er, RKER_BITS);
} else
printf("%D ", bp->b_blkno+npf);
prdev("ECC", bp->b_dev);
mask = rk->rkec2;
printf("%D ", bp->b_blkno+npf);
prdev("ECC", bp->b_dev);
mask = rk->rkec2;
- if (mask == 0) {
- rk->rkatt = 0;
- return (0);
- }
ubapurge(um);
i = rk->rkec1 - 1; /* -1 makes 0 origin */
bit = i&07;
ubapurge(um);
i = rk->rkec1 - 1; /* -1 makes 0 origin */
bit = i&07;
#define DELAY(N) { register int d; d = N; while (--d > 0); }
#define DELAY(N) { register int d; d = N; while (--d > 0); }
o = (int)bp->b_un.b_addr & PGOFSET;
npf = btoc(bp->b_bcount + o) + 1;
a = spl6();
o = (int)bp->b_un.b_addr & PGOFSET;
npf = btoc(bp->b_bcount + o) + 1;
a = spl6();
- while ((reg = malloc(uh->uh_map, npf)) == 0) {
+ while ((reg = rmalloc(uh->uh_map, npf)) == 0) {
if (flags & UBA_CANTWAIT)
return (0);
uh->uh_mrwant++;
if (flags & UBA_CANTWAIT)
return (0);
uh->uh_mrwant++;
if (flags & UBA_NEEDBDP) {
while ((bdp = ffs(uh->uh_bdpfree)) == 0) {
if (flags & UBA_CANTWAIT) {
if (flags & UBA_NEEDBDP) {
while ((bdp = ffs(uh->uh_bdpfree)) == 0) {
if (flags & UBA_CANTWAIT) {
- mfree(uh->uh_map, npf, reg);
+ rmfree(uh->uh_map, npf, reg);
return (0);
}
uh->uh_bdpwant++;
return (0);
}
uh->uh_bdpwant++;
npf = (mr >> 18) & 0x3ff;
reg = ((mr >> 9) & 0x1ff) + 1;
s = spl6();
npf = (mr >> 18) & 0x3ff;
reg = ((mr >> 9) & 0x1ff) + 1;
s = spl6();
- mfree(uh->uh_map, npf, reg);
+ rmfree(uh->uh_map, npf, reg);
register struct uba_hd *uh;
register int uban;
register struct uba_hd *uh;
register int uban;
+ if (panicstr)
+ return;
for (uban = 0; uban < numuba; uban++) {
uh = &uba_hd[uban];
if (uh->uh_hangcnt)
for (uban = 0; uban < numuba; uban++) {
uh = &uba_hd[uban];
if (uh->uh_hangcnt)
-/* up.c 4.26 81/02/27 */
+/* up.c 4.27 81/02/28 */
#include "up.h"
#if NSC > 0
#include "up.h"
#if NSC > 0
- printf("up%d cs2 %b er1 %b er2 %b\n",
- dkunit(bp), upaddr->upcs2, UPCS2_BITS, upaddr->uper1,
- UPER1_BITS, upaddr->uper2, UPER2_BITS);
+ printf("up%d cs2=%b er1=%b er2=%b\n", dkunit(bp),
+ upaddr->upcs2, UPCS2_BITS,
+ upaddr->uper1, UPER1_BITS,
+ upaddr->uper2, UPER2_BITS);
bp->b_flags |= B_ERROR;
} else {
/*
bp->b_flags |= B_ERROR;
} else {
/*
printf("%D ", bp->b_blkno+npf);
prdev("ECC", bp->b_dev);
mask = up->upec2;
printf("%D ", bp->b_blkno+npf);
prdev("ECC", bp->b_dev);
mask = up->upec2;
- if (mask == 0) {
- up->upof = UP_FMT22; /* == RTC ???? */
- return (0);
- }
/*
* Flush the buffered data path, and compute the
* byte and bit position of the error. The variable i
/*
* Flush the buffered data path, and compute the
* byte and bit position of the error. The variable i
-/* autoconf.c 4.18 81/02/27 */
+/* autoconf.c 4.19 81/02/28 */
/*
* Configure the system for the current machine.
/*
* Configure the system for the current machine.
*/
uhp = &uba_hd[numuba];
uhp->uh_map = (struct map *)calloc(UAMSIZ * sizeof (struct map));
*/
uhp = &uba_hd[numuba];
uhp->uh_map = (struct map *)calloc(UAMSIZ * sizeof (struct map));
- mfree(uhp->uh_map, NUBMREG, 1);
+ rminit(uhp->uh_map, NUBMREG, 1, "uba", UAMSIZ);
switch (cpu) {
#if VAX780
case VAX_780:
switch (cpu) {
#if VAX780
case VAX_780:
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
int ttyopen(),ttread(),nullioctl(),ttstart();
char *ttwrite();
int ttyinput(),ttyrend();
int ttyopen(),ttread(),nullioctl(),ttstart();
char *ttwrite();
int ttyinput(),ttyrend();
+
+#include "bk.h"
+#if NBK > 0
int bkopen(),bkclose(),bkread(),bkinput(),bkioctl();
int bkopen(),bkclose(),bkread(),bkinput(),bkioctl();
int ntyopen(),ntyclose(),ntread();
char *ntwrite();
int ntyinput(),ntyrend();
int ntyopen(),ntyclose(),ntread();
char *ntwrite();
int ntyinput(),ntyrend();
{
ttyopen, nulldev, ttread, ttwrite, nullioctl,
ttyinput, ttyrend, nulldev, nulldev, nulldev, /* 0 */
{
ttyopen, nulldev, ttread, ttwrite, nullioctl,
ttyinput, ttyrend, nulldev, nulldev, nulldev, /* 0 */
bkopen, bkclose, bkread, ttwrite, bkioctl,
bkinput, nodev, nulldev, ttstart, nulldev, /* 1 */
bkopen, bkclose, bkread, ttwrite, bkioctl,
bkinput, nodev, nulldev, ttstart, nulldev, /* 1 */
+#else
+ nodev, nodev, nodev, nodev, nodev,
+ nodev, nodev, nodev, nodev, nodev,
+#endif
ntyopen, ntyclose, ntread, ntwrite, nullioctl,
ntyinput, ntyrend, nulldev, ttstart, nulldev, /* 2 */
mxopen, mxclose, mcread, mcwrite, mxioctl,
ntyopen, ntyclose, ntread, ntwrite, nullioctl,
ntyinput, ntyrend, nulldev, ttstart, nulldev, /* 2 */
mxopen, mxclose, mcread, mcwrite, mxioctl,
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
if (vsbase == 0) {
/*
* Can't free a block starting at 0 in the swapmap
if (vsbase == 0) {
/*
* Can't free a block starting at 0 in the swapmap
- * but need some space for argmap so use this
+ * but need some space for argmap so use 1/2 this
* hunk which needs special treatment anyways.
*/
argdev = swdevt[0].sw_dev;
* hunk which needs special treatment anyways.
*/
argdev = swdevt[0].sw_dev;
- mfree(argmap, blk-CLSIZE, vsbase+CLSIZE);
+ rminit(argmap, blk/2-CLSIZE, CLSIZE,
+ "argmap", ARGMAPSIZE);
+ /*
+ * First of all chunks... initialize the swapmap
+ * the second half of the hunk.
+ */
+ rminit(swapmap, blk/2, blk/2, "swap", nswapmap);
- mfree(swapmap, blk, vsbase);
+ rmfree(swapmap, blk, vsbase);