summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c12
-rw-r--r--sys/i386/isa/pcvt/pcvt_ext.c27
-rw-r--r--sys/i386/isa/pcvt/pcvt_hdr.h5
-rw-r--r--sys/i386/isa/pcvt/pcvt_kbd.c59
-rw-r--r--sys/i386/isa/pcvt/pcvt_out.c9
-rw-r--r--sys/i386/isa/pcvt/pcvt_vtf.c32
6 files changed, 112 insertions, 32 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index c01ff20..83770a0 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -41,7 +41,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_drv.c, 3.20, Last Edit-Date: [Sun Feb 26 12:58:03 1995]
+ * @(#)pcvt_drv.c, 3.20, Last Edit-Date: [Thu Mar 23 20:37:05 1995]
*
*/
@@ -70,6 +70,8 @@
* -hm patch from Rafael Boni/Lon Willett for NetBSD-current
* -hm bell patch from Thomas Eberhardt for NetBSD
* -hm multiple X server bugfixes from Lon Willett
+ * -hm patch from joerg - pcdevtotty for FreeBSD pre-2.1
+ * -hm delay patch from Martin Husemann after port-i386 ml-discussion
*
*---------------------------------------------------------------------------*/
@@ -297,7 +299,7 @@ pcattach(struct isa_device *dev)
vthand.ih_arg = 0;
vthand.ih_level = IPL_TTY;
-#if PCVT_NETBSD > 100
+#if (PCVT_NETBSD > 100) && defined(IST_EDGE)
intr_establish(ia->ia_irq, IST_EDGE, &vthand);
#else /* PCVT_NETBSD > 100 */
intr_establish(ia->ia_irq, &vthand);
@@ -803,6 +805,12 @@ pcrint(void)
{
ret = 1; /* got something */
+#if PCVT_NETBSD > 9
+ delay(6); /* Gateway 2000 fix */
+#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
+ DELAY(6); /* Gateway 2000 fix */
+#endif
+
dt = inb(CONTROLLER_DATA); /* get it 8042 data */
if (pcvt_kbd_count >= PCVT_KBD_FIFO_SZ) /* fifo overflow ? */
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c
index 49870d7..9ad4fd7 100644
--- a/sys/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/i386/isa/pcvt/pcvt_ext.c
@@ -35,7 +35,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_ext.c, 3.20, Last Edit-Date: [Sun Feb 26 12:18:02 1995]
+ * @(#)pcvt_ext.c, 3.20, Last Edit-Date: [Fri Mar 24 20:58:28 1995]
*
*/
@@ -44,9 +44,6 @@
* pcvt_ext.c VT220 Driver Extended Support Routines
* ------------------------------------------------------
*
- * written by Hellmuth Michaelis, hm@hcshh.hcs.de and
- * Joerg Wunsch, joerg_wunsch@uriah.heep.sax.de
- *
* -hm ------------ Release 3.00 --------------
* -hm integrating NetBSD-current patches
* -hm applied Onno van der Linden's patch for Cirrus BIOS upgrade
@@ -62,6 +59,8 @@
* -hm fastscroll/Crtat bugfix from Lon Willett
* -hm bell patch from Thomas Eberhardt for NetBSD
* -hm multiple X server bugfixes from Lon Willett
+ * -hm patch from John Kohl fixing tsleep bug in usl_vt_ioctl()
+ * -hm bugfix: clear 25th line when switching to a force 24 lines vt
*
*---------------------------------------------------------------------------*/
@@ -2191,6 +2190,9 @@ switch_screen(int n, int oldgrafx, int newgrafx)
*/
/* enable display, text mode */
outb(GN_DMCNTLM, 0x28);
+
+/* XXX - something missing here ? Joerg ??? */
+
}
/* make status display happy */
@@ -2252,6 +2254,17 @@ switch_screen(int n, int oldgrafx, int newgrafx)
{
update_led(); /* update led's */
update_hp(vsp); /* update fkey labels, if present */
+
+ /* if we switch to a vt with force 24 lines mode and */
+ /* pure VT emulation and 25 rows charset, then we have */
+ /* to clear the last line on display ... */
+
+ if(vsp->force24 && (vsp->vt_pure_mode == M_PUREVT) &&
+ (vgacs[vsp->vga_charset].screen_size == SIZ_25ROWS))
+ {
+ fillw(' ', vsp->Crtat + vsp->screen_rows * vsp->maxcol,
+ vsp->maxcol);
+ }
}
}
@@ -2587,7 +2600,8 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
int x = spltty();
i = current_video_screen;
error = 0;
- while (current_video_screen == i && !error) {
+ while (current_video_screen == i &&
+ (error == 0 || error == ERESTART)) {
vs[i].vt_status |= VT_WAIT_ACT;
error = tsleep((caddr_t)&vs[i].smode,
PZERO | PCATCH, "waitvt", 0);
@@ -2598,7 +2612,8 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
int x = spltty();
error = 0;
- while (current_video_screen != i && !error)
+ while (current_video_screen != i &&
+ (error == 0 || error == ERESTART))
{
vs[i].vt_status |= VT_WAIT_ACT;
error = tsleep((caddr_t)&vs[i].smode,
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h
index f23b7e2..6a9cf7b 100644
--- a/sys/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/i386/isa/pcvt/pcvt_hdr.h
@@ -32,7 +32,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_hdr.h, 3.20, Last Edit-Date: [Sun Feb 26 13:12:33 1995]
+ * @(#)pcvt_hdr.h, 3.20, Last Edit-Date: [Wed Mar 8 21:00:00 1995]
*
*/
@@ -58,10 +58,11 @@
* -hm removed PCVT_FAKE_SYSCONS10
* -hm added pcstop (patch from Onno)
* -hm multiple X server bugfixes from Lon Willett
+ * -hm patch from Joerg for FreeBSD pre-2.1
*
*---------------------------------------------------------------------------*/
-#define PCVT_REL "3.20-b22" /* driver attach announcement */
+#define PCVT_REL "3.20-b23" /* driver attach announcement */
/* see also: pcvt_ioctl.h */
#include "param.h"
diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c
index 49c8d1c..bd6984a 100644
--- a/sys/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/i386/isa/pcvt/pcvt_kbd.c
@@ -38,7 +38,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_kbd.c, 3.20, Last Edit-Date: [Sun Feb 26 13:28:00 1995]
+ * @(#)pcvt_kbd.c, 3.20, Last Edit-Date: [Fri Mar 24 18:38:16 1995]
*
*/
@@ -61,6 +61,8 @@
* -hm allow keyboard-less kernel boot for serial consoles and such ..
* -hm patch from Lon Willett for led-update and showkey()
* -hm patch from Lon Willett to fix mapping of Control-R scancode
+ * -hm delay patch from Martin Husemann after port-i386 ml-discussion
+ * -hm added PCVT_NONRESP_KEYB_TRY definition to doreset()
*
*---------------------------------------------------------------------------*/
@@ -189,7 +191,8 @@ static void
check_for_lost_intr (void *arg)
{
lost_intr_timeout_queued = 0;
- if (inb(CONTROLLER_CTRL) & STATUS_OUTPBF) {
+ if (inb(CONTROLLER_CTRL) & STATUS_OUTPBF)
+ {
int opri = spltty ();
(void) pcrint ();
splx (opri);
@@ -347,6 +350,11 @@ kbd_emulate_pc(int do_emulation)
#endif /* PCVT_SCANSET > 1 */
+
+#ifndef PCVT_NONRESP_KEYB_TRY
+#define PCVT_NONRESP_KEYB_TRY 25 /* no of times to try to detect */
+#endif /* a nonresponding keyboard */
+
/*---------------------------------------------------------------------------*
* try to force keyboard into a known state ..
*---------------------------------------------------------------------------*/
@@ -354,8 +362,9 @@ static
void doreset(void)
{
int again = 0;
+ int once = 0;
int response, opri;
-
+
/* Enable interrupts and keyboard, etc. */
if (kbc_8042cmd(CONTR_WRITE) != 0)
printf("pcvt: doreset() - timeout controller write command\n");
@@ -401,15 +410,16 @@ void doreset(void)
{
if (response < 0)
{
- printf("pcvt: doreset() - response != ack and response < 0\n");
+ if(!again) /* print message only once ! */
+ printf("pcvt: doreset() - response != ack and response < 0 [one time only msg]\n");
response = KEYB_R_RESEND;
}
if (response == KEYB_R_RESEND)
{
- if(!again)
- printf("pcvt: doreset() - got KEYB_R_RESEND response ...\n");
+ if(!again) /* print message only once ! */
+ printf("pcvt: doreset() - got KEYB_R_RESEND response ... [one time only msg]\n");
- if(++again > 100)
+ if(++again > PCVT_NONRESP_KEYB_TRY)
{
printf("pcvt: doreset() - Caution - no PC keyboard detected!\n");
keyboard_type = KB_UNKNOWN;
@@ -417,8 +427,11 @@ void doreset(void)
return;
}
- if (kbd_cmd(KEYB_C_RESET) != 0)
- printf("pcvt: doreset() - timeout for loop keyboard reset command\n");
+ if((kbd_cmd(KEYB_C_RESET) != 0) && (once == 0))
+ {
+ once++; /* print message only once ! */
+ printf("pcvt: doreset() - timeout for loop keyboard reset command [one time only msg]\n");
+ }
}
}
@@ -928,6 +941,13 @@ loop:
{
if (!noblock) /* source = 8042 */
{
+
+#if PCVT_NETBSD > 9
+ delay(6); /* Gateway 2000 fix - ziff */
+#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
+ DELAY(6); /* Gateway 2000 fix - ziff */
+#endif
+
dt = inb(CONTROLLER_DATA); /* get from obuf */
}
else /* source = keyboard fifo */
@@ -946,6 +966,13 @@ loop:
if (inb(CONTROLLER_CTRL) & STATUS_OUTPBF)
{
+
+#if PCVT_NETBSD > 9
+ delay(6); /* Gateway 2000 fix - ziff */
+#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
+ DELAY(6); /* Gateway 2000 fix - ziff */
+#endif
+
dt = inb(CONTROLLER_DATA); /* yes, get it ! */
#endif /* !PCVT_KBD_FIFO */
@@ -1234,6 +1261,13 @@ no_mouse_event:
{
if (!noblock) /* source = 8042 */
{
+
+#if PCVT_NETBSD > 9
+ delay(6); /* Gateway 2000 fix - ziff */
+#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
+ DELAY(6); /* Gateway 2000 fix - ziff */
+#endif
+
dt = inb(CONTROLLER_DATA);
}
else /* source = keyboard fifo */
@@ -1253,6 +1287,13 @@ no_mouse_event:
if(inb(CONTROLLER_CTRL) & STATUS_OUTPBF)
{
+
+#if PCVT_NETBSD > 9
+ delay(6); /* Gateway 2000 fix - ziff */
+#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
+ DELAY(6); /* Gateway 2000 fix - ziff */
+#endif
+
dt = inb(CONTROLLER_DATA); /* yes, get it ! */
}
diff --git a/sys/i386/isa/pcvt/pcvt_out.c b/sys/i386/isa/pcvt/pcvt_out.c
index 1227bc0..d564838 100644
--- a/sys/i386/isa/pcvt/pcvt_out.c
+++ b/sys/i386/isa/pcvt/pcvt_out.c
@@ -35,7 +35,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_out.c, 3.20, Last Edit-Date: [Sun Feb 26 13:39:16 1995]
+ * @(#)pcvt_out.c, 3.20, Last Edit-Date: [Sun Feb 26 16:43:58 1995]
*
*/
@@ -1060,13 +1060,6 @@ vt_coldinit(void)
svsp->cursor_end = vs[0].cursor_end;
}
-#ifdef DOES_THE_ABOVE_CODE_HANDLE_TRIDENTS_CORRECTLY
- if(vga_family == VGA_F_TRI) /* handle brain-dead Trident */
- svsp->cursor_start = 1; /* cursor upper scanline */
- else
- svsp->cursor_start = 0; /* cursor upper scanline */
-#endif
-
#ifdef FAT_CURSOR
svsp->cursor_end = 15; /* cursor lower scanline */
#endif
diff --git a/sys/i386/isa/pcvt/pcvt_vtf.c b/sys/i386/isa/pcvt/pcvt_vtf.c
index 40ca837..6269700 100644
--- a/sys/i386/isa/pcvt/pcvt_vtf.c
+++ b/sys/i386/isa/pcvt/pcvt_vtf.c
@@ -35,7 +35,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
- * @(#)pcvt_vtf.c, 3.20, Last Edit-Date: [Wed Feb 22 14:16:13 1995]
+ * @(#)pcvt_vtf.c, 3.20, Last Edit-Date: [Wed Mar 29 20:45:48 1995]
*/
/*---------------------------------------------------------------------------*
@@ -52,6 +52,7 @@
* -hm fixing NOFASTSCROLL operation for MDA/Hercules
* -jw/hm fixing bug in roll_up() and roll_down()
* -hm fastscroll/Crtat bugfix from Lon Willett
+ * -hm patch for non-XSERVER/UCONSOLE compiles from Rafal Boni
*
*---------------------------------------------------------------------------*/
@@ -1936,7 +1937,7 @@ void
roll_up(struct video_state *svsp, int n)
{
-#if PCVT_NOFASTSCROLL==0
+#if (PCVT_NOFASTSCROLL==0)
if(svsp->scrr_beg == 0 && /* if scroll region is whole screen */
svsp->scrr_len == svsp->screen_rows &&
@@ -1945,8 +1946,14 @@ roll_up(struct video_state *svsp, int n)
adaptor_type != MDA_ADAPTOR))) /* and not on MDA/Hercules */
{
u_short *Memory =
+
+#if defined(PCVT_USL_COMPAT)
(vsp != svsp || (vsp->vt_status & VT_GRAFX)) ?
- svsp->Memory : Crtat;
+#else
+ (vsp != svsp) ?
+#endif
+
+ svsp->Memory : Crtat;
if(svsp->Crtat > (Memory + (svsp->screen_rows - n) *
svsp->maxcol))
@@ -1961,7 +1968,12 @@ roll_up(struct video_state *svsp, int n)
svsp->Crtat += n * svsp->maxcol;
}
+#if defined(PCVT_USL_COMPAT)
if(vsp == svsp && !(vsp->vt_status & VT_GRAFX))
+#else
+ if(vsp == svsp)
+#endif
+
{
outb(addr_6845, CRTC_STARTADRH);
outb(addr_6845+1, (svsp->Crtat - Crtat) >> 8);
@@ -1992,7 +2004,7 @@ static void
roll_down(struct video_state *svsp, int n)
{
-#if PCVT_NOFASTSCROLL==0
+#if (PCVT_NOFASTSCROLL==0)
if(svsp->scrr_beg == 0 && /* if scroll region is whole screen */
svsp->scrr_len == svsp->screen_rows &&
@@ -2001,8 +2013,13 @@ roll_down(struct video_state *svsp, int n)
adaptor_type != MDA_ADAPTOR))) /* and not on MDA/Hercules */
{
u_short *Memory =
+
+#if defined(PCVT_USL_COMPAT)
(vsp != svsp || (vsp->vt_status & VT_GRAFX)) ?
- svsp->Memory : Crtat;
+#else
+ (vsp != svsp) ?
+#endif
+ svsp->Memory : Crtat;
if (svsp->Crtat < (Memory + n * svsp->maxcol))
{
@@ -2017,7 +2034,12 @@ roll_down(struct video_state *svsp, int n)
svsp->Crtat -= n * svsp->maxcol;
}
+#if defined(PCVT_USL_COMPAT)
if(vsp == svsp && !(vsp->vt_status & VT_GRAFX))
+#else
+ if(vsp == svsp)
+#endif
+
{
outb(addr_6845, CRTC_STARTADRH);
outb(addr_6845+1, (svsp->Crtat - Crtat) >> 8);
OpenPOWER on IntegriCloud