summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.c
Commit message (Collapse)AuthorAgeFilesLines
* * Use sys/sys/random.h rather than a i386 specific one.obrien2000-04-241-1/+1
| | | | | * There was nothing that should be machine dependant about i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
* Unbreak LINT.yokota2000-04-031-1/+1
|
* - Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor.yokota2000-03-311-53/+43
| | | | - Fix non-destructive, underline text cursor.
* - Fix text cursor logic so that multiple instances of the "normal" cursoryokota2000-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
* Use config's conditional compilation rather than using #ifdefs that makepeter2000-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.
* Unconditionally define sc_paste().yokota2000-01-201-2/+0
|
* Fix wrong usage of FONT_NONE. It was not meant to be set inyokota2000-01-201-1/+1
| | | | | | | scp->font_size in the first place. It is redundant now and is removed. Found by: bde
* This is the 3rd stage of syscons code reorganization.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.
* Add a new mechanism, cndbctl(), to tell the console driver thatyokota2000-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
* - Remember the keyboard repeat delay and rate.yokota1999-12-131-0/+1
| | | | | - Add a new ioctl, KDGETREPEAT, to retrieve the keyboard repeat rate. - Delete unnecessary #include.
* Add "panic key" function to syscons. When this key is defined in ayokota1999-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
* Fix cursor position calculation.yokota1999-12-051-1/+2
| | | | Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
* - Fail VT switching when the controlling program, such as theyokota1999-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...)
* - Remove cdevsw_add().yokota1999-10-061-7/+0
|
* Introduce ttyread() and ttywrite() which do the canonical thing.phk1999-09-281-12/+2
| | | | | | Use them in many tty drivers. Reviewed by: julian, bde
* Remove five now unused fields from struct cdevsw. They should neverphk1999-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
* This patch clears the way for removing a number of tty relatedphk1999-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
* - Hang the scr_stat struct from dev_t.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!
* s/si_tty_tty/si_tty/gphk1999-08-301-10/+10
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement a new generic mechanism for attaching handler functions tomsmith1999-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
* Wrap two declarations that are only used in an #ifdef in their own #ifdef.billf1999-08-171-1/+5
| | | | Reviewed by: bde
* Fix a warning on the alpha.dt1999-08-131-3/+1
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-2/+2
| | | | may not compile, I can't test it.
* register tty devices so they will look right in pstat.phk1999-08-081-61/+26
|
* - Clear relevant variables when the keyboard is not available.yokota1999-07-181-8/+18
| | | | | - Do not touch the `tty' struct when it's not yet available. - Initialize correct bits in `fonts_loaded'.
* - Fixed memory leak in sc_alloc_history_buffer().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
* Tidy up a few warnings when used without splash. (things defined but notpeter1999-07-011-1/+7
| | | | used)
* Fix warnings on the Alpha.peter1999-07-011-2/+7
|
* Fill in tp->t_windowsize AFTER the call to (*linesw[tp->t_line].l_open)(),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
* Fix a dev_t/udev_t issuepeter1999-06-261-3/+3
|
* Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletionyokota1999-06-241-5/+7
| | | | and insertion should affect the line the cursor is on only.
* The second phase of syscons reorganization.yokota1999-06-221-2315/+1852
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Unifdef VM86jlemon1999-06-011-5/+4
| | | | Reviewed by: silence on on -current
* Simplify cdevsw registration.phk1999-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.
* This commit should be a extensive NO-OP:phk1999-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.
* Removed global variable `Crtat'. This was once (bogusly) shared withbde1999-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.
* Adjust console stuff now that makedev is no longer a macro.dfr1999-05-101-2/+3
|
* Suser() simplification:phk1999-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.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-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
* Keyboard driver update in preparation for the USB keyboard driver.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.
* - Don't assume the line length in the video memory is always the same asyokota1999-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.
* Use suser() to check for super user rather than examining cr_uid directly.phk1999-01-301-2/+2
| | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles.
* Fix warnings related to -Wall -Wcast-qualdillon1999-01-281-1/+3
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-2/+2
| | | | kernel compile
* Pull down the splash screen when someone is about to read from theyokota1999-01-261-7/+2
| | | | keyboard. Do this in scread(), rather than in scopen().
* sysconsyokota1999-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
* - Examine the error code from the screen saver and act accordingly.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().
* Get conditional compilation right so that unnecessary referenceyokota1999-01-131-8/+10
| | | | | to splash-relatec call won't be made if there is no splash pseudo device.
* The first stage of console driver reorganization: activate newyokota1999-01-111-965/+675
| | | | | | | | | | | | | keyboard and video card drivers. Because of the changes, you are required to update your kernel configuration file now! The files in sys/dev/syscons are still i386-specific (but less so than before), and won't compile for alpha and PC98 yet. syscons still directly accesses the video card registers here and there; this will be rectified in the later stages.
OpenPOWER on IntegriCloud