* Copyright (c) 1988 Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
* @(#)bi.c 7.4 (Berkeley) %G%
* VAXBI specific routines.
#include "../include/cpu.h"
#include "../include/mtpr.h"
#include "../vax/nexus.h"
register struct biiregs
*bi
;
bi
->bi_csr
|= BICSR_NRST
;
* Reset with self test. Return true iff reset fails.
* BEWARE, THIS RESETS THE BI ARBITRATION LEVEL TO ARB_NONE
* does self test ever cause a bi bus error?
register struct biiregs
*bi
;
bi
->bi_csr
|= BICSR_ARB_NONE
; /* why? */
bi
->bi_csr
|= BICSR_STS
| BICSR_INIT
;/* must this be separate? */
while (bi
->bi_csr
& BICSR_BROKE
) {
if (todr() > timo
) /* reset failed */
return (0); /* reset OK */
* THIS SHOULD PROBABLY WORK MORE LIKE ubaerror()
* (but then we would need to be able to reset BI nodes)
* (we need a per-BI-device driver structure!)
register struct bi_node
*bi
;
printf("vaxbi%d: bus error\n", binum
);
bi
= (struct bi_node
*) &nexus
[binum
* NNODEBI
];/* XXX */
for (node
= 0; node
< 16; node
++, bi
++) {
if ((bi_nodes
& (1 << node
)) == 0) /* XXX crude */
printf("node %x: ber=%b\n", node
, bi
->biic
.bi_ber
, BIBER_BITS
);