aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/7.0.0_cvscvs2svn2008-02-2427-27/+27
| | | | | | 'RELENG_7_0_0_RELEASE'. This commit was manufactured to restore the state of the 7.0-RELEASE image.
* MFC rev. 1.457:Konstantin Belousov2008-01-281-0/+2
| | | | | | | | | | Do not dereference NULL scp in the case the screen is not opened. Instead, return ENXIO to the ioctl caller. Approved by: re (kensmith) Notes: svn path=/releng/7.0/; revision=175755
* Serialize output routine of terminal emulator (te_puts()) by a lock.Hidetoshi Shimokawa2007-09-202-1/+14
| | | | | | | | | | | | | | | | | - The output routine of low level console is not protected by any lock by default. - Increment and decrement of sc->write_in_progress are not atomic and this may cause console hang. - We also have many other states used by emulator that should be protected by the lock. - This change does not fix interspersed messages which PRINTF_BUFR_SIZE kernel option should fix. Approved by: re (bmah) MFC after: 1 week Notes: svn path=/head/; revision=172250
* Fix a bug that will cause a process that calls the VT_WAITACTIVE ioctlJoe Marcus Clarke2007-09-191-2/+1
| | | | | | | | | | | | | | to become unkillable when that process is sent a termination signal. The process will sit in waitvt looping in the kernel, and chewing up all available CPU until the system is rebooted. Submitted by: Jilles Tjoelker <jilles@stack.nl> Reviewed by: bde Approved by: re (kensmith) MFC after: 1 week Notes: svn path=/head/; revision=172238
* According to the default font size on sparc64 provide a 12 x 22Marius Strobl2007-06-181-1/+32
| | | | | | | | | | | mouse pointer instead of a 8 x 16 one so device drivers don't need to bring there own one there and in gfb_mouse() (ab)use the pixel_mask argument of putm() to pass along on/off info as erasing the mouse cursor image by redrawing the text underneath doesn't work as we use hardware cursors on sparc64. Notes: svn path=/head/; revision=170932
* - Change comments and asserts to reflect the removal of the globalJeff Roberson2007-06-041-2/+2
| | | | | | | | | | | scheduler lock. Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each) Notes: svn path=/head/; revision=170305
* Make the comparsion more obvious.Xin LI2007-05-251-1/+2
| | | | Notes: svn path=/head/; revision=169983
* Optimize set_origin() use in some screensavers to stop them eatingPhilip Paeps2007-02-214-12/+40
| | | | | | | | | | | cpu power when the origin hasn't changed. PR: kern/100683 Submitted by: Gareth McCaughan <gareth -dot- mccaughan -at- pobox.com> MFC after: 3 days Notes: svn path=/head/; revision=166868
* Correct the VGA_NO_MODE_CHANGE end marker comment.Marius Strobl2007-01-101-1/+1
| | | | Notes: svn path=/head/; revision=165927
* Replace magic numbers for console bell types with defines.Ruslan Ermilov2006-11-161-2/+2
| | | | Notes: svn path=/head/; revision=164333
* Sometimes the vty switching has to be delayed; the vtyRuslan Ermilov2006-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | to be switched to is saved in sc->delayed_next_scr and the actual switch is performed later. It was possible to get into the endless loop when attempting to switch to a closed vty (which is not allowed and beep-alerted when attempted) and when the visual beep was in effect. This caused sc->delayed_next_scr to never be reset and endless attempts to switch to a closed vty and endless visual beeping. How to repeat: - boot into single-user - run "kbdcontrol -b visual" - quickly press Alt+F2 two times PR: kern/68016 X-MFC after: 6.2-RELEASE Notes: svn path=/head/; revision=164050
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-062-3/+6
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* Fix our ioctl(2) implementation when the argument is "int". NewRuslan Ermilov2006-09-272-7/+108
| | | | | | | | | | | | | | | | ioctls passing integer arguments should use the _IOWINT() macro. This fixes a lot of ioctl's not working on sparc64, most notable being keyboard/syscons ioctls. Full ABI compatibility is provided, with the bonus of fixing the handling of old ioctls on sparc64. Reviewed by: bde (with contributions) Tested by: emax, marius MFC after: 1 week Notes: svn path=/head/; revision=162711
* Introduce a spinlock for synchronizing access to the video output hardwareScott Long2006-09-133-19/+38
| | | | | | | | | | | | in syscons. This replaces a simple access semaphore that was assumed to be protected by Giant but often was not. If two threads that were otherwise SMP-safe called printf at the same time, there was a high likelyhood that the semaphore would get corrupted and result in a permanently frozen video console. This is similar to what is already done in the serial console drivers. Notes: svn path=/head/; revision=162285
* Convert to new console apiPoul-Henning Kamp2006-05-261-19/+11
| | | | Notes: svn path=/head/; revision=158960
* GC the cn_dbctl_t hook for consoles, it is unused.Poul-Henning Kamp2006-05-261-33/+1
| | | | | | | | | | This used to make syscons switch to vty0 when we entered DDB but this was lost in the KDB shuffle. We may want to bring it back down the road but it should be done by calling cn_init_t/cn_term_t instead, possibly with a flag argument saying "Debugger!" Notes: svn path=/head/; revision=158941
* APM was calling the suspend process from a timeout. This meant thatWarner Losh2006-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | other timeouts could not happen while suspending, including timeouts for things like msleep. This caused the system to hang on suspend when the cbb was enabled, since its suspend path powered down the socket which used a timeout to wait for it to be done. APM now creates a thread when it is enabled, and deletes the thread when it is disabled. This thread takes the place of the timeout by doing its polling every ~.9s. When the thread is disabled, it will wakeup early, otherwise it times out and polls the varius things the old timeout polled (APM events, suspend delays, etc). This makes my Sony VAIO 505TS suspend/resume correctly when APM is enabled (ACPI is black listed on my 505TS). This will likely fix other problems with the suspend path where drivers would sleep with msleep and/or do other timeouts. Maybe there's some special case code that would use DELAY while suspending and msleep otherwise that can be revisited and removed. This was also tested by glebius@, who pointed out that in the patch I sent him, I'd forgotten apm_saver.c MFC After: 3 weeks Notes: svn path=/head/; revision=158922
* Send the pcvt(4) driver off to retirement.Poul-Henning Kamp2006-05-171-1/+0
| | | | Notes: svn path=/head/; revision=158687
* Check the return code of sc_clean_up() in the only place where itGiorgos Keramidas2006-05-121-1/+3
| | | | | | | | | | | | was not checked at all. There is only one case when sc_clean_up() can fail, because of wait_scrn_saver_stop(), but it doesn't hurt to check anyway. Reviewed by: rodrigc Found by: Coverity Prevent Notes: svn path=/head/; revision=158503
* Remove various bits of conditional Alpha code and fixup a few comments.John Baldwin2006-05-123-18/+4
| | | | Notes: svn path=/head/; revision=158471
* Integrate kbdmux(4) into syscons(4) and kbd code.Maksim Yevmenkin2006-02-281-4/+42
| | | | | | | | | | | | | | | | | | | | | | | By default syscons(4) will look for the kbdmux(4) keyboard first, and then, if not found, look for any keyboard. Current kbd code is modified so if kbdmux(4) is the current keyboard, all new keyboards are automatically added to the kbdmux(4). Switch to kbdmux(4) can be done at boot time, by loading kbdmux module at the loader prompt, or at runtime, by kldload'ing the kbdmux module and releasing current active keyboard. If, for whatever reason, kbdmux(4) is not required/desired then just do not load it and everything should work as before. It is also possible to kldunload kbdmux at runtime and syscons(4) will automatically switch to the first available keyboard. No response from: freebsd-current@ MFC after: 1 day Notes: svn path=/head/; revision=156126
* When SC_DISABLE_KDBKEY or SC_DISABLE_REBOOT are not defined allow theBrooks Davis2006-01-141-4/+25
| | | | | | | | | | | | | | | same behavior to be controlled by the sysctls, hw.syscons.kbd_kbdkey and hw.syscons.kbd_reboot respectively. Apologies to the submitter for taking so long to commit this simple change. PR: kern/72728 Submitted by: Luca Morettoni <morettoni at libero dot it> MFC After: 3 days Notes: svn path=/head/; revision=154369
* Fix -Wundef.Ruslan Ermilov2005-12-045-8/+8
| | | | Notes: svn path=/head/; revision=153072
* Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_tMarius Strobl2005-09-286-26/+31
| | | | | | | | | | | | | | | | | | | 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. This API breakage is committed now so it can be MFC'ed in time for 6.0 and later on upcoming framebuffer drivers destined for use on sparc64 and which are expected to rely on using font loading internally and on a syscons(4)-supplied mouse pointer image can be easily MFC'ed to RELENG_6 rather than requiring a backport. Tested on: i386, sparc64, make universe MFC after: 1 week Notes: svn path=/head/; revision=150686
* In set_mouse_pos(), try to avoid division by zero errors.Craig Rodrigues2005-09-071-1/+2
| | | | Notes: svn path=/head/; revision=149855
* In sc_set_text_mode(), reset fontwidth if it is <= 0.Craig Rodrigues2005-09-061-0/+2
| | | | | | | | | | | Eliminates division by zero errors in syscons driver. Reported by: keramida, Slawa Olhovchenkov <slw at zxy dot spb dot ru>, Kyryll Mirnenko <mirya at matrix dot kiev dot ua> Tested by: keramida, rodrigc Notes: svn path=/head/; revision=149828
* Prevent division by zero errors in sc_mouse_move()Craig Rodrigues2005-08-305-14/+17
| | | | | | | | | | | | | 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> MFC after: 2 days Notes: svn path=/head/; revision=149640
* kbdmux(4) keyboard multiplexer integrationMaksim Yevmenkin2005-07-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | o Add two new ioctl's KBADDKBD and KBRELKBD. These are used to add and remove keyboard to (and from) kbdmux(4) keyboard multiplexer; o Introduce new kbd_find_keyboard2() function. It does exactly the same job as kbd_find_keyboard() function except it allows to specify starting index. This function can be used to iterate over keyboards array; o Re-implement kbd_find_keyboard() as call to kbd_find_keyboard2() with starting index of zero; o Make sure syscons(4) passed KBADDKBD and KBRELKBD ioctl's onto currently active keyboard. These changes should not have any visible effect. MFC after: 1 week Notes: svn path=/head/; revision=147980
* Fix syscons on amd64. The SC_PIXEL_MODE commit from May 29th added a newPeter Wemm2005-06-142-4/+4
| | | | | | | | | | | | | | | function pointer to the vga render dispatch table and initialized it with vga_nop. The problem is that vga_nop() is a varargs function, and the table declares a non-varargs function pointer. On amd64 (and I think ppc), mixing varargs and non-varargs function pointers is fatal. Change vga_nop() and gfb_nop() from varargs to non-varargs do-nothing functions. This stops the stack corruption that only happened on amd64. Approved by: re (scottl) Notes: svn path=/head/; revision=147358
* Only set mode when the incoming ioctl is IOC_VOID, until we have betterXin LI2005-06-101-1/+3
| | | | | | | | | | solution against the ioctl collisions. Submitted by: Antoine Brodin <antoine.brodin at laposte net> PR: kern/81867 Notes: svn path=/head/; revision=147224
* Fix LINT by defining vga_pxlmouse_planar and vga_pxlmouse_direct.Scott Long2005-05-301-1/+2
| | | | Notes: svn path=/head/; revision=146811
* Deny to switch into banked video mode when it is not available. SomeXin LI2005-05-301-1/+2
| | | | | | | | | users has reported corrupted display with old video cards. Submitted by: Michal Mertl <mime traveller cz> Notes: svn path=/head/; revision=146800
* Add vr_init_t member to sc_rndr_sw_t instances in order to unbreakMarius Strobl2005-05-291-0/+3
| | | | | | | compilation after sys/dev/syscons/syscons.h rev. 1.83. Notes: svn path=/head/; revision=146746
* Add VESA mode support for syscons, which enables the support of 15, 16,Xin LI2005-05-296-71/+479
| | | | | | | | | | | | | | | | | | | | | | | | 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
* - Not every architecture defaults to a black background (e.g. sparc64Marius Strobl2005-05-211-9/+9
| | | | | | | | | | uses white) so base the color of the border on SC_NORM_ATTR rather than hardcoding BG_BLACK. - Use SC_DRIVER_NAME rather than hardcoding 'sc' in message strings (see also sys/dev/syscons/syscons.h rev. 1.82). Notes: svn path=/head/; revision=146478
* 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
* Remove superfluous braces and add #ifndef __sparc64__ around theMarius Strobl2005-05-211-18/+41
| | | | | | | | | | | VTB_FRAMEBUFFER specific code. On sparc64 we don't use a buffer of type VTB_FRAMEBUFFER (see syscons.c) and excluding the respective code here allows to compile syscons(4) without isa(4). Requested by: joerg, marcel, yongari Notes: svn path=/head/; revision=146476
* For sparc64 conditionalize the compilation of the gfb_cursor() variantMarius Strobl2005-05-211-4/+1
| | | | | | | | | | which doesn't assume a hardware cursor on __sparc64__ rather than on DEV_CREATOR. If we want to include more than one framebuffer driver in e.g. the GENERIC kernel all drivers have to work the same way. Now that DEV_CREATOR is no longer used remove it from options.sparc64. Notes: svn path=/head/; revision=146472
* Remove old epson note support.Yoshihiro Takahashi2005-05-151-21/+2
| | | | Notes: svn path=/head/; revision=146240
* - Add color tables for 16 colors mode and 8 colors mode, use a differentYoshihiro Takahashi2005-05-151-27/+16
| | | | | | | | table on the pc98 console. - Remove old epson note support. Notes: svn path=/head/; revision=146239
* - Mask an underline attribute on the pc98 console. It enables to use the sameYoshihiro Takahashi2005-05-151-49/+28
| | | | | | | | color on the pc98 and the others. - Remove old epson note support. Notes: svn path=/head/; revision=146238
* Remove the ADJUST_CLOCK ioctl on pc98. It's not used at all.Yoshihiro Takahashi2005-05-151-6/+0
| | | | Notes: svn path=/head/; revision=146235
* 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
* No need to ifdef this pc98.Warner Losh2005-04-041-2/+0
| | | | Notes: svn path=/head/; revision=144619
* Remove debug printout of major/minor numbers, print name instead.Poul-Henning Kamp2005-02-272-4/+4
| | | | Notes: svn path=/head/; revision=142692
* Remove the last vestiges of the userconfig option. None of this actuallyScott Long2004-12-011-1/+1
| | | | | | | did anything, so this commit should be considered a NO-OP. Notes: svn path=/head/; revision=138249
* Add new function ttyinitmode() which sets our systemwide defaultPoul-Henning Kamp2004-10-182-26/+21
| | | | | | | | | | | | | | | | | modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout. Notes: svn path=/head/; revision=136680
* Fix echo in console mode.Poul-Henning Kamp2004-10-142-21/+31
| | | | Notes: svn path=/head/; revision=136505
* Disallow negative coordinates and sizes in the syscons CONS_SCRSHOTJacques Vidrine2004-09-291-2/+4
| | | | | | | | | ioctl. Reported by: Christer Oberg <christer.oberg@deprotect.com> Notes: svn path=/head/; revision=135942
* Implement the KDENABIO etc ioctl's for amd64 as well.Peter Wemm2004-09-241-2/+5
| | | | Notes: svn path=/head/; revision=135693