diff options
author | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-06-10 14:19:04 +0000 |
---|---|---|
committer | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-06-10 14:19:04 +0000 |
commit | d78c3e0c4b3482bcc998de4d120c74e31c5728c5 (patch) | |
tree | 754f54a7fa91cec3cf438faf03da90ac55300610 /sys/arch/pmax | |
parent | c1f2151f781958b5795a8828cd42b912f0e0f197 (diff) |
update the pmax specific stuff to NetBSD-current as of about 970608 - some
cosmetic things will follow together with an update to an exact NETBSD_CU-
RRENT_xxxxxx level
Diffstat (limited to 'sys/arch/pmax')
33 files changed, 406 insertions, 139 deletions
diff --git a/sys/arch/pmax/conf/GENERIC b/sys/arch/pmax/conf/GENERIC index 81bfbb09280..45e2635e89d 100644 --- a/sys/arch/pmax/conf/GENERIC +++ b/sys/arch/pmax/conf/GENERIC @@ -91,21 +91,21 @@ le0 at tc? # decstation 5000/200 baseboard le* at tc? # other lance network interfaces # ioasic standard baseboard options (5000/2x, 5000/1xx, 5000/2[46]0) ioasic0 at tc? -clock0 at ioasic? # rtc -asc0 at ioasic? # system scsi subslot -scc0 at ioasic? -le0 at ioasic? # tc onboard lance -scc1 at ioasic? # not present on maxine +clock0 at ioasic? offset? # rtc +asc0 at ioasic? offset? # system scsi subslot +scc0 at ioasic? offset? +le0 at ioasic? offset? # tc onboard lance +scc1 at ioasic? offset? # not present on maxine # MAXINE-only ioasic baseboard devices and on-baseboard "options" xcfb0 at tc? # tc framebuffer "option" -dtop0 at ioasic0 # destop bus, lk501 kbd, mouse +dtop0 at ioasic0 offset? # destop bus, lk501 kbd, mouse # 5000/200-only (aka 3MAX aka KN02) baseboard devices (tc but no ioasic) clock0 at mainbus0 # rtc dc0 at mainbus0 le0 at tc? # tc ether "option" on baseboard asc0 at tc? # tc scsi "option" on baseboard # for now, pretend this machine has an ioasic -dc0 at ioasic? # dc7083 four-port dz device +dc0 at ioasic? offset? # dc7083 four-port dz device # 2100/3100-only (aka PMAX aka KN01) baseboard devices. clock0 at mainbus0 # rtc pm0 at mainbus0 # 3100 onboard fb diff --git a/sys/arch/pmax/conf/files.pmax b/sys/arch/pmax/conf/files.pmax index ee0be79a7bc..aff778ff3fa 100644 --- a/sys/arch/pmax/conf/files.pmax +++ b/sys/arch/pmax/conf/files.pmax @@ -42,7 +42,7 @@ file dev/tc/tc.c tc needs-flag # The TurboChannel IOCTL ASIC. Present on IOASIC machines, # which is all turbochannel machines ever built except the 3MAX (5000/200). # -device ioasic { } #{ } # not really optional +device ioasic { offset = -1 } # not really optional attach ioasic at tc file arch/pmax/tc/asic.c ioasic | dc_ds # TTTTT dc_ds is ugly @@ -104,11 +104,11 @@ file arch/pmax/dev/rz.c rz needs-count # DC7085 (DZ-like four-port serial device) on mainbus on non-IOASIC machines. # For the 3MAX (aka kn02 aka 5k/200) pretend that it's on an ASIC. device dc -file arch/pmax/dev/dc.c dc needs-flag +file arch/pmax/dev/dc.c dc attach dc at ioasic with dc_ioasic -file arch/pmax/dev/dc_ioasic.c dc_ioasic | dc_ds # TTTTT ugly +file arch/pmax/dev/dc_ioasic.c dc_ioasic | dc_ds needs-flag # TTTTT ugly attach dc at mainbus with dc_ds -file arch/pmax/dev/dc_ds.c dc_ds +file arch/pmax/dev/dc_ds.c dc_ds needs-flag # The "desktop bus" on the MAXINE (5k/25). What is it, anyway? ADB? @@ -135,7 +135,7 @@ device pm file arch/pmax/dev/pm.c pm needs-flag file arch/pmax/dev/bt478.c pm attach pm at mainbus with pm_ds -file arch/pmax/dev/pm_ds.c dc_ds +file arch/pmax/dev/pm_ds.c pm_ds ######################################################################## # Turbochannel options. @@ -156,7 +156,7 @@ file arch/pmax/dev/mfb.c mfb needs-flag # Zilog 8350/Intel 82350(?) SCC UART. device scc attach scc at ioasic -file arch/pmax/tc/scc.c scc needs-count +file arch/pmax/tc/scc.c scc needs-flag # MAXINE onboard framebuffer device xcfb diff --git a/sys/arch/pmax/dev/dcvar.h b/sys/arch/pmax/dev/dcvar.h index d9aad4033a3..954b4c9ef7e 100644 --- a/sys/arch/pmax/dev/dcvar.h +++ b/sys/arch/pmax/dev/dcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dcvar.h,v 1.3 1996/09/25 20:48:57 jonathan Exp $ */ +/* $NetBSD: dcvar.h,v 1.4 1997/05/28 14:21:39 jonathan Exp $ */ /* * External declarations from DECstation dc serial driver. @@ -37,7 +37,14 @@ int dcintr __P((void * xxxunit)); extern int dcGetc __P ((dev_t dev)); extern int dcparam __P((register struct tty *tp, register struct termios *t)); extern void dcPutc __P((dev_t dev, int c)); -void dc_consinit __P((dev_t dev, dcregs *dcaddr)); + +struct dc7085regs; +void dc_consinit __P((dev_t dev, volatile struct dc7085regs *dcaddr)); + +/* QVSS-compatible in-kernel X input event parser, pointer tracker */ +void (*dcDivertXInput) __P((int cc)); /* X windows keyboard input routine */ +void (*dcMouseEvent) __P((int)); /* X windows mouse motion event routine */ +void (*dcMouseButtons) __P((int)); /* X windows mouse buttons event routine */ #endif /* _DCVAR_H */ #endif /* _KERNEL */ diff --git a/sys/arch/pmax/dev/device.h b/sys/arch/pmax/dev/device.h index 0d122f5ff7b..819ddd1e4df 100644 --- a/sys/arch/pmax/dev/device.h +++ b/sys/arch/pmax/dev/device.h @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.11 1996/10/01 01:04:50 jonathan Exp $ */ +/* $NetBSD: device.h,v 1.12 1997/01/31 02:00:56 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,6 +45,7 @@ * different types of controllers. */ struct ScsiCmd; +struct device; struct pmax_driver { char *d_name; /* device driver name (e.g., "rz") */ @@ -88,6 +89,7 @@ struct pmax_scsi_device { int sd_flags; /* flags */ int sd_alive; /* true if init routine succeeded */ + struct device *sd_devp; /* new config glue kludge */ }; /* Define special unit types used by the config program */ diff --git a/sys/arch/pmax/dev/dtop.c b/sys/arch/pmax/dev/dtop.c index df0e35c2021..784f03ddea2 100644 --- a/sys/arch/pmax/dev/dtop.c +++ b/sys/arch/pmax/dev/dtop.c @@ -1,4 +1,4 @@ -/* $NetBSD: dtop.c,v 1.20 1996/10/13 13:13:55 jonathan Exp $ */ +/* $NetBSD: dtop.c,v 1.23 1997/05/25 04:58:36 jonathan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -93,8 +93,6 @@ SOFTWARE. ********************************************************/ -#include "dtop.h" -#if NDTOP > 0 #include <sys/param.h> #include <sys/systm.h> #include <sys/ioctl.h> @@ -115,8 +113,11 @@ SOFTWARE. #include <dev/cons.h> #include <pmax/cpuregs.h> /* mips cached->uncached */ +#include <machine/dc7085cons.h> /* mdmctl bits same on dtop and dc? */ #include <machine/pmioctl.h> -#include <machine/dc7085cons.h> +#include <machine/fbio.h> +#include <machine/fbvar.h> +#include <pmax/dev/fbreg.h> #include <pmax/pmax/asic.h> #include <pmax/pmax/maxine.h> @@ -128,12 +129,6 @@ SOFTWARE. #include <pmax/dev/lk201var.h> #include <pmax/dev/dtopvar.h> -#include <machine/fbio.h> -#include <machine/fbvar.h> -#include <pmax/dev/fbreg.h> - -extern int pmax_boardtype; - #define DTOP_MAX_POLL 0x7fff /* about half a sec */ @@ -160,7 +155,8 @@ struct dtop_softc { short bad_pkts; struct dtop_ds { - int (*handler)(); + int (*handler) + __P((dtop_device_t, dtop_message_t, int, int)); dtop_device status; } device[(DTOP_ADDR_DEFAULT - DTOP_ADDR_FIRST) >> 1]; @@ -184,13 +180,6 @@ int dtop_keyboard_handler __P((dtop_device_t, dtop_message_t, int, int)); int dtopparam __P((struct tty *, struct termios *)); void dtopstart __P((struct tty *)); -void dtopKBDPutc __P((dev_t, int)); -int dtopKBDGetc __P((dev_t)); - - -void (*dtopDivertXInput)(); /* X windows keyboard input routine */ -void (*dtopMouseEvent)(); /* X windows mouse motion event routine */ -void (*dtopMouseButtons)(); /* X windows mouse buttons event routine */ /* @@ -940,4 +929,3 @@ dtop_keyboard_repeat(arg) dev->keyboard.k_ar_state = K_AR_IDLE; splx(s); } -#endif diff --git a/sys/arch/pmax/dev/dtopvar.h b/sys/arch/pmax/dev/dtopvar.h index 0f47e91c284..587e35a18c8 100644 --- a/sys/arch/pmax/dev/dtopvar.h +++ b/sys/arch/pmax/dev/dtopvar.h @@ -1,7 +1,53 @@ +/* $NetBSD: dtopvar.h,v 1.2 1997/05/25 04:50:00 jonathan Exp $ */ + +/* + * Copyright (c) 1997 Jonathan Stone. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Jonathan Stone for + * the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + int dtopKBDGetc __P((dev_t dev)); void dtopKBDPutc __P((dev_t dev, int c)); /* + * Support for UGLY 4.4bsd/pmax-derived console/X11 input redirection + * to in-kernel input-event queue. + */ + +/* X11 keyboard input upcall */ +void (*dtopDivertXInput) __P((int)); + +/* X11 mouse motion event upcall */ +void (*dtopMouseEvent) __P((MouseReport *mrp)); + +/* X11 mouse buttons event upcall */ +void (*dtopMouseButtons) __P((MouseReport *mrp)); + +/* * Device numbers. */ #define DTOPKBD_PORT 0 diff --git a/sys/arch/pmax/dev/fb.c b/sys/arch/pmax/dev/fb.c index 78819923641..0f0bfcc15cb 100644 --- a/sys/arch/pmax/dev/fb.c +++ b/sys/arch/pmax/dev/fb.c @@ -1,4 +1,4 @@ -/* $NetBSD: fb.c,v 1.18 1996/10/14 04:55:26 jonathan Exp $ */ +/* $NetBSD: fb.c,v 1.19 1997/05/24 08:19:50 jonathan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -100,7 +100,8 @@ #include "rasterconsole.h" -#include "dc.h" +#include "dc_ioasic.h" +#include "dc_ds.h" #include "scc.h" #include "dtop.h" @@ -122,7 +123,7 @@ extern int pmax_boardtype; extern void fbScreenInit __P (( struct fbinfo *fi)); -#if NDC > 0 +#if (NDC_DS > 0) || (NDC_IOASIC > 0) #include <machine/dc7085cons.h> #include <pmax/dev/dcvar.h> #endif @@ -271,13 +272,13 @@ tb_kbdmouseconfig(fi) switch (pmax_boardtype) { -#if NDC > 0 +#if (NDC_DS > 0) || (NDC_IOASIC > 0) case DS_PMAX: case DS_3MAX: fi->fi_glasstty->KBDPutc = dcPutc; fi->fi_glasstty->kbddev = makedev(DCDEV, DCKBD_PORT); break; -#endif /* NDC */ +#endif /* NDC_DS || NDC_IOASIC */ #if NSCC > 0 case DS_3MIN: diff --git a/sys/arch/pmax/dev/fb_usrreq.c b/sys/arch/pmax/dev/fb_usrreq.c index 9b01185eb50..b183c32c742 100644 --- a/sys/arch/pmax/dev/fb_usrreq.c +++ b/sys/arch/pmax/dev/fb_usrreq.c @@ -183,11 +183,11 @@ fbioctl(dev, cmd, data, flag, p) break; case FBIOGVIDEO: - *(int *)data = fi->fi_blanked; + *(int *)data = (fi->fi_blanked) ? FBVIDEO_OFF: FBVIDEO_ON; break; case FBIOSVIDEO: - if (*(int *)data) + if (*(int *)data == FBVIDEO_OFF) return (*(fi->fi_driver->fbd_blank)) (fi); else return (*(fi->fi_driver->fbd_unblank)) (fi); diff --git a/sys/arch/pmax/dev/lk201.c b/sys/arch/pmax/dev/lk201.c index 6a792aecf58..08b62a312e2 100644 --- a/sys/arch/pmax/dev/lk201.c +++ b/sys/arch/pmax/dev/lk201.c @@ -1,3 +1,5 @@ +/* $NetBSD: lk201.c,v 1.6 1997/05/25 05:26:00 jonathan Exp $ */ + /* * The LK201 keycode mapping routine is here, along with initialization * functions for the keyboard and mouse. @@ -321,8 +323,6 @@ LKgetc(dev) { register int c; - extern sccGetc(); - #if 0 /*XXX*/ printf("LK-201 getc 0x%x( [%d %d]) in_dev [%d %d]\n", raw_kbd_getc, diff --git a/sys/arch/pmax/dev/mfb.c b/sys/arch/pmax/dev/mfb.c index 1fb35093fbe..baa74cdb61a 100644 --- a/sys/arch/pmax/dev/mfb.c +++ b/sys/arch/pmax/dev/mfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfb.c,v 1.20 1996/10/13 13:13:59 jonathan Exp $ */ +/* $NetBSD: mfb.c,v 1.23 1997/04/19 08:25:31 jonathan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -202,7 +202,7 @@ void mfbattach __P((struct device *, struct device *, void *)); int mfb_intr __P((void *sc)); struct cfattach mfb_ca = { - sizeof(struct device), mfbmatch, mfbattach + sizeof(struct fbinfo), mfbmatch, mfbattach }; struct cfdriver mfb_cd = { @@ -308,13 +308,13 @@ mfbinit(fi, mfbaddr, unit, silent) fi->fi_base = (caddr_t)(mfbaddr + MFB_OFFSET_BT431); fi->fi_vdac = (caddr_t)(mfbaddr + MFB_OFFSET_BT455); fi->fi_size = (fi->fi_pixels + MFB_FB_SIZE) - fi->fi_base; - fi->fi_linebytes = 1280; + fi->fi_linebytes = 2048; /* inter-line stride (blitting) */ fi->fi_driver = &mfb_driver; fi->fi_blanked = 0; /* Fill in Frame Buffer Type struct. */ fi->fi_type.fb_boardtype = PMAX_FBTYPE_MFB; - fi->fi_type.fb_width = 1280; + fi->fi_type.fb_width = 1280; /* visible screen pixels */ fi->fi_type.fb_height = 1024; fi->fi_type.fb_depth = 8; fi->fi_type.fb_cmsize = 0; @@ -479,6 +479,7 @@ mfbPosCursor(fi, x, y) { bt431_regmap_t *regs = (bt431_regmap_t *)(fi -> fi_base); +#ifdef MELLON if (y < 0) y = 0; else if (y > fi -> fi_type.fb_width - fi -> fi_cursor.width - 1) @@ -488,6 +489,15 @@ mfbPosCursor(fi, x, y) else if (x > fi -> fi_type.fb_height - fi -> fi_cursor.height - 1) x = fi -> fi_type.fb_height - fi -> fi_cursor.height - 1; +#else /* old-style pmax glass tty */ + if (y < fi->fi_fbu->scrInfo.min_cur_y || + y > fi->fi_fbu->scrInfo.max_cur_y) + y = fi->fi_fbu->scrInfo.max_cur_y; + if (x < fi->fi_fbu->scrInfo.min_cur_x || + x > fi->fi_fbu->scrInfo.max_cur_x) + x = fi->fi_fbu->scrInfo.max_cur_x; +#endif /* old-style pmax glass tty */ + fi -> fi_cursor.x = x; fi -> fi_cursor.y = y; @@ -521,6 +531,8 @@ mfbInitColorMapBlack(fi, blackpix) u_char rgb [3]; register int i; + blackpix = 1; /* XXX XXX XXX defeat screensave bug */ + if (blackpix) rgb [0] = rgb [1] = rgb [2] = 0xff; else @@ -688,7 +700,7 @@ bt455_video_off(fi) mfbRestoreCursorColor (fi); bcopy (cursor_save, cursor_RGB, 6); - fi -> fi_blanked = 0; + fi -> fi_blanked = 1; return 0; } diff --git a/sys/arch/pmax/dev/mfbvar.h b/sys/arch/pmax/dev/mfbvar.h index 9ba98ecbe5a..112d2701f2e 100644 --- a/sys/arch/pmax/dev/mfbvar.h +++ b/sys/arch/pmax/dev/mfbvar.h @@ -1,8 +1,8 @@ -/* $NetBSD: mfbvar.h,v 1.1 1996/09/21 03:06:37 jonathan Exp $ */ +/* $NetBSD: mfbvar.h,v 1.2 1997/05/24 09:15:49 jonathan Exp $ */ /* * Initialize a Turbochannel MFB 1280x1024x1 2-d framebuffer, * so it can be used as a bitmapped glass-tty console device. */ extern int -mcfbinit __P((struct fbinfo *fi, caddr_t base, int unit, int silent)); +mfbinit __P((struct fbinfo *fi, caddr_t base, int unit, int silent)); diff --git a/sys/arch/pmax/dev/pm_ds.c b/sys/arch/pmax/dev/pm_ds.c index a1619140ba2..8435563d59d 100644 --- a/sys/arch/pmax/dev/pm_ds.c +++ b/sys/arch/pmax/dev/pm_ds.c @@ -1,4 +1,4 @@ -/* $NetBSD: pm_ds.c,v 1.3 1996/10/23 02:34:23 mhitch Exp $ */ +/* $NetBSD: pm_ds.c,v 1.4 1997/05/24 08:19:52 jonathan Exp $ */ /* * Copyright 1996 The Board of Trustees of The Leland Stanford @@ -36,10 +36,10 @@ #include "fb.h" #include "pm.h" -#include "dc.h" +#include "dc_ds.h" #if 0 -#if NDC == 0 +#if NDC_DS == 0 pm needs dc device #endif #endif @@ -71,6 +71,11 @@ struct fbinfo pmfi; /*XXX*/ extern struct pmax_fbtty pmfb; /* + * rcons methods and globals. + */ +extern struct pmax_fbtty pmfb; + +/* * XXX * pmax raster-console infrastructure needs to reset the mouse, so * we need a driver callback. @@ -187,6 +192,8 @@ pminit(fi, unit, cold_console_flag) fi->fi_glasstty = &pmfb; + fi->fi_glasstty = &pmfb; + /* * set putc/getc entry point */ diff --git a/sys/arch/pmax/dev/qvss_compat.c b/sys/arch/pmax/dev/qvss_compat.c index 85f0b394ee0..7213063a143 100644 --- a/sys/arch/pmax/dev/qvss_compat.c +++ b/sys/arch/pmax/dev/qvss_compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: qvss_compat.c,v 1.6 1996/10/13 03:39:36 christos Exp $ */ +/* $NetBSD: qvss_compat.c,v 1.8 1997/05/25 10:53:33 jonathan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -89,7 +89,8 @@ #include <pmax/pmax/cons.h> #include <pmax/pmax/pmaxtype.h> -#include "dc.h" +#include "dc_ds.h" +#include "dc_ioasic.h" #include "scc.h" #include "dtop.h" @@ -99,8 +100,17 @@ */ #include <pmax/dev/qvssvar.h> /* our own externs */ + +struct termios; struct dcregs; +#include <pmax/dev/dtopvar.h> /* dtop console I/O decls */ +#include <pmax/tc/sccvar.h> /* ioasic z8530 I/O decls */ +#include <pmax/dev/dcvar.h> /* DZ-11 chip console I/O */ + extern int pmax_boardtype; +/* + * Prototypes of local functions + */ extern void pmEventQueueInit __P((pmEventQueue *qe)); void genKbdEvent __P((int ch)); void genMouseEvent __P((MouseReport *newRepPtr)); @@ -110,41 +120,12 @@ void genDeconfigMouse __P((void)); void mouseInput __P((int cc)); - -#if NDC > 0 -extern void (*dcDivertXInput)(); -extern void (*dcMouseEvent)(); -extern void (*dcMouseButtons)(); -#endif -#if NSCC > 0 -extern void (*sccDivertXInput)(); -extern void (*sccMouseEvent)(); -extern void (*sccMouseButtons)(); -#endif -#if NDTOP > 0 -extern void (*dtopDivertXInput)(); -extern void (*dtopMouseEvent)(); -extern void (*dtopMouseButtons)(); -#endif - - -#if 0 /*XXX*/ -#if NDC > 0 -#include <machine/dc7085cons.h> -extern int dcGetc(), dcparam(); -extern void dcPutc(); -#endif -#if NDTOP > 0 -#include <pmax/dev/dtopreg.h> -extern void dtopKBDPutc(); -#endif #if NSCC > 0 -#include <pmax/dev/sccreg.h> -extern int sccGetc(), sccparam(); -extern void sccPutc(); +extern void (*sccDivertXInput) __P((int cc)); +extern void (*sccMouseEvent) __P((int)); +extern void (*sccMouseButtons) __P((int)); #endif -#endif /* 0 */ extern struct fbinfo *firstfi; @@ -566,14 +547,22 @@ genConfigMouse() s = spltty(); switch (pmax_boardtype) { -#if NDC > 0 +#if NDC_IOASIC > 0 case DS_3MAX: + dcDivertXInput = genKbdEvent; + dcMouseEvent = (void (*) __P((int)))genMouseEvent; + dcMouseButtons = (void (*) __P((int)))genMouseButtons; + break; +#endif /* NDC_IOASIC */ + +#if NDC_DS > 0 case DS_PMAX: dcDivertXInput = genKbdEvent; - dcMouseEvent = genMouseEvent; - dcMouseButtons = genMouseButtons; + dcMouseEvent = (void (*) __P((int)))genMouseEvent; + dcMouseButtons = (void (*) __P((int)))genMouseButtons; break; -#endif +#endif /* NDC_DS */ + #if NSCC > 1 case DS_3MIN: case DS_3MAXPLUS: @@ -605,27 +594,37 @@ genDeconfigMouse() s = spltty(); switch (pmax_boardtype) { -#if NDC > 0 +#if NDC_IOASIC > 0 case DS_3MAX: + + dcDivertXInput = (void (*) __P((int)) )0; + dcMouseEvent = (void (*) __P((int)) )0; + dcMouseButtons = (void (*) __P((int)) )0; + break; +#endif /* NDC_IOASIC */ + +#if NDC_DS > 0 case DS_PMAX: - dcDivertXInput = (void (*)())0; - dcMouseEvent = (void (*)())0; - dcMouseButtons = (void (*)())0; + dcDivertXInput = (void (*) __P((int)) )0; + dcMouseEvent = (void (*) __P((int)) )0; + dcMouseButtons = (void (*) __P((int)) )0; break; -#endif +#endif /* NDC_DS */ + #if NSCC > 1 case DS_3MIN: case DS_3MAXPLUS: - sccDivertXInput = (void (*)())0; - sccMouseEvent = (void (*)())0; - sccMouseButtons = (void (*)())0; + sccDivertXInput = (void (*) __P((int)) )0; + sccMouseEvent = (void (*) __P((MouseReport *)) )0; + sccMouseButtons = (void (*) __P((MouseReport *)) )0; break; #endif + #if NDTOP > 0 case DS_MAXINE: - dtopDivertXInput = (void (*)())0; - dtopMouseEvent = (void (*)())0; - dtopMouseButtons = (void (*)())0; + dtopDivertXInput = (void (*) __P((int)) )0; + dtopMouseEvent = (void (*) __P((MouseReport *)) )0; + dtopMouseButtons = (void (*) __P((MouseReport *)) )0; break; #endif default: diff --git a/sys/arch/pmax/dev/rz.c b/sys/arch/pmax/dev/rz.c index d0ec6e419cc..c6b4cac3075 100644 --- a/sys/arch/pmax/dev/rz.c +++ b/sys/arch/pmax/dev/rz.c @@ -1,4 +1,4 @@ -/* $NetBSD: rz.c,v 1.20 1996/10/13 03:39:38 christos Exp $ */ +/* $NetBSD: rz.c,v 1.23 1997/02/04 05:24:55 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -59,6 +59,7 @@ #include <sys/uio.h> #include <sys/stat.h> #include <sys/syslog.h> +#include <sys/device.h> #include <ufs/ffs/fs.h> @@ -98,16 +99,6 @@ struct size { * (including the boot area). */ static struct size rzdefaultpart[MAXPARTITIONS] = { -#ifdef GENERIC /* greedy machines have 64 meg of swap */ - { 0, 32768 }, /* A */ - { 32768, 131072 }, /* B */ - { 0, 0 }, /* C */ - { 17408, 0 }, /* D */ - { 115712, 0 }, /* E */ - { 218112, 0 }, /* F */ - { 163840, 0 }, /* G */ - { 115712, 0 } /* H */ -#else { 0, 16384 }, /* A */ { 16384, 65536 }, /* B */ { 0, 0 }, /* C */ @@ -116,7 +107,6 @@ static struct size rzdefaultpart[MAXPARTITIONS] = { { 218112, 0 }, /* F */ { 81920, 0 }, /* G */ { 115712, 0 } /* H */ -#endif }; extern char * @@ -127,7 +117,7 @@ readdisklabel __P((dev_t dev, void (*strat) __P((struct buf *bp)), * Ultrix disklabel declarations */ #ifdef COMPAT_ULTRIX -#include "../../stand/dec_boot.h" +#include <pmax/stand/dec_boot.h> extern char * compat_label __P((dev_t dev, void (*strat) __P((struct buf *bp)), @@ -144,6 +134,7 @@ struct rzstats { }; struct rz_softc { + struct device sc_dev; /* new config glue */ struct pmax_scsi_device *sc_sd; /* physical unit info */ pid_t sc_format_pid; /* process using "format" mode */ short sc_flags; /* see below */ @@ -156,7 +147,6 @@ struct rz_softc { #define sc_bopenpart sc_dkdev.dk_bopenmask /* XXX compat */ #define sc_copenpart sc_dkdev.dk_copenmask /* XXX compat */ #define sc_bshift sc_dkdev.dk_blkshift /* XXX compat */ - char sc_xname[8]; /* XXX external name */ struct rzstats sc_stats; /* statisic counts */ struct buf sc_tab; /* queue of pending operations */ struct buf sc_buf; /* buf for doing I/O */ @@ -356,12 +346,14 @@ rzprobe(xxxsd) sc->sc_rwcmd.unitNumber = sd->sd_slave; /* XXX set up the external name */ - bzero(sc->sc_xname, sizeof(sc->sc_xname)); /* XXX */ - sprintf(sc->sc_xname, "rz%d", sd->sd_unit); /* XXX */ + bzero(&sc->sc_dev, sizeof(sc->sc_dev)); /* XXX */ + sprintf(sc->sc_dev.dv_xname, "rz%d", sd->sd_unit); /* XXX */ + sc->sc_dev.dv_unit = sd->sd_unit; /* XXX */ + sc->sc_dev.dv_class = DV_DISK; /* XXX */ /* Initialize the disk structure. */ bzero(&sc->sc_dkdev, sizeof(sc->sc_dkdev)); - sc->sc_dkdev.dk_name = sc->sc_xname; + sc->sc_dkdev.dk_name = sc->sc_dev.dv_xname; /* try to find out what type of device this is */ sc->sc_format_pid = 1; /* force use of sc_cdb */ @@ -445,6 +437,10 @@ rzprobe(xxxsd) if (inqbuf.rmb) sc->sc_flags |= RZF_REMOVEABLE; sc->sc_buf.b_flags = 0; + + sd->sd_devp = &sc->sc_dev; /* XXX */ + TAILQ_INSERT_TAIL(&alldevs, &sc->sc_dev, dv_list); /* XXX */ + return (1); bad: diff --git a/sys/arch/pmax/dev/sfb.c b/sys/arch/pmax/dev/sfb.c index 838c0d0e79a..e0894ed6244 100644 --- a/sys/arch/pmax/dev/sfb.c +++ b/sys/arch/pmax/dev/sfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: sfb.c,v 1.18 1996/10/13 13:14:01 jonathan Exp $ */ +/* $NetBSD: sfb.c,v 1.19 1997/01/22 17:27:54 mhitch Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -131,7 +131,7 @@ void sfbattach __P((struct device *, struct device *, void *)); int sfb_intr __P((void *sc)); struct cfattach sfb_ca = { - sizeof(struct device), sfbmatch, sfbattach + sizeof(struct fbinfo), sfbmatch, sfbattach }; struct cfdriver sfb_cd = { diff --git a/sys/arch/pmax/dev/sfbvar.h b/sys/arch/pmax/dev/sfbvar.h index b72a71f62bc..f30bbd45562 100644 --- a/sys/arch/pmax/dev/sfbvar.h +++ b/sys/arch/pmax/dev/sfbvar.h @@ -1,8 +1,8 @@ -/* $NetBSD: sfbvar.h,v 1.1 1996/09/21 03:06:36 jonathan Exp $ */ +/* $NetBSD: sfbvar.h,v 1.2 1997/05/24 09:15:46 jonathan Exp $ */ /* * Initialize a Turbochannel SFB 2-d framebuffer, * so it can be used as a bitmapped glass-tty console device. */ extern int -scfbinit __P((struct fbinfo *fi, caddr_t base, int unit, int silent)); +sfbinit __P((struct fbinfo *fi, caddr_t base, int unit, int silent)); diff --git a/sys/arch/pmax/dev/sii.c b/sys/arch/pmax/dev/sii.c index 7052341147a..b010abfccd4 100644 --- a/sys/arch/pmax/dev/sii.c +++ b/sys/arch/pmax/dev/sii.c @@ -1,4 +1,4 @@ -/* $NetBSD: sii.c,v 1.20 1996/10/22 23:15:10 mhitch Exp $ */ +/* $NetBSD: sii.c,v 1.23 1997/05/29 19:26:06 jonathan Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -688,6 +688,8 @@ again: * and to just clear the bit if it's set. */ if (cstat & SII_BER) { + regs->cstat = SII_BER; + wbflush(); } #endif @@ -718,6 +720,7 @@ again: cstat); /* XXX */ if (cstat & SII_DST) { sc->sc_target = regs->destat; + state = &sc->sc_st[sc->sc_target]; state->prevComm = 0; } else panic("sc_target 1"); @@ -825,6 +828,7 @@ again: cstat, dstat); /* XXX */ if (cstat & SII_DST) { sc->sc_target = regs->destat; + state = &sc->sc_st[sc->sc_target]; state->prevComm = 0; } else { #ifdef DEBUG @@ -1606,6 +1610,7 @@ sii_GetByte(regs, phase, ack) dstat = regs->dstat; state = regs->cstat & SII_STATE_MSK; + i = -1; if (!(dstat & SII_IBF) || (dstat & SII_MIS)) { regs->comm = state | phase; wbflush(); diff --git a/sys/arch/pmax/dev/tz.c b/sys/arch/pmax/dev/tz.c index 13bcc3fc275..028b028b646 100644 --- a/sys/arch/pmax/dev/tz.c +++ b/sys/arch/pmax/dev/tz.c @@ -1,4 +1,4 @@ -/* $NetBSD: tz.c,v 1.14 1996/10/13 12:34:20 jonathan Exp $ */ +/* $NetBSD: tz.c,v 1.15 1997/01/31 02:00:59 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -57,6 +57,7 @@ #include <sys/proc.h> #include <sys/syslog.h> #include <sys/tprintf.h> +#include <sys/device.h> #include <sys/conf.h> #include <machine/conf.h> @@ -77,6 +78,7 @@ struct pmax_driver tzdriver = { }; struct tz_softc { + struct device sc_dev; /* new config glue */ struct pmax_scsi_device *sc_sd; /* physical unit info */ int sc_flags; /* see below */ int sc_tapeid; /* tape drive id */ @@ -140,6 +142,12 @@ tzprobe(xxxsd) sc->sc_cmd.flags = 0; sc->sc_rwcmd.unitNumber = sd->sd_slave; + /* XXX set up device info */ /* XXX */ + bzero(&sc->sc_dev, sizeof(sc->sc_dev)); /* XXX */ + sprintf(sc->sc_dev.dv_xname, "tz%d", sd->sd_unit); /* XXX */ + sc->sc_dev.dv_unit = sd->sd_unit; /* XXX */ + sc->sc_dev.dv_class = DV_TAPE; /* XXX */ + /* try to find out what type of device this is */ sc->sc_flags = TZF_ALTCMD; /* force use of sc_cdb */ sc->sc_cdb.len = sizeof(ScsiGroup0Cmd); @@ -232,6 +240,10 @@ tzprobe(xxxsd) sc->sc_tapeid = 0; } } + + sd->sd_devp = &sc->sc_dev; /* XXX */ + TAILQ_INSERT_TAIL(&alldevs, &sc->sc_dev, dv_list); /* XXX */ + return (1); bad: diff --git a/sys/arch/pmax/include/asm.h b/sys/arch/pmax/include/asm.h index 6d1efa978be..56d58cd16b8 100644 --- a/sys/arch/pmax/include/asm.h +++ b/sys/arch/pmax/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.3 1997/05/11 16:12:12 pefo Exp $ */ +/* $OpenBSD: asm.h,v 1.4 1997/06/10 14:18:56 graichen Exp $ */ /* * Copyright (c) 1992, 1993 @@ -92,7 +92,7 @@ /* * Define -pg profile entry code. */ -#if defined(GPROF) || defined(PROF) +#ifdef GPROF #define MCOUNT \ .set noreorder; \ .set noat; \ diff --git a/sys/arch/pmax/include/autoconf.h b/sys/arch/pmax/include/autoconf.h index 06416ffb952..ac1d235bba5 100644 --- a/sys/arch/pmax/include/autoconf.h +++ b/sys/arch/pmax/include/autoconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.7 1996/05/29 06:19:49 mhitch Exp $ */ +/* $NetBSD: autoconf.h,v 1.8 1997/05/25 06:10:47 jonathan Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -74,3 +74,5 @@ void set_clockintr __P((void (*)(struct clockframe *))); #endif void set_iointr __P((void (*)(void *, int))); int badaddr __P((void *, u_int)); +void configure __P((void)); +void makebootdev __P((char *cp)); diff --git a/sys/arch/pmax/include/cdefs.h b/sys/arch/pmax/include/cdefs.h index bc0383e8f7d..6812d5fcc4a 100644 --- a/sys/arch/pmax/include/cdefs.h +++ b/sys/arch/pmax/include/cdefs.h @@ -35,4 +35,25 @@ #define __indr_references(sym,msg) /* nothing */ #define __warn_references(sym,msg) /* nothing */ +/* Kernel-only .sections for kernel copyright */ +#ifdef _KERNEL + +#ifdef __STDC__ +#define __KERNEL_SECTIONSTRING(_sec, _str) \ + __asm__(".section " #_sec " ; .asciz \"" _str "\" ; .text") +#else +#define __KERNEL_SECTIONSTRING(_sec, _str) \ + __asm__(".section _sec ; .asciz _str ; .text") +#endif + +#define __KERNEL_RCSID(_n, _s) __KERNEL_SECTIONSTRING(.ident, _s) +#define __KERNEL_COPYRIGHT(_n, _s) __KERNEL_SECTIONSTRING(.copyright, _s) + +#ifdef NO_KERNEL_RCSIDS +#undef __KERNEL_RCSID +#define __KERNEL_RCSID(_n, _s) /* nothing */ +#endif + +#endif /* _KERNEL */ + #endif /* !_MACHINE_CDEFS_H_ */ diff --git a/sys/arch/pmax/include/conf.h b/sys/arch/pmax/include/conf.h index e854da965a1..cd3694affe7 100644 --- a/sys/arch/pmax/include/conf.h +++ b/sys/arch/pmax/include/conf.h @@ -21,7 +21,7 @@ cdev_decl(mm); -cdev_decl(scc); /* pmax (also alpha m-d z8530 SCC */ +cdev_decl(scc); /* pmax (also alpha) m-d z8530 SCC */ cdev_decl(dc); /* dc7085 dz11-on-a-chip */ bdev_decl(rz); /* antique 4.4bsd/pmax SCSI disk */ @@ -33,3 +33,10 @@ cdev_decl(tz); cdev_decl(dtop); /* Personal Decstation (MAXINE) desktop bus */ cdev_decl(fb); /* generic framebuffer pseudo-device */ cdev_decl(rcons); /* framebuffer-based raster console pseudo-device */ + +/* TTTTT - stuff from NetBSD mips conf.h */ +cdev_decl(pms); + +bdev_decl(fd); +cdev_decl(fd); +/* TTTTT - end of stuff from NetBSD mips conf.h */ diff --git a/sys/arch/pmax/include/cpuregs.h b/sys/arch/pmax/include/cpuregs.h index f446b79de00..a5f197211e0 100644 --- a/sys/arch/pmax/include/cpuregs.h +++ b/sys/arch/pmax/include/cpuregs.h @@ -587,4 +587,18 @@ #define VMMACH_TLB_FOUND_WITH_PATCH 2 #define VMMACH_TLB_PROBE_ERROR 3 +/* TTTTT - stuff from NetBSD mips cpuregs.h */ +/* + * nesting interrupt masks. + */ +#define MACH_INT_MASK_SPL_SOFT0 MACH_SOFT_INT_MASK_0 +#define MACH_INT_MASK_SPL_SOFT1 (MACH_SOFT_INT_MASK_1|MACH_INT_MASK_SPL_SOFT0) +#define MACH_INT_MASK_SPL0 (MACH_INT_MASK_0|MACH_INT_MASK_SPL_SOFT1) +#define MACH_INT_MASK_SPL1 (MACH_INT_MASK_1|MACH_INT_MASK_SPL0) +#define MACH_INT_MASK_SPL2 (MACH_INT_MASK_2|MACH_INT_MASK_SPL1) +#define MACH_INT_MASK_SPL3 (MACH_INT_MASK_3|MACH_INT_MASK_SPL2) +#define MACH_INT_MASK_SPL4 (MACH_INT_MASK_4|MACH_INT_MASK_SPL3) +#define MACH_INT_MASK_SPL5 (MACH_INT_MASK_5|MACH_INT_MASK_SPL4) +/* TTTTT - end of stuff from NetBSD mips cpuregs.h */ + #endif /* _MACHCONST */ diff --git a/sys/arch/pmax/include/ecoff_machdep.h b/sys/arch/pmax/include/ecoff_machdep.h index 72dba194502..e5c88a636f4 100644 --- a/sys/arch/pmax/include/ecoff_machdep.h +++ b/sys/arch/pmax/include/ecoff_machdep.h @@ -44,3 +44,52 @@ #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEL) #define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16) + +/* TTTTT - stuff from NetBSD mips dir */ + +extern void cpu_exec_ecoff_setregs __P(( + struct proc *, struct exec_package *, u_long, register_t *)); + + +/* + * ECOFF symbol definitions for 32-bit mips. + * XXX 64-bit (mips3?) may be different. + */ +struct ecoff_symhdr { + int16_t magic; + int16_t vstamp; + int32_t lineMax; + int32_t densenumMax; + int32_t procMax; + int32_t lsymMax; + int32_t optsymMax; + int32_t auxsymMax; + int32_t lstrMax; + int32_t estrMax; + int32_t fdMax; + int32_t rfdMax; + int32_t esymMax; + long linesize; + long cbLineOffset; + long cbDnOffset; + long cbPdOffset; + long cbSymOffset; + long cbOptOffset; + long cbAuxOffset; + long cbSsOffset; + long cbSsExtOffset; + long cbFdOffset; + long cbRfdOffset; + long cbExtOffset; +}; + +struct ecoff_extsym { + int32_t es_strindex; + int32_t es_value; + unsigned es_type:6; + unsigned es_class:5; + unsigned :1; + unsigned es_symauxindex:20; +}; + +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/elf_machdep.h b/sys/arch/pmax/include/elf_machdep.h index d93b48b6c93..6b8a56bf48e 100644 --- a/sys/arch/pmax/include/elf_machdep.h +++ b/sys/arch/pmax/include/elf_machdep.h @@ -1,8 +1,81 @@ -/* $NetBSD: elf_machdep.h,v 1.1 1996/09/26 21:50:59 cgd Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.2 1996/12/17 03:45:05 jonathan Exp $ */ #define ELF32_MACHDEP_ID_CASES \ + +/* + * pmaxes are mipsel machines + */ + +#define ELF32_MACHDEP_ENDIANNESS Elf_ed_2lsb + +#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */ case Elf_em_mips: \ break; #define ELF64_MACHDEP_ID_CASES \ /* no 64-bit ELF machine types supported */ + +/* TTTTT - stuff from NetBSD mips dir */ +/* mips relocs. */ + +#define R_MIPS_NONE 0 +#define R_MIPS_16 1 +#define R_MIPS_32 2 +#define R_MIPS_REL32 3 +#define R_MIPS_REL R_MIPS_REL32 +#define R_MIPS_26 4 +#define R_MIPS_HI16 5 /* high 16 bits of symbol value */ +#define R_MIPS_LO16 6 /* low 16 bits of symbol value */ +#define R_MIPS_GPREL16 7 /* GP-relative reference */ +#define R_MIPS_LITERAL 8 /* Reference to literal section */ +#define R_MIPS_GOT16 9 /* Reference to global offset table */ +#define R_MIPS_GOT R_MIPS_GOT16 +#define R_MIPS_PC16 10 /* 16 bit PC relative reference */ +#define R_MIPS_CALL16 11 /* 16 bit call thru glbl offset tbl */ +#define R_MIPS_CALL R_MIPS_CALL16 +#define R_MIPS_GPREL32 12 + +/* 13, 14, 15 are not defined at this point. */ +#define R_MIPS_UNUSED1 13 +#define R_MIPS_UNUSED2 14 +#define R_MIPS_UNUSED3 15 + +/* + * The remaining relocs are apparently part of the 64-bit Irix ELF ABI. + */ +#define R_MIPS_SHIFT5 16 +#define R_MIPS_SHIFT6 17 + +#define R_MIPS_64 18 +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 +#define R_MIPS_GOT_LO16 23 +#define R_MIPS_SUB 24 +#define R_MIPS_INSERT_A 25 +#define R_MIPS_INSERT_B 26 +#define R_MIPS_DELETE 27 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_CALL_HI16 30 +#define R_MIPS_CALL_LO16 31 +#define R_MIPS_SCN_DISP 32 +#define R_MIPS_REL16 33 +#define R_MIPS_ADD_IMMEDIATE 34 +#define R_MIPS_PJUMP 35 +#define R_MIPS_RELGOT 36 + +#define R_MIPS_max 37 +#define R_TYPE(name) __CONCAT(R_MIPS_,name) + + +/* + * Tell the kernel ELF exec code not to try relocating the interpreter + * (ld.so) for dynamically-linked ELF binaries. + */ +#ifdef _KERNEL +#define ELF_INTERP_NON_RELOCATABLE +#endif + +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/fbvar.h b/sys/arch/pmax/include/fbvar.h index 6a178238ffe..2547aab7988 100644 --- a/sys/arch/pmax/include/fbvar.h +++ b/sys/arch/pmax/include/fbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: fbvar.h,v 1.1 1995/09/11 08:18:51 jonathan Exp $ */ +/* $NetBSD: fbvar.h,v 1.2 1997/05/24 05:49:22 jonathan Exp $ */ /* * Copyright (c) 1992, 1993, 1995 @@ -145,7 +145,9 @@ struct fbdevice { #define FB_INESC 0x001 /* processing an escape sequence */ #define FB_STANDOUT 0x002 /* standout mode */ -/* #define FB_BOLD 0x? /* boldface mode */ +#ifdef notyet +# define FB_BOLD 0x? /* boldface mode */ +#endif #define FB_INVERT 0x008 /* white on black mode */ #define FB_VISBELL 0x010 /* visual bell */ #define FB_CURSOR 0x020 /* cursor is visible */ diff --git a/sys/arch/pmax/include/locore.h b/sys/arch/pmax/include/locore.h index e3235bfff7d..39492c6693d 100644 --- a/sys/arch/pmax/include/locore.h +++ b/sys/arch/pmax/include/locore.h @@ -49,6 +49,7 @@ struct user; extern int copykstack __P((struct user *up)); extern void MachSaveCurFPState __P((struct proc *p)); extern int switch_exit __P((void)); /* XXX never really returns? */ +extern void blkclr __P((caddr_t val, int size)); /* bulk aligned bzero */ /* MIPS-generic locore functions used by trap.c */ extern void MachFPTrap __P((u_int statusReg, u_int CauseReg, u_int pc)); diff --git a/sys/arch/pmax/include/mips_param.h b/sys/arch/pmax/include/mips_param.h index 9c3ad6736be..0a4b1947385 100644 --- a/sys/arch/pmax/include/mips_param.h +++ b/sys/arch/pmax/include/mips_param.h @@ -7,6 +7,7 @@ */ #define ALIGNBYTES 7 #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define NBPG 4096 /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ diff --git a/sys/arch/pmax/include/param.h b/sys/arch/pmax/include/param.h index 81090a088f0..db56a782c17 100644 --- a/sys/arch/pmax/include/param.h +++ b/sys/arch/pmax/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.17 1996/05/20 10:50:52 jonathan Exp $ */ +/* $NetBSD: param.h,v 1.18 1997/02/26 01:45:41 jonathan Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -88,9 +88,15 @@ * of the hardware page size. */ #define MSIZE 128 /* size of an mbuf */ -#define MCLSHIFT 11 -#define MCLBYTES (1 << MCLSHIFT) /* enough for whole Ethernet packet */ +#ifndef MCLSHIFT + +# define MCLSHIFT 11 /* convert bytes to m_buf clusters */ + /* 2K cluster can hold Ether frame */ +#endif /* MCLSHIFT */ + +#define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */ #define MCLOFSET (MCLBYTES - 1) + #ifndef NMBCLUSTERS #ifdef GATEWAY #define NMBCLUSTERS 2048 /* map size, max cluster allocation */ diff --git a/sys/arch/pmax/include/pmap.h b/sys/arch/pmax/include/pmap.h index fb948a7ed87..500cf946ed6 100644 --- a/sys/arch/pmax/include/pmap.h +++ b/sys/arch/pmax/include/pmap.h @@ -107,4 +107,10 @@ struct pmap kernel_pmap_store; #define pmax_round_seg(a) mips_round_seg(a) /* End of stuff from the NetBSD mips tree TTTTT */ +/* + * Bootstrap the system enough to run with virtual memory. + * firstaddr is the first unused kseg0 address (not page aligned). + */ +void pmap_bootstrap __P((vm_offset_t firstaddr)); + #endif /* _PMAP_MACHINE_ */ diff --git a/sys/arch/pmax/include/proc.h b/sys/arch/pmax/include/proc.h index 202d9562314..72d5cc4811b 100644 --- a/sys/arch/pmax/include/proc.h +++ b/sys/arch/pmax/include/proc.h @@ -51,3 +51,11 @@ struct mdproc { /* md_flags */ #define MDP_FPUSED 0x0001 /* floating point coprocessor used */ + +/* TTTTT - stuff from NetBSD mips dir */ +#ifdef _KERNEL +/* kernel single-step emulation */ +struct proc; +extern int mips_singlestep __P((struct proc *p)); +#endif /* _KERNEL */ +/* TTTTT - end of stuff from NetBSD mips dir */ diff --git a/sys/arch/pmax/include/tc_machdep.h b/sys/arch/pmax/include/tc_machdep.h index 4afd08f4fee..40a31833858 100644 --- a/sys/arch/pmax/include/tc_machdep.h +++ b/sys/arch/pmax/include/tc_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: tc_machdep.h,v 1.5 1996/10/06 06:29:51 jonathan Exp $ */ +/* $NetBSD: tc_machdep.h,v 1.6 1997/05/25 05:58:36 jonathan Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -106,6 +106,6 @@ int tc_checkslot __P((tc_addr_t slotbase, char *namep)); extern int tc_findconsole __P((int preferred_slot)); extern void config_tcbus __P((struct device *parent, int cputype, int printfn __P((void*, const char*)) )); - +extern int badaddr __P((void *, u_int)); #endif /* __MACHINE_TC_MACHDEP_H__*/ diff --git a/sys/arch/pmax/include/types.h b/sys/arch/pmax/include/types.h index cab9865caa3..2d4ea03a2c4 100644 --- a/sys/arch/pmax/include/types.h +++ b/sys/arch/pmax/include/types.h @@ -1,6 +1,8 @@ -/* $NetBSD: types.h,v 1.12 1996/04/09 20:54:08 jonathan Exp $ */ +/* $NetBSD: types.h,v 1.13 1996/12/05 00:13:56 cgd Exp $ */ /*- + +#define __BROKEN_INDIRECT_CONFIG * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * |