summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a VT_LOCKSWITCH ioctl that disallows vty switching. Somethingdd2002-07-101-0/+1
| | | | | | | | like this can be emulated by VT_SETMODEing to VT_PROCESS and never releasing the vty, but this has a number of problems, most notably that a process must stay resident for the lock to be in effect. Reviewed by: roam, sheldonh
* Turn on TGA support.obrien2002-04-131-2/+9
| | | | Submitted by: Andrew M. Miklic <AndrwMklc@cs.com>
* KSE Milestone 2julian2001-09-121-5/+5
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some malformed macro concatenation that gcc-3 has objections about.peter2001-09-101-4/+4
|
* Refine cursor type/shape control escape sequences andyokota2001-08-021-4/+16
| | | | | | | ioctls. We can now add ve, vi and vs capabilities to cons25 in termcap. Discussed with and tested by: ache
* Fix dependencies between kernel options:yokota2001-07-101-6/+14
| | | | | | | | | | - When both SC_PIXEL_MODE and SC_NO_FONT_LOADING are defined, quietly drop SC_NO_FONT_LOADING, because the pixel(raster) console requires font. - When SC_NO_FONT_LOADING is defined, force SC_ALT_MOUSE_IMAGE. Without font, the arrow-shaped mouse cursor cannot be drawn. - Fiddle and simplify some internal macros. MFC after: 2 weeks
* Remove the resume method. It is not necessary any more, becauseyokota2001-06-301-1/+0
| | | | | keyboard drivers have it now... MFC after: 4 weeks
* Don't free buffers we didn't allocate.yokota2001-06-291-0/+1
| | | | MFC after: 2 weeks
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-131-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* Make the beep duration independent of HZ.phk2001-05-281-1/+1
| | | | | | PR: 25201 Submitted by: Akio Morita amorita@meadow.scphys.kyoto-u.ac.jp MFC after: 1 week
* Implement keyboard pasteache2001-03-111-0/+2
| | | | | PR: 25499 Submitted by: Gaspar Chilingarov <nm@web.am>
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Unbreak LINT.yokota2000-04-031-0/+4
|
* - Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor.yokota2000-03-311-13/+26
| | | | - Fix non-destructive, underline text cursor.
* 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/+0
| | | | | | | 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-65/+159
| | | | | | | | | | | | | | | - 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.
* Make the mouse cursor char code configurable via the CONS_MOUSECTLyokota2000-01-121-0/+6
| | | | | | ioctl. By popular demand.
* This patch clears the way for removing a number of tty relatedphk1999-09-251-1/+0
| | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | - 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!
* - Preserve the content of the back scroll buffer when changing theyokota1999-09-191-0/+1
| | | | | | | video mode. Requested by: a lot of people. PR: kern/13764
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-6/+1
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* First small steps at merging DEVFS and PHK's Dev_t stuff.julian1999-08-201-2/+5
|
* - Fixed memory leak in sc_alloc_history_buffer().yokota1999-07-071-2/+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
* Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletionyokota1999-06-241-1/+2
| | | | | | | | | and insertion should affect the line the cursor is on only. This change should have been committed together with syscons.c rev 1.308. (I forgot to do so, when I committed syscons.c :-( Pointed out by: sos
* The second phase of syscons reorganization.yokota1999-06-221-69/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Centralize and reorganize a few macros.des1999-04-121-5/+1
|
* sysconsyokota1999-01-191-1/+6
| | | | | | | | | | | | | | | | | - 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
* The first stage of console driver reorganization: activate newyokota1999-01-111-25/+16
| | | | | | | | | | | | | 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.
* Yet another round of fixes for the VESA support code.yokota1998-10-011-2/+1
| | | | | | | | | | | | | | - Express various sizes in bytes, rather than Kbytes, in the video mode and adapter information structures. - Fill 0 in the linear buffer size field if the linear frame buffer is not available. - Remove SW_VESA_USER ioctl. It is still experimetal and was not meant to be released. - Fix missing cast operator. - Correctly handle pointers returned by the VESA BIOS. The pointers may point to the area either in the BIOS ROM or in the buffer supplied by the caller. - Set the destructive cursor at the right moment.
* Fix destructive cursor shape after text mode switch.ache1998-09-291-1/+2
| | | | This is only for standard modes, I don't check vesa modes yet.
* - Use `u_long cmd' ioctl arg.yokota1998-09-261-2/+3
| | | | | - Fix some external function declaration. Submitted by: bde
* Fix and update for VESA BIOS support in syscons.yokota1998-09-231-2/+2
| | | | | | | | | | | | | | | | - Handle pixel (raster text) mode properly. - Clear screen and paint border right. - Paint text attribute (colors). - Fix off-by-one errors. - Add some sanity checks. - Fix some function prototypes. - Add some comment lines. - Define generic text mode numbers so that the user can just give "80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol' to change the current video mode. `vidoio.c' and `vesa.c' will map these numbers to real video mode numbers appropriate and available with the given video hardware. I believe this will be useful to make syscons more portable across archtectures.
* Add VESA support to syscons.sos1998-09-151-30/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Kazu writes: The VESA support code requires vm86 support. Make sure your kernel configuration file has the following line. options "VM86" If you want to statically link the VESA support code to the kernel, add the following option to the kernel configuration file. options "VESA" The vidcontrol command now accepts the following video mode names: VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600 The VESA_800x600 mode is a raster display mode. The 80x25 text will be displayed on the 800x600 screen. Useful for some laptop computers. vidcontrol accepts the new `-i <info>' option, where <info> must be either `adapter' or `mode'. When the `-i adapter' option is given, vidcontrol will print basic information (not much) on the video adapter. When the `-i mode' option is specified, vidcontrol will list video modes which are actually supported by the video adapter. Submitted by: Kazutaka YOKOTA yokota@FreeBSD.ORG
* 1. Reorganized screen saver related code so that both the LKM screenyokota1998-08-031-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | saver and splash screen can all work properly with syscons. Note that the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it requires additional code from msmith. - Reorganized the splash screen code to match the latest development in this area. - Delay screen switch in `switch_scr()' until the screen saver is stopped, if one is running, - Start the screen saver immediately, if any, when the `saver' key is pressed. (There will be another commit for `kbdcontrol' to support this keyword in the keymap file.) - Do not always stop the screen saver when mouse-related ioctls are called. Stop it only if the mouse is moved or buttons are clicked; don't stop it if any other mouse ioctls are called. 2. Added provision to write userland screen savers. (Contact me if you are interested in writing one.) - Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to support userland screen savers. 3. Some code clean-ups.
* - Add new bell types: "quiet.normal" and "quiet.visual".yokota1998-08-031-1/+2
| | | | | | | | | | | | When bell is of "quiet" types, the console won't ring (or flush) if the ringing process is in a background vty. PR: i386/2853 - Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and duration are set in hertz and msecs by kbdcontrol(1). There will be a corresponding kbdcontrol patch. PR: bin/6037 Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
* Add support for VESA mode 0x102 (800x600x4) in syscons. You can activatephk1998-02-121-2/+2
| | | | | | | | | | | | this using option "-b" to the boot blocks. It is smartest to compile a font into your kernel (See LINT), but not mandatory, but apart from the cursor you will see nothing on the screen until you load a font. This mode allows XF86_VGA16 to run in 800x600 mode on otherwise unsupported graphics hardware. A number of buglets in the cursor handling in syscons may become visible this way.
* Make comp_vgaregs() less strict about VGA register values whenyokota1997-11-211-1/+2
| | | | | | | | | | | | | | | checking the BIOS video mode paramter table. Now syscons uses the parameter table even if some bits in the table are different from the current VGA register settings. Even if comp_vgaregs() finds that the BIOS video parameter table looks totally unfamiliar to it, syscons allows the user to change the current video mode to some modes which are based on the VGA 80x25 mode. They are VGA 80x30, VGA 80x50, VGA 80x60. In this case the user will be warned, during boot, that video mode switching is only paritally supported on his machine. PR: bin/4477
* Reject unreasonable values passed to CONS_HISTORY ioctl. It did notyokota1997-10-231-5/+1
| | | | | | | | | | | | | | | | | | | check the value and caused kernel panic when a large value was given. - Move the configuration option SC_HISTORY_SIZE from syscons.h to syscons.c. - Define the maximum total number of history lines of all consoles. It is SC_HISTORY_SIZE*MAXCONS or 1000*MAXCONS; whichever is larger. CONS_HISTORY will allow the user to set the history size up to SC_HISTORY_SIZE unconditionally (or the current height of the console if it is larger than SC_HISTORY_SIZE). If the user requests a larger buffer, it will be granted only if the total number of all allocated history lines and the requested number of lines won't exceed the maximum. - Don't free the previous history buffer and leave the history buffer pointer holding a invalid pointer. Set the pointer to NULL first, then free the buffer. PR: bin/4592
* Add a new keyboard mode K_CODE. Returns a single byte for each keysos1997-10-011-9/+10
| | | | | | | | much like the scancode mode. However the keys that (for no good reason) returns extension codes etc, are translated into singlebyte codes. Needed by libvgl. This makes life ALOT easier, also the XFree86 folks could use this.
* Add a new compile option SC_HISTORY_SIZE to specify the history bufferyokota1997-09-041-2/+5
| | | | | | | | | | | | size in terms of lines (instead of bytes). When changing video mode in ioctl SW_XXX commands, syscons checks scp->history_size and allocate a history buffer at least as large as the new screen size. (This was unnecessary before, because HISTORY_SIZE was as large as 100 lines and this is bigger than the maximum screen size: 60 lines). Similar adjustment is done in ioctl CONS_HISTORY command too. PR: kern/4169 Reviewed by: sos
* Removed unused misplaced definition of TIMER_FREQ.bde1997-08-251-3/+2
| | | | Use less-magic numbers in the definition of HISTORY_SIZE.
* Screen saver related fixes.yokota1997-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add new interface, add_scrn_saver()/remove_scrn_saver(), to declare loading/unloading of a screen saver. The screen saver calls these functions to notify syscons of loading/unloading events. It was possible to load multiple savers each of which will try to remember the previous saver in a local variable (`old_saver'). The scheme breaks easily if the user load two savers and unload them in a wrong order; if the first saver is unloaded first, `old_saver' in the second saver points to nowhere. Now only one screen saver is allowed in memory at a time. Soeren will be looking into this issue again later. syscons is becoming too heavy. It's time to cut things down, rather than adding more... 2. Make scrn_timer() to be the primary caller of the screen saver (*current_saver)(). scintr(), scioctl() and ansi_put() update `scrn_time_stamp' to indicate that they want to stop the screen saver. There are three exceptions, however. One is remove_scrn_saver() which need to stop the current screen saver if it is running. To guard against scrn_timer() calling the saver during this operation, `current_saver' is set to `none_saver' early. The others are sccngetc() and sccncheckc(); they will unblank the screen too. When the kernel enters DDB (via the hot key or a break point), the screen saver will be stopped by sccngetc(). However, we have a reentrancy problem here. If the system has been in the middle of the screen saver... (The screen saver reentrancy problem has always been with sccnputc() and sccngetc() in the -current source. So, the new code is doing no worse, I reckon.) 3. Use `mono_time' rather than `time'. 4. Make set_border() work for EGA and CGA in addition to VGA. Do nothing for MDA. Changes to the LKM screen saver modules will follow shortly. YOU NEED TO RECOMPILE BOTH SCREEN SAVERS AND KERNEL AS OF THESE CHANGES. Reviewed by: sos and bde
* A fix/work-around for ThinkPad 535.yokota1997-06-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new configuration flag, KBD_NORESET (0x20) to tell scprobe() not to reset the keyboard. IBM ThinkPad 535 has the `Fn' key with which the user can perform certain functions in conjunction with other keys. For example, `Fn' + PageUP/PageDOWN adjust speaker volume, `Fn' + Home/End change brightness of LCD screen. It can also be used to suspend the system. It appears that these functions are implemented at the keyboard level or the keyboard controller level and totally independent from BIOS or OS. But, if the keyboard is reset (as is done in scprobe()), they become unavailable. (There are other laptops which have similar functions associated with the `Fn' key. But, they aren't affected by keyboard reset.) ThinkPad 535 doesn't have switches or buttons to adjust brightness and volume, or to put the system into the suspend mode. Therefore, it is essential to preserve these `Fn' key functions in FreeBSD. The new flag make scprobe() skip keyboard reset. If this flag is not set, scprobe() behaves in the same say as before. (If we only knew a way to detect ThinkPad 535, we could skip keyboard reset automatically, but...)
* 1) font loading (two fixes)yokota1997-05-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an ioctl command SW_XXXX is issued, scioctl() checks if the font appropriate for the specified mode is already loaded. The check was correctly done for 8 line and 16 line fonts, but not for 14 line font. The symbols FONT_8, FONT_14 and FONT_16 were defined as numbers but were sometimes treated as bit flags. They are now defined as bit flags. 2) screen blinking (two fixes) Removed a redundant call to timeout() in do_bell(). Don't let blink_screen() write to the video buffer if the screen is in the graphics (UNKNOWN) mode. 3) screen saver timeout The ioctl command CONS_BLANKTIME sets the screen saver's timeout. The value of zero will disable the screen saver. If the screen saver is currently running it should be stopped. 4) border color and destructive cursor (two fixes) The border color and the cursor type can be changed via escape sequences. But only VGA can change the border color and set the cursor type to destructive (CHAR_CURSOR) in the current syscons. scan_esc() failed to check this. Reviewed by: sos
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Add save/restore cursor as pr SCO screen(HW) manpage.sos1997-01-231-0/+2
| | | | | | | | Fix ESC[2J to not move cursor home Clear mouse cutmarking on more cases. Minor changes by me. Submitted by: ache
* Upgrade the kbdio rutines to provide queued kbd & mouse events.sos1997-01-151-2/+2
| | | | | | Minor other updates to syscons by me. Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
OpenPOWER on IntegriCloud