aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
Commit message (Collapse)AuthorAgeFilesLines
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Oops, cut/paste could be done on tthe WRONG vty :(Søren Schmidt1997-02-131-1/+1
| | | | | | | pointed out by Kazu. Notes: svn path=/head/; revision=22640
* Fixed the "switch to next screen" command (normally bound to theSøren Schmidt1997-01-301-1/+10
| | | | | | | | | | key "print scrn". It used to stop at the first non-open vty, now it skips the non-open ones and thereby enable one to cycle around all open vty by pressing "print scrn". Notes: svn path=/head/; revision=22128
* Add save/restore cursor as pr SCO screen(HW) manpage.Søren Schmidt1997-01-231-1/+28
| | | | | | | | | | | Fix ESC[2J to not move cursor home Clear mouse cutmarking on more cases. Minor changes by me. Submitted by: ache Notes: svn path=/head/; revision=21964
* Fix the bug that caused CTRL & ALT keys to be hanging sometimes afterSøren Schmidt1997-01-201-1/+1
| | | | | | | | | | an X seesion. Really stupid error of me, and I've been looking at this code SO many times. Thanks to Kazutaka YOKOTA for seeing this.. Submitted by: Kazutaka YOKOTA Notes: svn path=/head/; revision=21884
* Oops, the position of the savefont code was wrong, cur_consoleSøren Schmidt1997-01-191-12/+12
| | | | | | | wasn't set yet. Notes: svn path=/head/; revision=21875
* Oops! I commented out the waiting for retrace loops, because theSøren Schmidt1997-01-181-5/+5
| | | | | | | | | | one in draw_mouse causes spontanious hangs on my p5-100 when I move the mouse excessively. Forgot that on the last commit, so using the mouse or destructive cursor would produce large amounts of flicker.. Notes: svn path=/head/; revision=21849
* Bruce pointed out a bogon:Søren Schmidt1997-01-171-3/+11
| | | | | | | | | | | | | | cur_console is NULL when copy_font() is first called from scinit(). This is apparently harmless when scinit() is called early from sccninit() - page 0 is apparently mapped r/w then, and 0->status contains suitable garbage. However, when there is a serial console, scinit() is first called from scattach() when the page tables are completely initialized, so the NULL pointer causes a panic. Submitted by: bruce Notes: svn path=/head/; revision=21805
* Upgrade the kbdio rutines to provide queued kbd & mouse events.Søren Schmidt1997-01-151-56/+150
| | | | | | | | | Minor other updates to syscons by me. Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> Notes: svn path=/head/; revision=21731
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Hawaii-Five-TypoAlexander Langer1996-12-191-3/+3
| | | | Notes: svn path=/head/; revision=20664
* Fix the broken support for monochrome VGA's.Søren Schmidt1996-12-071-3/+22
| | | | | | | It was MY fault after all, damn.. Notes: svn path=/head/; revision=20197
* Alot of fixes from kazu:Søren Schmidt1996-12-011-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. All the suggestions earlier made by Bruce: renaming some symbols, stricter error checking, removing redundant code, etc. 2. The `psm' driver preserves the default counter resolution and report rate, whatever they are after reset. (Based on reports and suggestion from Nate and Rob Bolin). 3. The `psm' driver now does not check the so-called sync. bit in the first byte of the data packet by default, so that the tapping feature of ALPUS GlidePoint works (based on reports from Louis Mamakos). I tested the code with ALPUS Desktop GlidePoint (M/N GP101) and found no problem; tapping worked. It appears ALPUS produces several models of GlidePoint. I hope the other models are OK too. The check code can still be activated by defining the PSM_CHECKSYNC option in the config file. (The bit checking slightly reduces, if not completely eliminates, weird mouse behavior cased by unsynchronized mouse data packets. It also helps us to detect if the mouse interrupt can ever be lost. But, well, if there are devices which cannot be supported this way...) 4. The `psm' driver does not include the protocol emulation code by default. The code can still be compiled in if the PSM_EMULATION option is specified in the config file. Louis Mamakos suggests the emulation code is putting too much in the kernel, and `moused' works well. I will think about this later and decide if the entire emulation code should be removed. 5. And, of course, the fix in `scprobe()' from Bruce to cure the UserConfig problem. My code in `kbdio.c' is slightly different from his patch, but has the same effect. There still is a possibility that `scprobe()' gets confused, if, for whatever reasons, the user holds down a key for very long time during the boot process. But we cannot cope with everything, can we? Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp) Notes: svn path=/head/; revision=20073
* Fix UserConfig w/syscons.Nate Williams1996-11-191-2/+2
| | | | | | | | | | | | | | | | The 'getchar' function in syscons (sccngetc) is used by UserConfig to get keyboard input from the user. When it was modified to use the shared keyboard port routines it used the port passed in during the probe routine. Since the probe routine was not yet called, the port was set to 0, which is obviously not going to work. Pre-initialize sc_port to IO_KBD which is really a kludge, but it's how the previous driver did it's job. Found by: remote GDB Notes: svn path=/head/; revision=19869
* Only poll the keyboard if the data left in the buffer is from theSøren Schmidt1996-11-151-5/+5
| | | | | | | kbd, not if its from the psm device. Notes: svn path=/head/; revision=19771
* Finally a start at sharing the kdb controller routines betweenSøren Schmidt1996-11-141-102/+71
| | | | | | | | | | | | | | | | syscons and psm, curtesy Kazutaka Yokota with minor changes by me. This contains an update of the psm driver as well. This also fixes the breakage that I introduced to the psm driver by making syscons poll for keyboard events in the atempt to fix the hanging keyboard problem. It works perfectly for me, and I'd like to hear from all that have had keyboard/ps/2 mouse problems if this is the cure... Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp) Notes: svn path=/head/; revision=19753
* 1. Avoid a race in scclose(). tty.c has kludges so that the race isSøren Schmidt1996-11-111-5/+15
| | | | | | | | | | | | | | | | | | | | | | actually harmless. 2. Fixed code to match comment in scintr(). 3. Don't allow even root to take control of the machine when securelevel > 0. I've secured the accesses to PSL_IOPL in all drivers and asked pst to review it, but he seems to be busy. Write access to /dev/kmem and other critival devices currently leaks across raisings of securelevel via open fd's, so there may as well be a similar leak for PSL_IOPL. 4. (Most important.) Don't corrupt memory beyond the screen buffers if the cursor happens to be off the 80x25 screen when syscons starts. 5. Fix console cursor update (not perfect yet). Submitted by: bruce ~ Notes: svn path=/head/; revision=19658
* Removed 'XT_KEYBOARD' option from syscons. Document new-style way ofNate Williams1996-11-111-4/+1
| | | | | | | | | | | getting the same behavior using the flags, which can be done inside of UserConfig. (Also document other syscons flags which were previously undocumented). Requested by: bde Notes: svn path=/head/; revision=19655
* Allow us to enable the 'XT_KEYBOARD' code using a configuration flag.Nate Williams1996-11-101-7/+18
| | | | | | | | | | | This allows the user to add modify syscons's configuration flags using UserConfig that will allow older/quirky hardware (most notably older IBM ThinkPad laptops) to work with the standard boot kernel. Inspired by: The Nomads Notes: svn path=/head/; revision=19613
* Fix the hanging keyboard problem under Xaccel. Apprently we are loosingSøren Schmidt1996-11-041-29/+44
| | | | | | | | an interrupt somewhere. The solution here is to check for keyboard input each time the screen update timer ticks. Not pretty, but works. Notes: svn path=/head/; revision=19405
* Use the calibrated/adjustable i8254 frequency `timer_freq' instead ofSøren Schmidt1996-10-261-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TIMER_FREQ. Fixed missing splx() in scrn_timer(). The bug was harmless because of the undocumented behaviour that the ipl is automatically restored for timeout functions (see softclock()). Perhaps we should depend on this behaviour. Fixed the ddb fix in rev.1.176. The in_debugger flag was no use because it only works when the debugger is entered via the keyboard hotkey. The debugger may be entered for breakpoints and traps, and the console putc routine has no way of knowing when it was, so the console putc routine must (almost?) always remove the cursor image. Not fixed: console switching in ddb doesn't work (ISTR it working), and console 0 shouldn't be switched to for the debugger hotkey unless console 0 is /dev/console. Fixed side effects from calling add_keyboard_randomness() in the console getc routine by not calling it. add_keyboard_randomness() currently always reenables interrupts on 386's and 486's. This is very bad if the console getc routine is called from the debugger and the debugger was entered with interrupts disabled. Fixed preservation of initial screen and now-bogus comment about it. It was broken by setting the initial scr_buf to `buffer' instead of Crtat. `buffer' was full of nulls and the first scroll cleared everything above the things written through syscons. Submitted by: bruce (bde@freebsd.org) Notes: svn path=/head/; revision=19197
* Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flagPaul Traina1996-10-231-7/+8
| | | | | | | | | | | | bit (0x0008) in the sc driver configuration line. This way it's easy to boink a generic kernel. Also, document and place in an opt_ file the #define's for overriding which serial port is the system console. Approved by: sos Notes: svn path=/head/; revision=19123
* Changed mouse functionality a bit, now the pointer disappears ifSøren Schmidt1996-10-181-15/+35
| | | | | | | | | | | | | there is keyboard input. The mousepointer is shown again immediately if moved. Also a function pointer used to install a userwritten extra ioctl handler (sc_user_ioctl). This way its is possible to install user defined videomodes etc etc. No further changes should be in the kernel. Notes: svn path=/head/; revision=19022
* Corrected the setting of winsize on open().Søren Schmidt1996-10-151-5/+10
| | | | | | | Problem pointed out by David Nugent - davidn@blaze.net.au. Notes: svn path=/head/; revision=18948
* Don't claim the console when the driver is disabled. The getc/putcBruce Evans1996-10-091-2/+2
| | | | | | | | part of the console driver usually works when the driver is disabled, but the normal read/write part doesn't (it caused a panic). Notes: svn path=/head/; revision=18831
* scresume erroneously used before declared. Move the functionJordan K. Hubbard1996-10-031-10/+10
| | | | | | | | rather than add another APM ifdef just for the forward decl. [Boy, sure a lot of warnings in here!] Notes: svn path=/head/; revision=18647
* Fixed the userconfig problem (and one with ddb as well).Søren Schmidt1996-10-021-153/+157
| | | | | | | | The rudimentary support for a splash page is there, and works, it just needs a splash page... Notes: svn path=/head/; revision=18646
* Fixed the "missing updates" reported by ache.Søren Schmidt1996-10-011-29/+37
| | | | | | | Moved a little closer to having a splash page capability. Notes: svn path=/head/; revision=18629
* #ifdef another instance of toggle_splash_screen() which Soren missed.Jordan K. Hubbard1996-10-011-1/+5
| | | | Notes: svn path=/head/; revision=18617
* Dont make splash screen the default :)Søren Schmidt1996-09-301-2/+1
| | | | Notes: svn path=/head/; revision=18588
* Fix a couble of nasties regarding mouse pointer and differentSøren Schmidt1996-09-301-100/+175
| | | | | | | | | resolutions. Allow middle mouse button to be used for pasting. Also added the beginnings of support for a splash page. Notes: svn path=/head/; revision=18587
* Changed cncheckc() interface so that it is 8-bit clean - return -1Bruce Evans1996-09-141-2/+7
| | | | | | | | | | | | instead of 0 if there is no input. syscons.c: Added missing spl locking in sccncheckc(). Return the same value as sccngetc() would. It is wrong for sccngetc() to return non-ASCII, but stripping the non-ASCII bits doesn't help. Notes: svn path=/head/; revision=18288
* Hack workaround XFree86 switching failure when used with /dev/sysmousePeter Wemm1996-09-101-2/+23
| | | | | | | | | | | | | | | | | | | | | and xdm, possibly in general. What was happening was that the server was doing a tcsetattr(.. TCSADRAIN) on the mouse fd after a write. Since /dev/sysmouse had a null t_oproc, the drain failed with EIO. Somehow this spammed XFree86 (!@&^#%*& binary release!!), and the driver was left in a bogus state (ie: switch_in_progress permanently TRUE). The simplest way out was to implement a dummy scmousestart() routine to accept any characters from the tty system and toss them into the void. It would probably be more correct to intercept scwrite()'s to the mouse device, but that's executed for every single write to the screen. Supplying a start routine to eat the characters is only executed for the mouse port during startup/shutdown, so it should be faster. Notes: svn path=/head/; revision=18224
* The poor nsccons variable was gone agian this time hidden bySøren Schmidt1996-09-091-2/+2
| | | | | | | | | an ifdef , wonder who broke it this time :) Submitted by: ache Notes: svn path=/head/; revision=18191
* Make syscons replicate a mousesystems mouse on minor 128..Søren Schmidt1996-09-081-18/+36
| | | | | | | | | | | | | | | This enables other consumers of the mouse, to get it info via moused/syscons. In order to use it run moused (from sysconfig), and then tell your Xserver that it should use /dev/sysmouse (mknod sysmouse c 12 128) and it a mousesystems mouse. Everybody will be happy then :) Remember that moused still needs to know what kind of mouse you have.. Comments welcome, as is test results... Notes: svn path=/head/; revision=18174
* Fixed another easy case of const poisoning in the kernel. Cosmetic.Bruce Evans1996-09-071-2/+2
| | | | | | | | | (A pointer to a const was misused to avoid loading loading the same value twice, but gcc does exactly the same optimization automatically. It can see that the value hasn't changed.) Notes: svn path=/head/; revision=18125
* Add option SC_KBD_PROBE_WORKS to syscons driver.Paul Traina1996-09-061-4/+12
| | | | | | | | | | | | If you define this, it means your keyboard is actually probable using the brain-dammaged probe routine in syscons, and if the keyboard is NOT found, then you don't want syscons to activate itself further. This makes life sane for those of us who use serial consoles most of the time and want "the right thing" to happen when we plug a keyboard in. Notes: svn path=/head/; revision=18088
* Remove devconf, it never grew up to be of any use.Poul-Henning Kamp1996-09-061-24/+1
| | | | Notes: svn path=/head/; revision=18084
* Fixed a panic when switching to 40x25 mode, and cursor was beyond theSøren Schmidt1996-09-041-1/+2
| | | | | | | new buffer. Notes: svn path=/head/; revision=18034
* Fixed a couple of bugs in the mousepointer code.Søren Schmidt1996-09-011-228/+291
| | | | | | | | Changed update strategy slightly. Make set_mode & copy_font externally visible. Notes: svn path=/head/; revision=17993
* Fixed restoral of nsscons variable. The tty for /dev/console was lost.Bruce Evans1996-08-281-2/+2
| | | | | | | A warning was introduced. Notes: svn path=/head/; revision=17870
* restore nsccons variable from rev 1.115 that was deleted in rev 1.136Peter Wemm1996-08-161-1/+2
| | | | | | | | | during phk's staticize/cleanup commits. pstat needs it, the MAXCONS option is not visible anywhere else, and pstat uses it to find the bounds of the sccons[MAXCONS] array, which varies. Notes: svn path=/head/; revision=17628
* Fix GIO_ATTR ioctl return to match SYSVAndrey A. Chernov1996-07-301-2/+2
| | | | Notes: svn path=/head/; revision=17340
* Added or restored #include of <machine/md_var.h>. Some declarationsBruce Evans1996-07-011-1/+2
| | | | | | | moved from <machine/cpufunc.h> to better places. Notes: svn path=/head/; revision=16879
* Bump various timeouts in scprobe(). This finally fixes the brokenJoerg Wunsch1996-06-271-6/+6
| | | | | | | keyboard reset one of my earlier commits has been causing. Notes: svn path=/head/; revision=16806
* Fixed bug in pasting 8bit char (ache).Søren Schmidt1996-06-261-76/+51
| | | | | | | | Added linefeeds in cuts that extend beyond one line. Prepared for the mousefunctions to be used in nontext modes. Notes: svn path=/head/; revision=16769
* Added #include of <machine/md_var.h>. This will be needed whenBruce Evans1996-06-251-1/+2
| | | | | | | | some declarations are moved from <machine/cpufunc.h> to better places. Notes: svn path=/head/; revision=16733
* Change the way moused talk to syscons, now its only delivering mouseeventsSøren Schmidt1996-06-251-113/+209
| | | | | | | | | | | via an ioctl (MOUSE_ACTION). Fixed a couple of bugs (destructive cursor, uncut, jitter). Now applications can use the mouse via the MOUSE_MODE ioctl, its possible to have a signal sent on mouseevents, makeing an event loop in the application take over mouseevents. Notes: svn path=/head/; revision=16693
* Moved declarations of static functions to the correct file. This fixesBruce Evans1996-06-231-1/+34
| | | | | | | hundreds of warnings from -Wunused in lkm/syscons/*. Notes: svn path=/head/; revision=16633
* Oops, fix a bug that caused updates to the screen to happen, withoutSøren Schmidt1996-06-211-2/+6
| | | | | | | anything actually changed, in this case the mousepointer logic. Notes: svn path=/head/; revision=16567