From d9c788fee1c23021ad49a100e88362e67cba2bfa Mon Sep 17 00:00:00 2001 From: CSRG Date: Thu, 7 Sep 1989 18:53:08 -0800 Subject: [PATCH] BSD 4_3_Tahoe development Work on file usr/src/sys/GENERIC/ioconf.c Work on file usr/src/sys/GENERIC/hd.h Work on file usr/src/sys/GENERIC/vbglue.s Synthesized-from: CSRG/cd2/4.3tahoe --- usr/src/sys/GENERIC/hd.h | 2 + usr/src/sys/GENERIC/ioconf.c | 79 ++++++++++++++ usr/src/sys/GENERIC/vbglue.s | 194 +++++++++++++++++++++++++++++++++++ 3 files changed, 275 insertions(+) create mode 100644 usr/src/sys/GENERIC/hd.h create mode 100644 usr/src/sys/GENERIC/ioconf.c create mode 100644 usr/src/sys/GENERIC/vbglue.s diff --git a/usr/src/sys/GENERIC/hd.h b/usr/src/sys/GENERIC/hd.h new file mode 100644 index 0000000000..4bf66c44cc --- /dev/null +++ b/usr/src/sys/GENERIC/hd.h @@ -0,0 +1,2 @@ +#define NHD 12 +#define NHDC 3 diff --git a/usr/src/sys/GENERIC/ioconf.c b/usr/src/sys/GENERIC/ioconf.c new file mode 100644 index 0000000000..5e536281cc --- /dev/null +++ b/usr/src/sys/GENERIC/ioconf.c @@ -0,0 +1,79 @@ +#include "../h/param.h" +#include "../machine/pte.h" +#include "../h/buf.h" +#include "../h/map.h" + +#include "../tahoevba/vbavar.h" + +#define C (caddr_t) + +extern struct vba_driver hdcdriver; +extern Xhdintr0(); +int (*hdcint0[])() = { Xhdintr0, 0 } ; +extern struct vba_driver hdcdriver; +extern Xhdintr1(); +int (*hdcint1[])() = { Xhdintr1, 0 } ; +extern struct vba_driver hdcdriver; +extern Xhdintr2(); +int (*hdcint2[])() = { Xhdintr2, 0 } ; +extern struct vba_driver vddriver; +extern Xvdintr0(); +int (*vdint0[])() = { Xvdintr0, 0 } ; +extern struct vba_driver vddriver; +extern Xvdintr1(); +int (*vdint1[])() = { Xvdintr1, 0 } ; +extern struct vba_driver vddriver; +extern Xvdintr2(); +int (*vdint2[])() = { Xvdintr2, 0 } ; +extern struct vba_driver vxdriver; +extern Xvackint0(), Xvcmdrsp0(), Xvunsol0(); +int (*vxint0[])() = { Xvackint0, Xvcmdrsp0, Xvunsol0, 0 } ; +extern struct vba_driver vxdriver; +extern Xvackint1(), Xvcmdrsp1(), Xvunsol1(); +int (*vxint1[])() = { Xvackint1, Xvcmdrsp1, Xvunsol1, 0 } ; +extern struct vba_driver exdriver; +extern Xexintr0(); +int (*exint0[])() = { Xexintr0, 0 } ; + +struct vba_ctlr vbminit[] = { +/* driver, ctlr, vbanum, alive, intr, addr */ + { &hdcdriver, 0, '?', 0, hdcint0, C 0xc4010000 }, + { &hdcdriver, 1, '?', 0, hdcint1, C 0xc5010000 }, + { &hdcdriver, 2, '?', 0, hdcint2, C 0xc6010000 }, + { &vddriver, 0, '?', 0, vdint0, C 0xffff2000 }, + { &vddriver, 1, '?', 0, vdint1, C 0xffff2100 }, + { &vddriver, 2, '?', 0, vdint2, C 0xffff2200 }, + 0 +}; + +struct vba_device vbdinit[] = { + /* driver, unit, ctlr, vbanum, slave, intr, addr, dk, flags*/ + { &hdcdriver, 0, 0, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 1, 0, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 2, 0, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 3, 0, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 4, 1, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 5, 1, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 6, 1, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 7, 1, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 8, 2, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 9, 2, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 10, 2, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &hdcdriver, 11, 2, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 0, 0, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 1, 0, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 2, 0, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 3, 0, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 4, 1, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 5, 1, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 6, 1, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 7, 1, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 8, 2, '?', 0, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 9, 2, '?', 1, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 10, 2, '?', 2, 0, C 0x0 , 1, 0x0 }, + { &vddriver, 11, 2, '?', 3, 0, C 0x0 , 1, 0x0 }, + { &vxdriver, 0, -1, '?', -1, vxint0, C 0xcd020000, 0, 0x0 }, + { &vxdriver, 1, -1, '?', -1, vxint1, C 0xce020000, 0, 0x0 }, + { &exdriver, 0, -1, '?', -1, exint0, C 0xfff00000, 0, 0x0 }, + 0 +}; diff --git a/usr/src/sys/GENERIC/vbglue.s b/usr/src/sys/GENERIC/vbglue.s new file mode 100644 index 0000000000..ed1e91eba2 --- /dev/null +++ b/usr/src/sys/GENERIC/vbglue.s @@ -0,0 +1,194 @@ +SCBVEC(hdintr0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*0) + pushl $0 + callf $8,_hdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(hdintr1): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*1) + pushl $1 + callf $8,_hdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(hdintr2): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*2) + pushl $2 + callf $8,_hdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vdintr0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*3) + pushl $0 + callf $8,_vdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vdintr1): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*4) + pushl $1 + callf $8,_vdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vdintr2): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*5) + pushl $2 + callf $8,_vdintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vackint0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*6) + pushl $0 + callf $8,_vackint + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vcmdrsp0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*7) + pushl $0 + callf $8,_vcmdrsp + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vunsol0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*8) + pushl $0 + callf $8,_vunsol + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vackint1): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*9) + pushl $1 + callf $8,_vackint + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vcmdrsp1): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*10) + pushl $1 + callf $8,_vcmdrsp + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(vunsol1): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*11) + pushl $1 + callf $8,_vunsol + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + +SCBVEC(exintr0): + CHECK_SFE(4) + SAVE_FPSTAT(4) + PUSHR + incl _fltintrcnt+(4*12) + pushl $0 + callf $8,_exintr + incl _cnt+V_INTR + POPR + REST_FPSTAT + rei + + + .globl _intrnames + + .globl _eintrnames + .data +_intrnames: + .asciz "clock" + .asciz "cnr" + .asciz "cnx" + .asciz "rmtr" + .asciz "rmtx" + .asciz "buserr" + .asciz "hd0" + .asciz "hd1" + .asciz "hd2" + .asciz "vd0" + .asciz "vd1" + .asciz "vd2" + .asciz "vack0" + .asciz "vcmdrsp0" + .asciz "vunsol0" + .asciz "vack1" + .asciz "vcmdrsp1" + .asciz "vunsol1" + .asciz "ex0" +_eintrnames: + + .globl _intrcnt + + .globl _eintrcnt + .align 2 +_intrcnt: + .space 4 * 6 +_fltintrcnt: + .space 4 * 13 +_eintrcnt: + + .text -- 2.20.1