diff options
author | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-10-09 23:11:58 +0000 |
---|---|---|
committer | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-10-09 23:11:58 +0000 |
commit | be549a5de4c9bd14b798d181d6654b123f22c79e (patch) | |
tree | 851d24c277f9b1339b363a62f5cade7b1695da0d /sys/arch/vax/include | |
parent | a4344e6b151e74c9e64e9f4577dd0d46881a78cc (diff) |
code to get asc* (ncr 53c9x) working; most of this from netbsd
also, write the correct stuff in cpu_coredump (vm_machdep.c)
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r-- | sys/arch/vax/include/bus.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/reg.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/include/rpb.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/sgmap.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/vsbus.h | 26 |
5 files changed, 39 insertions, 10 deletions
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h index b012cae6449..37e0952eefc 100644 --- a/sys/arch/vax/include/bus.h +++ b/sys/arch/vax/include/bus.h @@ -1,5 +1,5 @@ -/* $OpenBSD: bus.h,v 1.1 2000/04/26 06:08:27 bjc Exp $ */ -/* $NetBSD: bus.h,v 1.11 2000/03/15 16:44:50 drochner Exp $ */ +/* $OpenBSD: bus.h,v 1.2 2000/10/09 23:11:56 bjc Exp $ */ +/* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -868,6 +868,7 @@ vax_mem_copy_region_4(t, h1, o1, h2, o2, c) #define BUS_DMA_BUS3 0x40 #define BUS_DMA_BUS4 0x80 +#define VAX_BUS_DMA_SPILLPAGE BUS_DMA_BUS1 /* VS4000 kludge */ /* * Private flags stored in the DMA map. */ diff --git a/sys/arch/vax/include/reg.h b/sys/arch/vax/include/reg.h index 2d0de80db20..b04552f8165 100644 --- a/sys/arch/vax/include/reg.h +++ b/sys/arch/vax/include/reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reg.h,v 1.2 1997/05/29 00:04:49 niklas Exp $ */ +/* $OpenBSD: reg.h,v 1.3 2000/10/09 23:11:57 bjc Exp $ */ /* $NetBSD: reg.h,v 1.3 1995/04/12 15:26:52 ragge Exp $ */ /* @@ -32,7 +32,9 @@ */ /* All bugs are subject to removal without further notice */ - + +#ifndef _VAX_REG_H_ +#define _VAX_REG_H_ struct reg { int r0; /* General registers saved upon trap/syscall */ @@ -54,3 +56,4 @@ struct reg { int psl; /* User psl */ }; +#endif /* _VAX_REG_H_ */ diff --git a/sys/arch/vax/include/rpb.h b/sys/arch/vax/include/rpb.h index 4ac82087cd8..cdd956d5d31 100644 --- a/sys/arch/vax/include/rpb.h +++ b/sys/arch/vax/include/rpb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rpb.h,v 1.6 2000/04/26 03:08:42 bjc Exp $ */ +/* $OpenBSD: rpb.h,v 1.7 2000/10/09 23:11:56 bjc Exp $ */ /* $NetBSD: rpb.h,v 1.6 1998/07/01 09:37:11 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. @@ -115,6 +115,7 @@ struct rpb { /* size description */ #define BDEV_RD 36 /* ST506/MFM disk on HDC9224 */ #define BDEV_ST 37 /* SCSI tape on NCR5380 */ #define BDEV_SD 42 /* SCSI disk on NCR5380 */ +#define BDEV_SDN 46 /* SCSI disk on NCR5394 */ #define BDEV_CNSL 64 #define BDEV_QE 96 #define BDEV_DE 97 @@ -125,5 +126,5 @@ struct rpb { /* size description */ #define BDEV_NET BDEV_QE /* first network BDEV */ #ifdef _KERNEL -extern struct rpb rpb; +extern struct rpb *rpb; #endif diff --git a/sys/arch/vax/include/sgmap.h b/sys/arch/vax/include/sgmap.h index 87db65d9831..1bc50eac082 100644 --- a/sys/arch/vax/include/sgmap.h +++ b/sys/arch/vax/include/sgmap.h @@ -1,5 +1,5 @@ -/* $OpenBSD: sgmap.h,v 1.2 2000/04/27 00:54:02 bjc Exp $ */ -/* $NetBSD: sgmap.h,v 1.1 1999/06/06 18:58:50 ragge Exp $ */ +/* $OpenBSD: sgmap.h,v 1.3 2000/10/09 23:11:57 bjc Exp $ */ +/* $NetBSD: sgmap.h,v 1.3 2000/05/17 21:22:18 matt Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -60,6 +60,8 @@ struct vax_sgmap { bus_addr_t aps_sgvabase; /* base of the sgva space */ bus_size_t aps_sgvasize; /* size of the sgva space */ bus_addr_t aps_pa; /* Address in region */ + unsigned int aps_flags; /* flags */ +#define SGMAP_KA49 0x01 /* KA49 SGMAP is weird */ }; void vax_sgmap_init __P((bus_dma_tag_t, struct vax_sgmap *, diff --git a/sys/arch/vax/include/vsbus.h b/sys/arch/vax/include/vsbus.h index 664d45bab5d..1c0eb6af228 100644 --- a/sys/arch/vax/include/vsbus.h +++ b/sys/arch/vax/include/vsbus.h @@ -1,5 +1,5 @@ -/* $OpenBSD: vsbus.h,v 1.4 2000/04/27 07:19:57 bjc Exp $ */ -/* $NetBSD: vsbus.h,v 1.9 1999/10/22 21:10:13 ragge Exp $ */ +/* $OpenBSD: vsbus.h,v 1.5 2000/10/09 23:11:57 bjc Exp $ */ +/* $NetBSD: vsbus.h,v 1.13 2000/06/25 16:00:46 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -42,6 +42,7 @@ #define _VAX_VSBUS_H_ #include <machine/bus.h> +#include <machine/sgmap.h> struct vsbus_softc { struct device sc_dev; @@ -52,6 +53,18 @@ struct vsbus_softc { u_char *sc_intclr; /* Clear interrupt register */ u_char *sc_intreq; /* Interrupt request register */ u_char sc_mask; /* Interrupts to enable after autoconf */ + vaddr_t sc_vsregs; /* Where the VS_REGS are mapped */ + vaddr_t sc_dmaaddr; /* Mass storage virtual DMA area */ + vsize_t sc_dmasize; /* Size of the DMA area */ + + struct vax_bus_dma_tag sc_dmatag; + struct vax_sgmap sc_sgmap; +}; + +struct vsbus_dma { + SIMPLEQ_ENTRY(vsbus_dma) vd_q; + void (*vd_go)(void *); + void *vd_arg; }; struct confargs { @@ -104,6 +117,9 @@ struct vsbus_attach_args { short va_br; /* Interrupt level */ short va_cvec; /* Interrupt vector address */ u_char va_maskno; /* Interrupt vector in mask */ + vaddr_t va_dmaaddr; /* DMA area address */ + vsize_t va_dmasize; /* DMA area size */ + bus_space_tag_t va_iot; bus_dma_tag_t va_dmat; struct confargs *confargs; }; @@ -120,15 +136,21 @@ struct vsbus_attach_args { #define NI_BASE 0x200e0000 /* LANCE CSRs */ #define NI_IOSIZE (128 * VAX_NBPG) /* IO address size */ +#define KA49_SCSIMAP 0x27000000 /* KA49 SCSI SGMAP */ /* * Small monochrome graphics framebuffer, present on all machines. */ #define SMADDR 0x30000000 #define SMSIZE 0x20000 /* Actually 256k, only 128k used */ +#ifdef _KERNEL +void vsbus_dma_init __P((struct vsbus_softc *, unsigned ptecnt)); u_char vsbus_setmask __P((unsigned char)); void vsbus_clrintr __P((unsigned char)); void vsbus_intr __P((void *)); void vsbus_copytoproc __P((struct proc *, caddr_t, caddr_t, int)); void vsbus_copyfromproc __P((struct proc *, caddr_t, caddr_t, int)); +void vsbus_dma_start __P((struct vsbus_dma *)); +void vsbus_dma_intr __P((void)); +#endif #endif /* _VAX_VSBUS_H_ */ |