summaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.h
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/6.3.0_cvscvs2svn2008-01-151-1/+1
| | | | | | 'RELENG_6_3_0_RELEASE'. This commit was manufactured to restore the state of the 6.3-RELEASE image.
* MFC: syscons.c rev. 1.453 and syscons.h rev. 1.88Hidetoshi Shimokawa2007-10-251-0/+4
| | | | | | | Serialize output routine of terminal emulator (te_puts()) by a lock. Notes: svn path=/stable/6/; revision=172949
* MFC: creator.c 1.9, fbreg.h 1.19, gfb.c 1.8, machfb.c 1.4,Marius Strobl2005-10-051-4/+6
| | | | | | | | | | | | | | | | | | ofw_syscons.c 1.9, s3_pci.c 1.10, scgfbrndr.c 1.23, scmouse.c 1.40, scvgarndr.c 1.20, scvidctl.c 1.37, syscons.c 1.439, syscons.h 1.85, tga.c 1.8, vesa.c 1.52, vga.c 1.35 Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t and do some preparations for handling 12x22 fonts (currently lots of code implies and/or hardcodes a font width of 8 pixels). This will be required on sparc64 which uses a default font size of 12x22 in order to add font loading and saving support as well as to use a syscons(4)-supplied mouse pointer image. Approved by: re (scottl) Notes: svn path=/stable/6/; revision=150981
* MFC:Craig Rodrigues2005-09-021-3/+4
| | | | | | | | | | | | | | Prevent division by zero errors in sc_mouse_move() by explicitly setting sc->font_width, in the same places where sc->font_size is set, instead of relying on the default initialized value of 0 for sc->font_width. PR: kern/84836 Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru> Approved by: re (scottl) Notes: svn path=/stable/6/; revision=149721
* Add VESA mode support for syscons, which enables the support of 15, 16,Xin LI2005-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 24, and 32 bit modes. To use that, syscons(4) must be built with the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a. vesa.ko) must be either loaded, or be compiled into the kernel. Do not return EINVAL when the mouse state is changed to what it already is, which seems to cause problems when you have two mice attached, and applications are not likely obtain useful information through the EINVAL caused by showing the mouse pointer twice. Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is the video mode number from the vidcontrol -i mode output. Also, revert the video mode if something fails. Obtained from: DragonFlyBSD Discussed at: current@ with patch attached [1] PR: kern/71142 [2] Submitted by: Xuefeng DENG <dsnofe at msn com> [1], Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2] Notes: svn path=/head/; revision=146736
* On sparc64 use 'syscons' rather than 'sc' for SC_DRIVER_NAME soMarius Strobl2005-05-211-0/+8
| | | | | | | | | | syscons(4) and its pseudo-devices don't get confused (including by other device drivers) with the system controller devices which are also termed 'sc' in the OFW tree (and which we probably want to interface with hwpmc(4) one day). Notes: svn path=/head/; revision=146477
* Change a directory layout for pc98.Yoshihiro Takahashi2005-05-101-1/+1
| | | | | | | | | | | | - Move MD files into <arch>/<arch>. - Move bus dependent files into <arch>/<bus>. Rename some files to more suitable names. Repo-copied by: peter Discussed with: imp Notes: svn path=/head/; revision=146049
* Avoid casts as lvalues.Alexander Kabaev2004-07-281-1/+1
| | | | Notes: svn path=/head/; revision=132772
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPPoul-Henning Kamp2004-07-151-0/+2
| | | | | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything". Notes: svn path=/head/; revision=132199
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-2/+2
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* - Add a font width field to struct scr_stat. Use this instead of '8'.Jake Burkholder2003-08-241-0/+1
| | | | | | | | - Use the values in the video info for the font size and width instead of second guessing. Notes: svn path=/head/; revision=119388
* Add sparc64 ifdefs.Jake Burkholder2003-08-241-0/+2
| | | | Notes: svn path=/head/; revision=119379
* Add a VT_LOCKSWITCH ioctl that disallows vty switching. SomethingDima Dorfman2002-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 Notes: svn path=/head/; revision=99704
* Turn on TGA support.David E. O'Brien2002-04-131-2/+9
| | | | | | | Submitted by: Andrew M. Miklic <AndrwMklc@cs.com> Notes: svn path=/head/; revision=94617
* KSE Milestone 2Julian Elischer2001-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 Notes: svn path=/head/; revision=83366
* Fix some malformed macro concatenation that gcc-3 has objections about.Peter Wemm2001-09-101-4/+4
| | | | Notes: svn path=/head/; revision=83274
* Refine cursor type/shape control escape sequences andKazutaka YOKOTA2001-08-021-4/+16
| | | | | | | | | | ioctls. We can now add ve, vi and vs capabilities to cons25 in termcap. Discussed with and tested by: ache Notes: svn path=/head/; revision=81030
* Fix dependencies between kernel options:Kazutaka 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 Notes: svn path=/head/; revision=79534
* Remove the resume method. It is not necessary any more, becauseKazutaka YOKOTA2001-06-301-1/+0
| | | | | | | | keyboard drivers have it now... MFC after: 4 weeks Notes: svn path=/head/; revision=79023
* Don't free buffers we didn't allocate.Kazutaka YOKOTA2001-06-291-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=78956
* With this commit, I hereby pronounce gensetdefs past its use-by date.Peter Wemm2001-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 Notes: svn path=/head/; revision=78161
* Make the beep duration independent of HZ.Poul-Henning Kamp2001-05-281-1/+1
| | | | | | | | | PR: 25201 Submitted by: Akio Morita amorita@meadow.scphys.kyoto-u.ac.jp MFC after: 1 week Notes: svn path=/head/; revision=77364
* Implement keyboard pasteAndrey A. Chernov2001-03-111-0/+2
| | | | | | | | PR: 25499 Submitted by: Gaspar Chilingarov <nm@web.am> Notes: svn path=/head/; revision=74118
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-2/+2
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-2/+2
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Unbreak LINT.Kazutaka YOKOTA2000-04-031-0/+4
| | | | Notes: svn path=/head/; revision=58965
* - Fix SC_ALT_MOUSE_IMAGE; don't blink the mouse cursor.Kazutaka YOKOTA2000-03-311-13/+26
| | | | | | | - Fix non-destructive, underline text cursor. Notes: svn path=/head/; revision=58872
* 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/+0
| | | | | | | | | | 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-64/+158
| | | | | | | | | | | | | | | | | | - 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
* Make the mouse cursor char code configurable via the CONS_MOUSECTLKazutaka YOKOTA2000-01-121-0/+6
| | | | | | | | | ioctl. By popular demand. Notes: svn path=/head/; revision=55849
* This patch clears the way for removing a number of tty relatedPoul-Henning Kamp1999-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 Notes: svn path=/head/; revision=51654
* - Hang the scr_stat struct from dev_t.Kazutaka 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! Notes: svn path=/head/; revision=51404
* - Preserve the content of the back scroll buffer when changing theKazutaka YOKOTA1999-09-191-0/+1
| | | | | | | | | | video mode. Requested by: a lot of people. PR: kern/13764 Notes: svn path=/head/; revision=51394
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-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(). Notes: svn path=/head/; revision=50254
* First small steps at merging DEVFS and PHK's Dev_t stuff.Julian Elischer1999-08-201-2/+5
| | | | Notes: svn path=/head/; revision=50092
* - Fixed memory leak in sc_alloc_history_buffer().Kazutaka 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 Notes: svn path=/head/; revision=48667
* Fix ESC[P (delete N chars) and ESC[@ (insert N chars). These deletionKazutaka YOKOTA1999-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 Notes: svn path=/head/; revision=48189
* The second phase of syscons reorganization.Kazutaka 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. Notes: svn path=/head/; revision=48104
* Centralize and reorganize a few macros.Dag-Erling Smørgrav1999-04-121-5/+1
| | | | Notes: svn path=/head/; revision=45616
* sysconsKazutaka YOKOTA1999-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 Notes: svn path=/head/; revision=42831
* The first stage of console driver reorganization: activate newKazutaka YOKOTA1999-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. Notes: svn path=/head/; revision=42504
* Yet another round of fixes for the VESA support code.Kazutaka 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. Notes: svn path=/head/; revision=39858
* Fix destructive cursor shape after text mode switch.Andrey A. Chernov1998-09-291-1/+2
| | | | | | | This is only for standard modes, I don't check vesa modes yet. Notes: svn path=/head/; revision=39742
* - Use `u_long cmd' ioctl arg.Kazutaka YOKOTA1998-09-261-2/+3
| | | | | | | | - Fix some external function declaration. Submitted by: bde Notes: svn path=/head/; revision=39667
* Fix and update for VESA BIOS support in syscons.Kazutaka 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. Notes: svn path=/head/; revision=39591
* Add VESA support to syscons.Søren Schmidt1998-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 Notes: svn path=/head/; revision=39287
* 1. Reorganized screen saver related code so that both the LKM screenKazutaka YOKOTA1998-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. Notes: svn path=/head/; revision=38052
* - Add new bell types: "quiet.normal" and "quiet.visual".Kazutaka 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) Notes: svn path=/head/; revision=38043