summaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/4.3.0_cvscvs2svn2001-04-211-1/+1
| | | | | | | 'RELENG_4_3_0_RELEASE'. This commit was manufactured to restore the state of the 4.3-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
* MFC: Add the ability to define halt and powerdown keys for sysconf.David Malone2000-10-291-1/+13
| | | | Notes: svn path=/stable/4/; revision=67900
* MFC: Use a MI /dev/[u]random device.David E. O'Brien2000-05-101-1/+1
| | | | | | | Use sys/random.h rather than i386 specific one. Notes: svn path=/stable/4/; revision=60307
* MFC:Kazutaka YOKOTA2000-04-031-54/+44
| | | | | | | | | | | | | - Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor. - Fix non-destructive, underline text cursor. - Unbreak LINT. They correspond to: syscons_isa.c 1.12, scmouse.c 1.13, scvgarndr.c 1.7, scvidctl.c 1.20, syscons.c 1.337, 1.338, syscons.h 1.61, 1.62. Notes: svn path=/stable/4/; revision=58974
* - Fix text cursor logic so that multiple instances of the "normal" cursorKazutaka YOKOTA2000-02-111-3/+5
| | | | | | | | | | won't appear on the screen, and "blinking" and "destructive" cursor won't appear in the vty for which the text cursor is currently hidden. Approved by: jkh Notes: svn path=/head/; revision=57129
* Use config's conditional compilation rather than using #ifdefs that makePeter Wemm2000-01-291-4/+0
| | | | | | | | modular compilation harder. I'm doing this because people seem to like cut/pasting examples of bad practices in existing code. Notes: svn path=/head/; revision=56836
* Unconditionally define sc_paste().Kazutaka YOKOTA2000-01-201-2/+0
| | | | Notes: svn path=/head/; revision=56329
* Fix wrong usage of FONT_NONE. It was not meant to be set inKazutaka YOKOTA2000-01-201-1/+1
| | | | | | | | | | scp->font_size in the first place. It is redundant now and is removed. Found by: bde Notes: svn path=/head/; revision=56328
* This is the 3rd stage of syscons code reorganization.Kazutaka YOKOTA2000-01-151-917/+282
| | | | | | | | | | | | | | | | | | - Split terminal emulation code from the main part of the driver so that we can have alternative terminal emulator modules if we like in the future. (We are not quite there yet, though.) - Put sysmouse related code in a separate file, thus, simplifying the main part of the driver. As some files are added to the source tree, you need to run config(8) before you compile a new kernel next time. You shouldn't see any functional change by this commit; this is only internal code reorganization. Notes: svn path=/head/; revision=56043
* Add a new mechanism, cndbctl(), to tell the console driver thatKazutaka YOKOTA2000-01-111-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | ddb is entered. Don't refer to `in_Debugger' to see if we are in the debugger. (The variable used to be static in Debugger() and wasn't updated if ddb is entered via traps and panic anyway.) - Don't refer to `in_Debugger'. - Add `db_active' to i386/i386/db_interface.d (as in alpha/alpha/db_interface.c). - Remove cnpollc() stub from ddb/db_input.c. - Add the dbctl function to syscons, pcvt, and sio. (The function for pcvt and sio is noop at the moment.) Jointly developed by: bde and me (The final version was tweaked by me and not reviewed by bde. Thus, if there is any error in this commit, that is entirely of mine, not his.) Some changes were obtained from: NetBSD Notes: svn path=/head/; revision=55823
* - Remember the keyboard repeat delay and rate.Kazutaka YOKOTA1999-12-131-0/+1
| | | | | | | | - Add a new ioctl, KDGETREPEAT, to retrieve the keyboard repeat rate. - Delete unnecessary #include. Notes: svn path=/head/; revision=54543
* Add "panic key" function to syscons. When this key is defined in aKazutaka YOKOTA1999-12-101-0/+10
| | | | | | | | | | | | | | | | | | | | | keymap and pressed, the system panic will be forced. This feature must be specifically enabled by a new sysctl variable: machdep.enable_panic_key. Its default value is 0. The panic key won't do anything unless this variable is set to non-zero. To use the panic key, add a keyword 'panic' to a key in your keymap file. The following example assigns the panic function to SysReq (Alt-PrintScreen) key (keycode 84). 083 del '.' '.' '.' '.' '.' boot boot N 084 panic nop nop nop panic nop nop nop O 085 nop nop nop nop nop nop nop nop O PR: kern/13721 Notes: svn path=/head/; revision=54381
* Fix cursor position calculation.Kazutaka YOKOTA1999-12-051-1/+2
| | | | | | | Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz> Notes: svn path=/head/; revision=54144
* - Fail VT switching when the controlling program, such as theKazutaka YOKOTA1999-11-281-4/+4
| | | | | | | | | X server, is not responding to the VT switching protocol. (This part of the code has been somewhat wrong in -CURRENT, but -STABLE has the correct code...) Notes: svn path=/head/; revision=53816
* - Remove cdevsw_add().Kazutaka YOKOTA1999-10-061-7/+0
| | | | Notes: svn path=/head/; revision=51966
* Introduce ttyread() and ttywrite() which do the canonical thing.Poul-Henning Kamp1999-09-281-12/+2
| | | | | | | | | Use them in many tty drivers. Reviewed by: julian, bde Notes: svn path=/head/; revision=51756
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-6/+1
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* This patch clears the way for removing a number of tty relatedPoul-Henning Kamp1999-09-251-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags Notes: svn path=/head/; revision=51654
* - Hang the scr_stat struct from dev_t.Kazutaka YOKOTA1999-09-191-99/+78
| | | | | | | | | | | | | | | | - Remove sc_get_scr_stat(). It's not necessary anymore. - Call ttymalloc() to allocate the struct tty for each vty, rather than statically declaring an array of struct tty. We still need a statically allocated struct tty for the first vty which is used for the kernel console I/O, though. - Likewise, call ttymalloc() for /dev/sysmouse and /dev/consolectl. - Delete unnecessary test on the pointer struct tty *tp in some functions. - Delete unused code in scmouse.c. WARNING: this change requires you to recompile screen savers! Notes: svn path=/head/; revision=51404
* s/si_tty_tty/si_tty/gPoul-Henning Kamp1999-08-301-10/+10
| | | | Notes: svn path=/head/; revision=50652
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Implement a new generic mechanism for attaching handler functions toMike Smith1999-08-211-4/+6
| | | | | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green Notes: svn path=/head/; revision=50107
* Wrap two declarations that are only used in an #ifdef in their own #ifdef.Bill Fumerola1999-08-171-1/+5
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=49986
* Fix a warning on the alpha.Dmitrij Tejblum1999-08-131-3/+1
| | | | Notes: svn path=/head/; revision=49694
* Merge the cons.c and cons.h to the best of my ability. alpha may orPoul-Henning Kamp1999-08-091-2/+2
| | | | | | | may not compile, I can't test it. Notes: svn path=/head/; revision=49558
* register tty devices so they will look right in pstat.Poul-Henning Kamp1999-08-081-61/+26
| | | | Notes: svn path=/head/; revision=49547
* - Clear relevant variables when the keyboard is not available.Kazutaka YOKOTA1999-07-181-8/+18
| | | | | | | | - Do not touch the `tty' struct when it's not yet available. - Initialize correct bits in `fonts_loaded'. Notes: svn path=/head/; revision=48879
* - Fixed memory leak in sc_alloc_history_buffer().Kazutaka YOKOTA1999-07-071-8/+4
| | | | | | | | | | | - Correctly observe the variable `extra_history_size' when changing the size of history (scroll back) buffer. - Added sc_free_history_buffer(). Pointed out by: des Notes: svn path=/head/; revision=48667
* Tidy up a few warnings when used without splash. (things defined but notPeter Wemm1999-07-011-1/+7
| | | | | | | used) Notes: svn path=/head/; revision=48418
* Fix warnings on the Alpha.Peter Wemm1999-07-011-2/+7
| | | | Notes: svn path=/head/; revision=48416
* Fill in tp->t_windowsize AFTER the call to (*linesw[tp->t_line].l_open)(),Kazutaka YOKOTA1999-06-291-2/+6
| | | | | | | | | | rather than BEFORE the call. Otherwise the structure will be `zero'ed out by l_open, which actually is ttyopen(), if !TS_OPEN. PR: kern/12420 Notes: svn path=/head/; revision=48338
* Fix a dev_t/udev_t issuePeter Wemm1999-06-261-3/+3
| | | | Notes: svn path=/head/; revision=48239
* Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletionKazutaka YOKOTA1999-06-241-5/+7
| | | | | | | and insertion should affect the line the cursor is on only. Notes: svn path=/head/; revision=48184
* The second phase of syscons reorganization.Kazutaka YOKOTA1999-06-221-2301/+1838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split syscons source code into manageable chunks and reorganize some of complicated functions. - Many static variables are moved to the softc structure. - Added a new key function, PREV. When this key is pressed, the vty immediately before the current vty will become foreground. Analogue to PREV, which is usually assigned to the PrntScrn key. PR: kern/10113 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de> - Modified the kernel console input function sccngetc() so that it handles function keys properly. - Reorganized the screen update routine. - VT switching code is reorganized. It now should be slightly more robust than before. - Added the DEVICE_RESUME function so that syscons no longer hooks the APM resume event directly. - New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING, SC_NO_HISTORY and SC_NO_SYSMOUSE. Various parts of syscons can be omitted so that the kernel size is reduced. SC_PIXEL_MODE Made the VESA 800x600 mode an option, rather than a standard part of syscons. SC_DISABLE_DDBKEY Disables the `debug' key combination. SC_ALT_MOUSE_IMAGE Inverse the character cell at the mouse cursor position in the text console, rather than drawing an arrow on the screen. Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG) SC_DFLT_FONT makeoptions "SC_DFLT_FONT=_font_name_" Include the named font as the default font of syscons. 16-line, 14-line and 8-line font data will be compiled in. This option replaces the existing STD8X16FONT option, which loads 16-line font data only. - The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c. - The video driver provides a set of ioctl commands to manipulate the frame buffer. - New kernel configuration option: VGA_WIDTH90 Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These modes are mot always supported by the video card. PR: i386/7510 Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx. - The header file machine/console.h is reorganized; its contents is now split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h (another new file). machine/console.h is still maintained for compatibility reasons. - Kernel console selection/installation routines are fixed and slightly rebumped so that it should now be possible to switch between the interanl kernel console (sc or vt) and a remote kernel console (sio) again, as it was in 2.x, 3.0 and 3.1. - Screen savers and splash screen decoders Because of the header file reorganization described above, screen savers and splash screen decoders are slightly modified. After this update, /sys/modules/syscons/saver.h is no longer necessary and is removed. Notes: svn path=/head/; revision=48104
* Unifdef VM86Jonathan Lemon1999-06-011-5/+4
| | | | | | | Reviewed by: silence on on -current Notes: svn path=/head/; revision=47676
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-7/+21
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* Removed global variable `Crtat'. This was once (bogusly) shared withBruce Evans1999-05-121-6/+3
| | | | | | | | | | pcvt, but it had rotted into unuse here, and of course its type had become inconsisent with its type in pcvt. Fixed some minor style bugs. Notes: svn path=/head/; revision=47034
* Adjust console stuff now that makedev is no longer a macro.Doug Rabson1999-05-101-2/+3
| | | | Notes: svn path=/head/; revision=46894
* Suser() simplification:Poul-Henning Kamp1999-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. Notes: svn path=/head/; revision=46112
* Bring the 'new-bus' to the i386. This extensively changes the way thePeter Wemm1999-04-161-1/+9
| | | | | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core Notes: svn path=/head/; revision=45720
* Keyboard driver update in preparation for the USB keyboard driver.Kazutaka YOKOTA1999-03-101-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | - Refined internal interface in keyboard drivers so that: 1. the side effect of device probe is kept minimal, 2. polling mode function is added, 3. and new ioctl and configuration options are added (see below). - Added new ioctl: KDSETREPEAT Set keyboard typematic rate. There has existed an ioctl command, KDSETRAD, for the same purpose. However, KDSETRAD is dependent on the AT keyboard. KDSETREPEAT provides more generic interface. KDSETRAD will still be supported in the atkbd driver. - Added new configuration options: ATKBD_DFLT_KEYMAP Specify a keymap to be used as the default, built-in keymap. (There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP, SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap. These options are now gone for good. The new option is more general.) KBD_DISABLE_KEYMAP_LOADING Don't allow the user to change the keymap. Notes: svn path=/head/; revision=44628
* - Don't assume the line length in the video memory is always the same asKazutaka YOKOTA1999-02-051-2/+2
| | | | | | | | | | the screen width. - Store the current video mode information in the `video_adapter' struct. - The size of the `v_offscreensize' field in the VESA mode information block is u_int16, not u_int8. Notes: svn path=/head/; revision=43664
* Use suser() to check for super user rather than examining cr_uid directly.Poul-Henning Kamp1999-01-301-2/+2
| | | | | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles. Notes: svn path=/head/; revision=43425
* Fix warnings related to -Wall -Wcast-qualMatthew Dillon1999-01-281-1/+3
| | | | Notes: svn path=/head/; revision=43351
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-281-2/+2
| | | | | | | kernel compile Notes: svn path=/head/; revision=43314
* Pull down the splash screen when someone is about to read from theKazutaka YOKOTA1999-01-261-7/+2
| | | | | | | keyboard. Do this in scread(), rather than in scopen(). Notes: svn path=/head/; revision=43228
* sysconsKazutaka YOKOTA1999-01-191-80/+184
| | | | | | | | | | | | | | | | | | | | - Bring down the splash screen when a vty is opened for the first time. - Make sure the splash screen/screen saver is stopped before switching vtys. - Read and save initial values in the BIOS data area early. VESA BIOS may change BIOS data values when switching modes. - Fix missing '&' operator. - Move ISA specific part of driver initialization to syscons_isa.c. atkbd - kbdtables.h is now in /sys/dev/kbd. all - Adjust for forthcoming alpha port. Submitted by: dfr Notes: svn path=/head/; revision=42831
* - Examine the error code from the screen saver and act accordingly.Kazutaka YOKOTA1999-01-171-18/+28
| | | | | | | | | | | | | 0 success EAGAIN try again later other don't call this screen saver again - Test flags consistently to examine the status of the screen saver. scrn_blanked: the screen saver is running scp->status & SAVER_RUNNING: the saver is running in this vty - Correctlyu preserve status flag bits in set/restore_scrn_saver_mdoe(). Notes: svn path=/head/; revision=42748
* Get conditional compilation right so that unnecessary referenceKazutaka YOKOTA1999-01-131-8/+10
| | | | | | | | to splash-relatec call won't be made if there is no splash pseudo device. Notes: svn path=/head/; revision=42610