aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
Commit message (Collapse)AuthorAgeFilesLines
* Make MOD_* macros almost consistent:Peter Dufault1997-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Use the name argument almost the same in all LKM types. Maintain the current behavior for the external (e.g., modstat) name for DEV, EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only #name. This is a candidate for change and I vote just the name without the "_mod". Change the DISPATCH macro to MOD_DISPATCH for consistency with the other macros. Add an LKM_ANON #define to eliminate the magic -1 and associated signed/unsigned warnings. Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure. Change source in tree to use the new interface. Reviewed by: Bruce Evans Notes: svn path=/head/; revision=24674
* Make MOD_* macros almost consistent:Peter Dufault1997-04-064-12/+12
| | | | | | | | | | | | | | | | | | | | | | | Use the name argument almost the same in all LKM types. Maintain the current behavior for the external (e.g., modstat) name for DEV, EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only #name. This is a candidate for change and I vote just the name without the "_mod". Change the DISPATCH macro to MOD_DISPATCH for consistency with the other macros. Add an LKM_ANON #define to eliminate the magic -1 and associated signed/unsigned warnings. Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure. Change source in tree to use the new interface. Reviewed by: Bruce Evans Notes: svn path=/head/; revision=24673
* Make the default VERASE key the <-- key and remove root'sBrian Somers1997-04-031-1/+4
| | | | | | | | | | `stty's. 'nuff said. Inventor: joerg@FreeBSD.org Reviewer: sos@FreeBSD.org Notes: svn path=/head/; revision=24598
* Interim patch/kludge for keyboard lock-up when `kbdcontrol' tries toKazutaka YOKOTA1997-03-281-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change typematic rate, or the X server (XFree86 or Accelerated X) starts up. So far, there have been two independent reports from Dell Latitude XPi notebook/laptop owners. The Latitude seems to be the only system which suffers from this problem. (I don't know the problem is with the entire Latitude line or with only some Latitude models) No problem report has been heard about other systems (I certainly cannot reproduce the problem in my -current and 2.2 systems). In 3.0-CURRENT, 2.2-RELEASE and 2.2-GAMMA-970310, when programming the keyboard LED/repeat-rate, `set_keyboard()' in `syscons' tells the keyboard controller not to generate keyboard interrupt (IRQ1) and then enable tty interrupts, expecting the keyboard interrupt doesn't occur. It appears that somehow Latitude's keyboard controller still generates the keyboard interrupt thereafter, and `set_keyboard()' doesn't see the return code from the keyboard because it is consumed by the keyboard interrupt handler. The patch entirely disables tty interrupts while setting LED and typematic rate in `set_keyboard()', making the routine behave more like the previous versions of `syscons' (versions in 2.1.X and 2.2-ALPHA, -BETA, and some -GAMMAs). The reporter said this patch eliminated the problem. (I also found another typo/bug, but the reporter and I found that it wasn't the cause of the problem...) This should go into RELENG_2_2. Notes: svn path=/head/; revision=24338
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includeBruce Evans1997-03-241-2/+1
| | | | | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient. Notes: svn path=/head/; revision=24203
* make sure that the user supplied signals in struct vt_mode are actuallyJohn-Mark Gurney1997-03-011-8/+18
| | | | | | | | | | | | | valid signals, else return EINVAL for ioctl VT_SETMODE. this fixes a problem that anybody with vty access can panic the system. 2.2-Candidate (and 2.1.0 I believe) Reviewed-by: sos Notes: svn path=/head/; revision=23248
* Fixed spelling error in a variable name.Bruce Evans1997-02-281-2/+2
| | | | Notes: svn path=/head/; revision=23209
* Removed an obsolete test which prevented mouse movement from quitingKazutaka YOKOTA1997-02-281-7/+6
| | | | | | | | | screen saver. Added a missing `break' statement in set_normal_mode(). Reviewed by: sos Notes: svn path=/head/; revision=23194
* Revert $FreeBSD$ back to $Id$Peter Wemm1997-02-225-5/+5
| | | | Notes: svn path=/head/; revision=22982
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-222-2/+2
| | | | | | | 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-232-1/+30
| | | | | | | | | | | 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-153-60/+154
| | | | | | | | | 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-147-7/+7
| | | | | | | | | | | 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
* Make snake 3.0-CURRENT here.Jordan K. Hubbard1996-11-111-2/+2
| | | | | | | There's gotta be a better way of syncronizing our release numbers. :-) Notes: svn path=/head/; revision=19643
* Allow us to enable the 'XT_KEYBOARD' code using a configuration flag.Nate Williams1996-11-102-8/+20
| | | | | | | | | | | 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-232-8/+10
| | | | | | | | | | | | 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-182-17/+39
| | | | | | | | | | | | | 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-302-103/+180
| | | | | | | | | 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-012-233/+298
| | | | | | | | Changed update strategy slightly. Make set_mode & copy_font externally visible. Notes: svn path=/head/; revision=17993