diff options
author | joerg <joerg@FreeBSD.org> | 1995-04-01 17:16:40 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-04-01 17:16:40 +0000 |
commit | 496532df2284189ba4f9a41dbb9c99e7bfe8dc04 (patch) | |
tree | fc89c15b2818467678f15490b5868f157675d332 | |
parent | 8befbf76145df5fc0818e4b312878684f567f2cc (diff) | |
download | FreeBSD-src-496532df2284189ba4f9a41dbb9c99e7bfe8dc04.zip FreeBSD-src-496532df2284189ba4f9a41dbb9c99e7bfe8dc04.tar.gz |
Update pcvt to 3.20b23
Submitted by: Hellmuth Michaelis <hm@altona.hamburg.com>
-rw-r--r-- | sys/i386/include/pcvt_ioctl.h | 11 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_drv.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_ext.c | 27 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_hdr.h | 5 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_kbd.c | 59 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_out.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_vtf.c | 32 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/Acknowledgements | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/BugList | 21 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/ChangeLog | 57 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/Manifest | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/NotesAndHints | 105 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/README.FIRST | 26 | ||||
-rw-r--r-- | usr.sbin/pcvt/kbdio/kbdio.y | 39 | ||||
-rw-r--r-- | usr.sbin/pcvt/kbdio/lex.l | 7 | ||||
-rw-r--r-- | usr.sbin/pcvt/keycap/keycap.src | 5 |
16 files changed, 318 insertions, 101 deletions
diff --git a/sys/i386/include/pcvt_ioctl.h b/sys/i386/include/pcvt_ioctl.h index ac4842a..b6e4ca6 100644 --- a/sys/i386/include/pcvt_ioctl.h +++ b/sys/i386/include/pcvt_ioctl.h @@ -44,7 +44,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * - * @(#)ioctl_pcvt.h, 3.20, Last Edit-Date: [Sun Feb 26 13:15:12 1995] + * @(#)ioctl_pcvt.h, 3.20, Last Edit-Date: [Thu Mar 30 10:38:23 1995] * */ @@ -56,6 +56,7 @@ * -hm some new PCVT_xxx (and CONF_xxx) values * -hm version definitions moved to begin of file * -hm removed PCVT_FAKE_SYSCONS10 + * -hm accept KERNEL or _KERNEL * *---------------------------------------------------------------------------*/ @@ -64,15 +65,15 @@ /* pcvt version information for VGAPCVTID ioctl */ -#define PCVTIDNAME "pcvt-b22" /* driver id - string */ +#define PCVTIDNAME "pcvt-b23" /* driver id - string */ #define PCVTIDMAJOR 3 /* driver id - major release */ #define PCVTIDMINOR 20 /* driver id - minor release */ -#ifndef KERNEL +#if defined(KERNEL) || defined(_KERNEL) +#include "ioctl.h" +#else #include <sys/ioctl.h> #include <sys/types.h> -#else -#include "ioctl.h" #endif /*---------------------------------------------------------------------------* 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); diff --git a/usr.sbin/pcvt/Misc/Doc/Acknowledgements b/usr.sbin/pcvt/Misc/Doc/Acknowledgements index a9575d1..327f23d 100644 --- a/usr.sbin/pcvt/Misc/Doc/Acknowledgements +++ b/usr.sbin/pcvt/Misc/Doc/Acknowledgements @@ -79,7 +79,7 @@ Thank You, (in the order of appearance) if Theo didn't asked for features ... ;-) - Onno van der Linden (c/o vdlinden@fwi.uva.nl) + Onno van der Linden (c/o frank@fwi.uva.nl) for writing the 132 column support for the Cirrus chipsets although he had no time to do it ... :-) diff --git a/usr.sbin/pcvt/Misc/Doc/BugList b/usr.sbin/pcvt/Misc/Doc/BugList index 4ee10e0..9c8feef 100644 --- a/usr.sbin/pcvt/Misc/Doc/BugList +++ b/usr.sbin/pcvt/Misc/Doc/BugList @@ -1,6 +1,6 @@ -List of known Bugs, ToDo's etc. --------------------------------------------------------------------------------- - Last Edit-Date: [Mon Feb 20 19:54:39 1995] + +List of known Bugs Last Edit-Date: [Sun Mar 5 13:03:51 1995] +================================================================================ Description: Fixed/done by/date @@ -28,15 +28,6 @@ PCVT_SW0CNOUTP and the screen is switched from an X-vt to screen 0, the video mem is irrecoverably destroyed - no data loss ------------------------------------------- -------------------------------- -kernel messages to the console transmitted -while one of the screens is in x mode do -not scroll up and/or not wrap at lower right fixed 02/95 -------------------------------------------- -------------------------------- -Numlock repeats, so by keeping numlock -pressed, the LED will blink. The other lock -keys don't do this. This has shown up on -several keyboards, including a Cherry. -------------------------------------------- -------------------------------- Altgr+Shift+key is not separately They way the keyboard mapping mappable. is done is subject to a sub- stantial rewrite in a future @@ -47,12 +38,6 @@ mappable. is done is subject to a sub- (see discussion of 132 column mode in the NotesAndHints file!) ------------------------------------------- -------------------------------- -When entering/leaving X from/to a 132 col -screen, it results in garbage. Does the -X server save ALL vga registers ?????? -(see discussion of 132 column mode in the - NotesAndHints file!) -------------------------------------------- -------------------------------- WD90Cxx chip detection fails to detect chips other than C00,C10 and C11. C30 chips are detected as C11s .... diff --git a/usr.sbin/pcvt/Misc/Doc/ChangeLog b/usr.sbin/pcvt/Misc/Doc/ChangeLog index 5587635..629088e 100644 --- a/usr.sbin/pcvt/Misc/Doc/ChangeLog +++ b/usr.sbin/pcvt/Misc/Doc/ChangeLog @@ -1,9 +1,62 @@ -ChangeLog last edit-date: [Sat Feb 25 18:18:52 1995] +ChangeLog last edit-date: [Thu Mar 30 19:57:09 1995] ================================================================================ -Changes 3.10 -> 3.20 February 1995 +Changes 3.10 -> 3.20 March 1995 -------------------------------------------------------------------------------- +- removed some files for 386BSD as there is virtually noone outside + using it anymore + +- make pcvt_ioctl.h accept "KERNEL" or "_KERNEL" for NetBSD-current + +- configuration fix: patch from Rafal Boni for pcvt_vtf.c, he writes: + This patch lets one compile pcvt on a system that is lacking XSERVER + and UCONSOLE [or either?] in the config file. I found this while + trying to build a minimal floppy-based test kernel. The problem is + that roll_up and roll_down assume that PCVT_USL_COMPAT is + unconditionally set, and hence muck with parts of the video structure + that are only there if PCVT_USL_COMPAT is set. + (generalized the patch a bit so that fastscroll functionality is + not lost in case of PCVT_USL_COMPAT not being defined. -hm) + +- bugfix: pcvt_ext.c switch_screen() - when switching to a 25 line charset + pure VT emulation screen which has force 24 lines set, then we have + to clear the last line on screen (bugreport from Joerg). + +- added define PCVT_NONRESP_KEYB_TRY for how many times to try to detect + a non-connected keyboard. This was previously set to 100 and + Joerg reports a 5+ minutes delay for a 386 booting without keyboard. + Set to 25 now in the definition. Also made shure the messages in + the corresponding loop display only once. [doreset() in pcvt_kbd.c] + +- updated kbdio utility to include the 7 us delay and added a 'what' command + detect type of MCA motherboard keyboard controller according to + Frank van Gilluwe, "The Undocumented PC", Addison Wesley, pp 273 + +- "Gateway 2000" problem: after some discussion on the NetBSD port-i386 + mailing list about hanging keyboards, Martin Husemann sent in a + patch where each inb(CONTROLLER_DATA) is now preceeded by a + delay(6). This fixed his keyboard problem, the same was reported + from Roland McGrath for his Gateway 2000 keyboard/machine. + +- patch from John Kohl for usl_vt_ioctl() in file pcvt_ext.c, he writes: + This is probably a long standing bug. tsleep() returns ERESTART + if it's interrupted. ERESTART is -1, which means that the + VT_WAITACTIVE call returns from usl_vt_ioctl() with -1, + meaning "not one of my ioctl's". + +- patch from Matthieu Herrb for NetBSD-current (post 1.0) support + +- patch from Joerg for FreeBSD pre-2.1 support + +- added file ToDo in directory Doc + +- fix for Util/Makefile.inc.NetBSD-c from Onno + +- removing unnecessary Trident support code from pcvt_out.c + +- fix from Onno for IST_EDGE in NetBSD-current + - patch from Thomas Eberhardt to fix the bell frequency and duration setting for NetBSD diff --git a/usr.sbin/pcvt/Misc/Doc/Manifest b/usr.sbin/pcvt/Misc/Doc/Manifest index d4855c4..cd75e15 100644 --- a/usr.sbin/pcvt/Misc/Doc/Manifest +++ b/usr.sbin/pcvt/Misc/Doc/Manifest @@ -31,7 +31,6 @@ ChangeLog Driver development history CharGen Description of the character set files Charsets VT220 and mda/cga/hcs/ega/vga charactersets EscapeSequences List of supported control codes & escape sequences -INSTALL.386BSD-0.1 Install instructions for 386BSD 0.1 + pk 0.2.4 INSTALL.FreeBSD-1.1 Install instructions for FreeBSD Release 1.1 or 1.1.5.1 INSTALL.FreeBSD-2.0 Install instructions for FreeBSD Release 2.0 INSTALL.NetBSD-0.9 Install instructions for NetBSD Release 0.9 @@ -42,6 +41,7 @@ Makefile Makefile for the pcvt.4 manualpage Manifest This file NotesAndHints Random notes and hints TestedHardware A list of tested Hardware, this is just what we got ... +ToDo A list of things to do pcvt.4 Manual page for the driver and ioctl's diff --git a/usr.sbin/pcvt/Misc/Doc/NotesAndHints b/usr.sbin/pcvt/Misc/Doc/NotesAndHints index fc5a01a..cbe4478 100644 --- a/usr.sbin/pcvt/Misc/Doc/NotesAndHints +++ b/usr.sbin/pcvt/Misc/Doc/NotesAndHints @@ -1,26 +1,86 @@ -Random Notes, Hints and Thoughts +Random Notes and Hints Last Edit-Date: [Wed Mar 29 21:38:17 1995] -------------------------------------------------------------------------------- - Last Edit-Date: [Sun Feb 26 12:27:54 1995] First of all, please read the file BugList in this directory ! +Can't get pcvt working on a ThinkPad +=============================================================================== + +Anyway, back to the keyboard. The problem is that by default the +ThinkPad uses PS/2 scan code mode. + +You can fix this by using an option and building a kernel, as shown +below. + +] Just for the record, in case someone else is asking for this: Al's +] confirmation that pcvt w/ PCVT_SCANSET=2 works for the ThinkPad: +] +] As Al Elia wrote: +] | Date: Mon, 28 Nov 1994 18:24:42 GMT +] | From: Al Elia <aelia%aelia.student.harvard.edu@sax.sax.de> +] | Message-Id: <199411281824.SAA01554@aelia.student.harvard.edu> +] | To: joerg_wunsch@bonnie.tcd-dresden.de +] | Subject: Re: Anyone got FreeBSD 1.1.5.1 running on a ThinkPad? +] | +] | PCVT_SCANSET=2 worked...I had put in PCVT_SCAN_SET=2 (Doh!) +] | +] | --Al Elia +] | <aelia@aelia.student.harvard,edu> + + (Terry Lambert quoting Joerg Wunsch quoting Al Elia) + + +If one of the "lock" keys is pressed, LEDs do not get updated, keyboard hangs +=============================================================================== + +This entry used to be a long time in the BugList file, and i could never +reproduce the problem. Today i got an explanation in german from someone +owning such a keyboard, i'll try to translate: + +"This are old keyboards manufactured (~1985/1986) which manage their LED + setting only internally. + It is not possible to set the LEDs from the (main-) processor, if you + try, the keyboard processor hangs and the PC has to be reset by switching + power on and off, hard- and/or softreset does not work in this case. + Workaround: recompile pcvt with the LED update removed" + +In other words, define PCVT_NO_LED_UPDATE if you have such a beast! + + +Cursor not visible anymore in 40 and 50 lines mode +=============================================================================== + +You have programmed an underline cursor in i.e. 28 line mode by doing +"cursor -s 10 -e 12". Then you switch to 40 line mode using "scon -s 40". +At this point the cursor is no longer visible because the 40 line font +is only 10 pixels high and the cursor size is programmed with a value +expressing its size from the top down and NOT from the bottom up! +If anyone has a good idea how to solve this problem, please tell me! +The only solution i see so far is having some sort of "generic" cursor +sizes/descriptions (i.e. underline, rectangle, block) which are +recalculated in case of a switch to another line size. + + 386BSD port -=========== +=============================================================================== I don't have access to a 386BSD 0.1 machine anymore so the 386BSD pcvt is considered unsupported and will disappear in the future. Keyboard hangs after first update of keyboard LED's -=================================================== +=============================================================================== -Define PCVT_NO_LED_UPDATE and recompile pcvt. +Define PCVT_NO_LED_UPDATE and recompile pcvt. (Or, get yourself a better +keyboard. Some keyboards just don't work the documented way, this fact is +"normally" masked by the manufacturers BIOS but unhides when one accesses +the hardware directly.) Garbled screen when running vi -============================== +=============================================================================== When the terminal speed in the tty structure is set to low speeds (i.e. 1200 Baud), pcvt shows a strange behaviour in some environments due to the changed @@ -29,9 +89,12 @@ screen update sequences from vi. Please check your shell startup files, /etc/ttys and /etc/gettytab and change the baudrate (i.e. by using stty(1)) to a higher value, i.e. 19200 Baud. +Since i'm not a vi specialist, i never managed to find out wheter to blame +vi or pcvt. + Stty influences on the driver -============================= +=============================================================================== There used to be an entry in the BugList: @@ -49,7 +112,7 @@ This was solved some time ago: After running some graphics application, the cursor is stuck on the bottom line, though everything else appears well -=================================================================== +=============================================================================== Though this might initially appear to be a driver problem, it's rather an application program's bogosity. The cursor update is done asynchron- @@ -78,7 +141,7 @@ be a workaround. Vttest shows strange results -============================ +=============================================================================== Verify your stty "oxtabs" settings, it has to be "oxtabs", NOT "-oxtabs". Get yourself an original DEC terminal to verify vttest's output, i have @@ -86,14 +149,14 @@ until now not seen any (!) VTxxx clone, which does it right !!! VT220-like Keyboard Layout -========================== +=============================================================================== I have to say, i don't use it and i don't like it, so it's mostly unsupported and untested. Patches welcome! 132-column mode -=============== +=============================================================================== There are known difficulties running pcvt in 132 column mode in conjunction with X. Switching to 132 column mode does not only depend on a given chipset, @@ -124,7 +187,7 @@ used, so an automatic clock switching seems to be a problem. NetBSD 0.9 and Xfree86 2.0 -========================== +=============================================================================== To get the X server up and running on 0.9, you have to compile pcvt with PCVT_USL_VT_COMPAT disabled, otherwise X (and SuperProbe) will hang the @@ -134,7 +197,7 @@ This does not apply to NetBSD-current, 386BSD and FreeBSD. X server ioctl compatibility: -============================= +=============================================================================== The compatibility X-Mode ioctl commands CONSOLE_X_MODE_ON and CONSOLE_X_MODE_OFF should not be used intermixed with the USL VT style @@ -159,13 +222,13 @@ XFree86 2.1.) How to set the foreground intensity to high on VGA mono screens: -=============================================================== +=============================================================================== try to issue the command: "scon -p8,60,60,60", EXPERIMENT !!! How to change the color palette on VGA cards: -============================================= +=============================================================================== try out the following commands: @@ -182,7 +245,7 @@ try out the following commands: I have the screensaver compiled in, but can't see any effect -============================================================ +=============================================================================== Don't forget to turn it on with the scon utility. E.g., @@ -191,9 +254,9 @@ Don't forget to turn it on with the scon utility. E.g., sets the timeout to 2 minutes. -Your Notebook uses the NumLock state to switch half of the keyboard -into a numeric keypad -=================================================================== +Your Notebook uses the NumLock state to switch half of the keyboard into a +numeric keypad +=============================================================================== Sigh, each time you leave "vi", your NumLock LED is on again and you get a "6" instead of "o"? Try @@ -205,7 +268,7 @@ Xserver - but you want this). Your notebook significantly loses contrast when using pcvt -========================================================== +=============================================================================== Pcvt turns off the "high intensity" attribute bit internally (to enable the use of a 512-characters charset). Some notebooks hard-code the out- @@ -236,7 +299,7 @@ like this wouldn't damage your screen/VGA! How to set the "LINES"-Environment variable for sh/csh: -======================================================= +=============================================================================== (Note: this is mostly obsoleted now since the driver properly generates SIGWINCH'es to notify applications about a changed screen size.) diff --git a/usr.sbin/pcvt/Misc/README.FIRST b/usr.sbin/pcvt/Misc/README.FIRST index 938cb5f..bf6625f 100644 --- a/usr.sbin/pcvt/Misc/README.FIRST +++ b/usr.sbin/pcvt/Misc/README.FIRST @@ -5,12 +5,11 @@ | | | NetBSD 0.9, 1.0 | | FreeBSD 1.0, 1.1, 1.1.5.1, 2.0 | -| 386BSD 0.1 | | | -| Release 3.20 February 1995 | +| Release 3.20 March 1995 | | | | ---------------------------- | -| ========>> BETA 22 <<======= | +| ========>> BETA 23 <<======= | | ---------------------------- | | | | (c) Copyright 1992,1993,1994,1995 by | @@ -35,7 +34,7 @@ is without the help, the support and the code from Joerg: wrote parts of the EGA/VGA hardware handling and some of the more ugly aspects of the VT220. - Joerg Wunsch (joerg_wunsch@uriah.sax.de) + Joerg Wunsch (joerg_wunsch@uriah.heep.sax.de) added ALL support for XFree86, the screensaver sub- system and support for FreeBSD (and much more ...). @@ -177,23 +176,20 @@ Tested Operating Systems NetBSD 0.9 pcvt release 3.20-b2 tested - NetBSD 1.0 pcvt release 3.20-b22 tested + NetBSD 1.0 pcvt release 3.20-b23 tested - NetBSD-current (post 1.0) reported to run (around Feb 20 '95) + NetBSD-current (post 1.0) reported to run (end of March '95) FreeBSD 1.1R pcvt release 3.20-b7 tested - FreeBSD 1.1.5.1R pcvt release 3.20-b22 tested + FreeBSD 1.1.5.1R pcvt release 3.20-b23 tested - FreeBSD 2.0 pcvt release 3.20-b22 tested + FreeBSD 2.0 pcvt release 3.20-b23 tested - FreeBSD-current (post 2.0) reported to run (around Feb 20 '95) + FreeBSD-current (post 2.0) reported to run (end of March '95) - 386BSD 0.1 + patchkit 0.2.4 pcvt release 3.00 tested - - Installation / Upgrade -------------------------------------------------------------------------------- @@ -221,7 +217,7 @@ NOTE 2: ------- You MUST copy or link the Util/Makefile.inc.X for your flavour of xxx(x)BSD to Util/Makefile.inc . This is because FreeBSD handles manual pages - different than NetBSD and 386BSD 0.1. Also you have to edit Doc/Makefile + in a differnet way than NetBSD. Also you have to edit Doc/Makefile to make this changes for the pcvt(4) manpage. NOTE 3: @@ -289,9 +285,7 @@ s-mail: Eggerstedtstr. 28, 22765 Hamburg, Europe @work ----- e-mail: hm@hcs.de - tel: +49 / 40 / 55903-0 - +49 / 40 / 55903-170 + tel: +49 / 40 / 55903-170 fax: +49 / 40 / 5591486 s-mail: GFKT HCS Computertechnik GmbH, Oldesloer Str. 97-99, 22457 Hamburg, Europe - diff --git a/usr.sbin/pcvt/kbdio/kbdio.y b/usr.sbin/pcvt/kbdio/kbdio.y index ea9a55f..5a81157 100644 --- a/usr.sbin/pcvt/kbdio/kbdio.y +++ b/usr.sbin/pcvt/kbdio/kbdio.y @@ -34,10 +34,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ident "$Header: /home/joerg/src/kbdio/RCS/kbdio.y,v 1.2 1994/09/18 19:49:22 j Exp $" +#ident "$Header: /home/ncvs/src/usr.sbin/pcvt/kbdio/kbdio.y,v 1.1.1.1 1995/02/05 13:49:24 jkh Exp $" /* * $Log: kbdio.y,v $ + * Revision 1.1.1.1 1995/02/05 13:49:24 jkh + * PCVT userland utilities. + * Submitted by: hm + * * Revision 1.2 1994/09/18 19:49:22 j * Refined expr handling; can now set/clear bits. * @@ -58,12 +62,20 @@ #include <machine/pio.h> #endif +#define KBD_DELAY \ + { u_char x = inb(0x84); } \ + { u_char x = inb(0x84); } \ + { u_char x = inb(0x84); } \ + { u_char x = inb(0x84); } \ + { u_char x = inb(0x84); } \ + { u_char x = inb(0x84); } + #define YYDEBUG 1 void yyerror(const char *msg); static void help(int), status(void), data(int), kbd(int), cmdbyte(int), - kbc(int); + kbc(int), whatMCA(void); static int kbget(void); %} @@ -74,6 +86,7 @@ static int kbget(void); %token NEWLINE %token ALL CMD DATA DEFAULTS ECHOC ENABLE EXPR HELP ID LED %token MAKE ONLY RELEASE RESEND RESET SCAN STATUS TYPEMATIC +%token WHAT %token <num> NUM %type <num> expr opr @@ -99,6 +112,7 @@ statement: '?' { help(0); } | HELP { help(0); } | HELP EXPR { help(1); } | STATUS '?' { status(); } + | WHAT '?' { whatMCA(); } | DATA '?' { data(kbget()); } | LED '=' NUM { kbd(0xed); kbd($3); } | ECHOC { kbd(0xee); kbget(); } @@ -157,6 +171,7 @@ help(int topic) { "decimal numbers. Valid statements include:\n" "help [expr]; give help [to expression syntax]\n" "status ? interpret kbd ctrl status byte\n" + "what ? check for MCA type 1 or 2 motherboard controller\n" "data ? get one byte of data\n" "led = NUM set kbd LEDs\n" "echo = NUM echo byte to kbd\n" @@ -206,6 +221,25 @@ status(void) { else printf("| ctrl read empty\n"); } +/* see: Frank van Gilluwe, "The Undocumented PC", Addison Wesley 1994, pp 273 */ + +static void +whatMCA(void) { + int new, sav; + kbc(0x20); /* get command byte */ + sav = kbget(); /* sav = command byte */ + kbc(0x60); /* set command byte */ + kbd(sav | 0x40); /* set keyboard xlate bit */ + kbc(0x20); /* get keyboard command */ + new = kbget(); /* new = command byte */ + kbc(0x60); /* set command byte */ + kbd(sav); /* restore command byte */ + if(new & 0xbf) + printf("Hmm - looks like MCA type 1 motherboard controller\n"); + else + printf("Hmm - looks like MCA type 2 motherboard controller\n"); +} + static void kbd(int d) { int i = 100000; @@ -229,6 +263,7 @@ kbget(void) { i = 10000; while(i && (inb(0x64) & 1) == 0) i--; if(i == 0) { printf("data read: timed out\n"); return -1; } + KBD_DELAY c = (unsigned char)inb(0x60); switch(c) { case 0: case 0xff: diff --git a/usr.sbin/pcvt/kbdio/lex.l b/usr.sbin/pcvt/kbdio/lex.l index c37a73c..a829dd2 100644 --- a/usr.sbin/pcvt/kbdio/lex.l +++ b/usr.sbin/pcvt/kbdio/lex.l @@ -33,10 +33,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ident "$Header: /home/joerg/src/kbdio/RCS/lex.l,v 1.2 1994/09/18 19:48:45 j Exp $" +#ident "$Header: /home/ncvs/src/usr.sbin/pcvt/kbdio/lex.l,v 1.1.1.1 1995/02/05 13:49:24 jkh Exp $" /* * $Log: lex.l,v $ + * Revision 1.1.1.1 1995/02/05 13:49:24 jkh + * PCVT userland utilities. + * Submitted by: hm + * * Revision 1.2 1994/09/18 19:48:45 j * Added the symbolic values for kbd cmd byte. * @@ -77,6 +81,7 @@ reset { return RESET; } scan { return SCAN; } status { return STATUS; } typematic { return TYPEMATIC; } +what { return WHAT; } /* numeric values */ clklow { yylval.num = 0x10; return NUM; } diff --git a/usr.sbin/pcvt/keycap/keycap.src b/usr.sbin/pcvt/keycap/keycap.src index 14ceade..af50d72 100644 --- a/usr.sbin/pcvt/keycap/keycap.src +++ b/usr.sbin/pcvt/keycap/keycap.src @@ -31,7 +31,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# @(#)keycap.src, 3.20, Last Edit-Date: [Tue Jan 17 19:35:09 1995] +# @(#)keycap.src, 3.20, Last Edit-Date: [Wed Mar 8 20:53:01 1995] # #--------------------------------------------------------------------------- # @@ -52,6 +52,7 @@ #--------------------------------------------------------------------------- # # -hm patch from Thomas Gellekum +# -hm renamed finnish "f8" entry to "f1" # #--------------------------------------------------------------------------- @@ -295,7 +296,7 @@ fi|finland|finland7b|finland-ascii|Finnish ASCII mapping:\ # from codrv, untested # Finnish keyboard map with the Latin1 national chars in # their "right" place. --Petri.Wessman@hut.fi -f8|finland8b|finland-latin1|Finnish Latin1 mapping:\ +f1|finland8b|finland-latin1|Finnish Latin1 mapping:\ :A8={:A9=[:A10=]:A11=}:A12=\\:\ :K40=\366:S40=\326:K41=\344:S41=\304:K27=\345:S27=\305:\ :tc=finland: |