diff options
author | imp <imp@cvs.openbsd.org> | 1996-11-28 19:25:25 +0000 |
---|---|---|
committer | imp <imp@cvs.openbsd.org> | 1996-11-28 19:25:25 +0000 |
commit | 3680a743187f263031184a9989e0754bf5e1ab17 (patch) | |
tree | 135971eddc5f315feb538bc68243533904f079f8 | |
parent | c7ecef45f9da8d0878b07ad3f6a78653767db4f0 (diff) |
Add special case code for the rPC44. The DMA buffers on this machine
are not cache coherent, so for the moment use uncached addresses for
all buffer access. In the future, more specific cache flushing should
be done.
rPC44 now boots into multi user off SCSI disk or the network, builds
its own kernel and seems to be making its way toward finishing a make
build.
Correct -Wall complaint when BTDEBUG defined while I'm here.
-rw-r--r-- | sys/arch/arc/dti/btl.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/arch/arc/dti/btl.c b/sys/arch/arc/dti/btl.c index ad43b29d4aa..512d33079b9 100644 --- a/sys/arch/arc/dti/btl.c +++ b/sys/arch/arc/dti/btl.c @@ -102,8 +102,10 @@ struct bt_mbx { extern int cputype; /* XXX */ -#define KVTOPHYS(x) (((int)(x) & 0x7fffff) | 0x800000) -#define PHYSTOKV(x) (((int)(x) & 0x7fffff) | (cputype == DESKSTATION_TYNE ? TYNE_V_BOUNCE : 0)) +#define KVTOPHYS(x) ((cputype == DESKSTATION_TYNE) ? \ + (((int)(x) & 0x7fffff) | 0x800000) : ((int)(x))) +#define PHYSTOKV(x) ((cputype == DESKSTATION_TYNE) ? \ + (((int)(x) & 0x7fffff) | TYNE_V_BOUNCE) : ((int)(x))) #include "aha.h" #include "btl.h" @@ -165,6 +167,10 @@ struct scsi_adapter bt_switch = { 0, }; +/* XXX static buffer as a kludge. DMA isn't cache coherent on the rpc44, so + * we always use uncached buffers for DMA. */ +static char rpc44_buffer[ TYNE_S_BOUNCE ]; + /* the below structure is so we have a default dev struct for out link struct */ struct scsi_device bt_dev = { NULL, /* Use default error handler */ @@ -388,8 +394,9 @@ btattach(parent, self, aux) bouncesize = TYNE_S_BOUNCE; } else { bouncesize = TYNE_S_BOUNCE; /* Good enough? XXX */ - bouncebase = (u_int) malloc( bouncesize, M_DEVBUF, M_NOWAIT); - } +/* bouncebase = (u_int) malloc( bouncesize, M_DEVBUF, M_NOWAIT);*/ + bouncebase = (u_int) rpc44_buffer | 0xa0000000; + } bouncearea = bouncebase + sizeof(struct bt_mbx); sc->sc_mbx = (struct bt_mbx *)bouncebase; @@ -476,7 +483,7 @@ AGAIN: #ifdef BTDEBUG if (bt_debug) { - u_char *cp = &ccb->scsi_cmd; + u_char *cp = (u_char *) &ccb->scsi_cmd; printf("op=%x %x %x %x %x %x\n", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); printf("stat %x for mbi addr = 0x%08x, ", |