summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
Commit message (Collapse)AuthorAgeFilesLines
* Convert files to UTF-8uqs2012-01-1511-11/+11
|
* sc_cngrab: switch to console vty when possibleavg2011-12-211-0/+7
| | | | | | | | | | | In the future we may want to perform the switch even if the console is currently in the graphics mode by trying to reset the video adapter first (e.g. by executing vesa/vga bios post). That would probably require some sort of a one-way flag as returning the control of the console back to the interrupted application most likely would result in a mess. Reviewed by: emaste MFC after: 2 months
* syscons: provide a first iteration of cngrab/cnungrab implementationavg2011-12-172-19/+37
| | | | | | | | | | - put underlying keyboard(s) into the polling mode for the whole duration of the grab, instead of the previous behavior of going into and out of the polling mode around each polling attempt - ditto for setting K_XLATE mode and enabling a disabled keyboard Inspired by: bde MFC after: 2 months
* kern cons: introduce infrastructure for console grabbing by kernelavg2011-12-171-0/+12
| | | | | | | | | | | | At the moment grab and ungrab methods of all console drivers are no-ops. Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended). Inspired by: bde MFC after: 2 months
* syscons: make sc_puts static as it is used only privatelyavg2011-12-112-2/+2
| | | | | | | Perhaps sc_puts should also be renamed to scputs to follow the implied naming conventions in the file... MFC after: 2 weeks
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-2/+2
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Add a few improvements to utf-8 -> cp436 console maprmh2011-10-281-5/+15
| | | | | | | | | | | | | | (mostly with Catalan characters in mind, but it probably benefits other languages). The new mappings are as follows: ▮ -> █ ÀÈÍÏÓÒÚ -> AEIIOOU ŀ / Ŀ -> l / L Reviewed by: ed Approved by: kib (mentor)
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-162-4/+4
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Add support for alternative break-to-debugger to syscons(4). While mostrwatson2011-08-272-0/+7
| | | | | | | | | | keyboards allow console break sequences (such as ctrl-alt-esc) to be entered, alternative break can prove useful under virtualisation and remote console systems where entering control sequences can be difficult or unreliable. MFC after: 3 weeks Approved by: re (bz)
* Attempt to make break-to-debugger and alternative break-to-debugger morerwatson2011-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accessible: (1) Always compile in support for breaking into the debugger if options KDB is present in the kernel. (2) Disable both by default, but allow them to be enabled via tunables and sysctls debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. (3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue to behave as before -- only now instead of compiling in break-to-debugger support, they change the default values of the above sysctls to enable those features by default. Current kernel configurations should, therefore, continue to behave as expected. (4) Migrate alternative break-to-debugger state machine logic out of individual device drivers into centralised KDB code. This has a number of upsides, but also one downside: it's now tricky to release sio spin locks when entering the debugger, so we don't. However, similar logic does not exist in other device drivers, including uart. (5) dcons requires some special handling; unlike other console types, it allows overriding KDB's own debugger selection, so we need a new interface to KDB to allow that to work. GENERIC kernels in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz)
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.ed2011-07-171-0/+2
| | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway.
* Fix whitespace inconsistencies in the TTY layer and its drivers owned by me.ed2011-06-261-2/+2
|
* Move VT switching hack for suspend/resume from bus drivers to syscons.cjkim2011-05-092-17/+82
| | | | | | using event handlers. A different version was Submitted by: Taku YAMAMOTO (taku at tackymt dot homeip dot net)
* Rename a variable to match scvidctl.c.jkim2010-11-301-11/+11
|
* Stop hardcoding default font size.jkim2010-11-301-1/+1
|
* Clean up code a bit to make it more readable.jkim2010-11-301-42/+40
|
* Clean up code a bit to make it more readable.jkim2010-11-291-18/+9
|
* Honor font size for the video mode when default fonts are compiled in kerneljkim2010-11-291-9/+35
| | | | and VESA mode is enabled from loader.
* Fix typos.brucec2010-11-091-3/+3
| | | | | PR: bin/148894 Submitted by: olgeni
* Explicitly tell the compiler that we don't care about the return valuerpaulo2010-10-131-11/+11
| | | | of kbdd_ioctl().
* Rework r210248. Although it fixed most of problems, it did not fix onejkim2010-09-171-7/+4
| | | | | | | | | particular edge case where X-axis resolution is not multiple of font width. Now we just advance enough scan lines, then deduct a partial scan line. It is more intuitive than the previous code. Apply the same wisdom to EGA and VGA planar renderers for consistency. Reported by: David DEMELIER (demelier dot david at gmail dot com)
* Improve style slightly.jkim2010-07-191-47/+50
|
* Fix two long-standing line wrapping bugs in VGA renderer for pixel mode.jkim2010-07-191-2/+3
| | | | | | | Font size may be smaller than 16 and logical scan line may be larger than the displayed scan line. MFC after: 3 days
* Suspend screen updates when the video controller is powered down.jkim2010-05-222-2/+3
|
* Correct beastie_saver module name.jkim2010-04-071-0/+4
|
* Add the official FreeBSD logo image file for logo_saver.jkim2010-04-071-350/+833
|
* Copy Beastie image file to prepare for an official logo image.jkim2010-04-071-0/+358
|
* Refine r204265. We want the standard VGA palette for packed pixel mode.jkim2010-03-292-4/+4
|
* Align memory access of 24-bit pixel renderer to word boundary.jkim2010-03-241-2/+7
|
* Separate 24-bit pixel draw from 32-bit case. Although it is slower, we dojkim2010-03-231-1/+4
| | | | not want to write a useless zero to inaccessible memory region.
* Improve VESA mode switching via loader tunable `hint.sc.0.vesa_mode'.jkim2010-02-243-64/+123
| | | | The most notable change is history buffer is fully saved/restored now.
* Yet another attempt to make palette loading more safer:jkim2010-02-233-6/+29
| | | | | | | | | - Add a separate palette data for 8-bit DAC mode when SC_PIXEL_MODE is set and fill it up with default gray-scale palette data for text. Now we don't have to set `hint.sc.0.vesa_mode' to get the default palette data. - Add a new adapter flag, V_ADP_DAC8 to track whether the controller is using 8-bit palette format and load correct palette when switching modes. - Set 8-bit DAC mode only for non-VGA compatible graphics mode.
* The New and Improved snake_server - Service Pack 1: now even moreivoras2010-02-231-1/+1
| | | | sensitive to load average variations!
* Upgrade the "snake" syscons screensaver to the new, multimedia version!ivoras2010-02-231-6/+49
| | | | | | Now, with color! And system load averages! Amused by it: gnn
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.rnoland2009-12-291-2/+3
| | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime...
* Include <sys/ttydefaults.h>, instead of doing it through <sys/termios.h>.ed2009-11-281-0/+1
| | | | I want to prevent the header polution of <sys/termios.h> eventually.
* Fix pgsignal() call after signature change in r199355.kib2009-11-171-1/+5
| | | | | Reported and tested by: bf1783 googlemail com MFC after: 1 month
* Convert syscons on i386 to TERM=xterm.ed2009-11-131-9/+0
| | | | | TEKEN_XTERM is now gone. Because we always use xterm mode now, we only need a TEKEN_CONS25 switch to go back to cons25.
* Switch the default terminal emulation style to xterm for most platforms.ed2009-11-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now syscons(4) uses a cons25-style terminal emulator. The disadvantages of that are: - Little compatibility with embedded devices with serial interfaces. - Bad bandwidth efficiency, mainly because of the lack of scrolling regions. - A very hard transition path to support for modern character sets like UTF-8. Our terminal emulation library, libteken, has been supporting xterm-style terminal emulation for months, so flip the switch and make everyone use an xterm-style console driver. I still have to enable this on i386. Right now pc98 and i386 share the same /etc/ttys file. I'm not going to switch pc98, because it uses its own Kanji-capable cons25 emulator. IMPORTANT: What to do if things go wrong (i.e. graphical artifacts): - Run the application inside script(1), try to reduce the problem and send me the log file. - In the mean time, you can run `vidcontrol -T cons25' and `export TERM=cons25' so you can run applications the same way you did before. You can also build your kernel with `options TEKEN_CONS25' to make all virtual terminals use the cons25 emulator by default. Discussed on: current@
* Allow Syscons terminal emulators to provide function key strings.ed2009-11-113-13/+78
| | | | | | | | | xterm and cons25 have some incompatibilities when it comes to escape sequences for special keys, such as F1 to F12, home, end, etc. Add a new te_fkeystr() that can be used to override the strings. scterm-sck won't do anything with this, but scterm-teken will use teken_get_sequences() to obtain the proper sequence.
* Fix VESA color palette corruption:jkim2009-11-031-0/+3
| | | | | | | | | | | | - VBE 3.0 says palette format resets to 6-bit mode when video mode changes. We simply set 8-bit mode when we switch modes if the adapter supports it. - VBE 3.0 also says if the mode is not VGA compatible, we must use VBE function to save/restore palette. Otherwise, VGA function may be used. Thus, reinstate the save/load palette functions only for non-VGA compatible modes regardless of its palette format. - Let vesa(4) set VESA modes even if vga(4) claims to support it. - Reset default palette if VESA pixel mode is set initially. - Fix more style nits.
* Search for default 800x600 graphics mode from supported VESA mode list.jkim2009-10-231-18/+46
| | | | Many video controllers do not support 800x600x24 mode any more.
* Add support for VT200-style mouse input.ed2009-09-274-9/+65
| | | | | | | | | | | | | | | | | | | Right now if applications want to use the mouse on the command line, they use sysmouse(4) and install a signal handler in the kernel to deliver signals when mouse events arrive. This conflicts with my plan to change to TERM=xterm, so implement proper VT200-style mouse input. Because mouse input is now streamed through the TTY, it means you can now SSH to another system on the console and use the mouse there as well. The disadvantage of the VT200 mouse protocol, is that it doesn't seem to generate events when moving the cursor. Only when pressing and releasing mouse buttons. There are different protocols as well, but this one seems to be most commonly supported. Reported by: Paul B. Mahol <onemda gmail com> Tested with: vim(1)
* Add 256 color support.ed2009-09-261-4/+4
| | | | | | | | | | | | | | It is quite inconvenient that if an application for xterm uses 256 color mode, text suddenly starts to blink (because of ;5; in the middle). We'd better just implement 256 color mode and add a conversion routine from 256 to 8 color mode, which doesn't seem to be too bad in practice. Remapping colors is done quite simple. If one of the channels is most actively represented, primary colors are used. If two channels are most actively represented, secondary colors are used. If all three channels are equal (gray), it picks between black and white. Reported by: Paul B. Mahol <onemda gmail com>
* Just use ttydisc_rint_simple() instead of doing it ourselves.ed2009-09-181-8/+2
| | | | | | | This code seems to do exactly the same as ttydisc_rint_simple() does nowadays. Just remove it. Obtained from: //depot/user/ed/newcons/sys/dev/syscons/syscons.c
* Make sure we never place the cursor outside the screen.ed2009-09-131-3/+6
| | | | | | | | | | For some vague reason, it may be possible that scp->cursor_pos exceeds scp->ysize * scp->xsize. This means that teken_set_cursor() may get called with an invalid position. Just ignore the old cursor position in this case. Reported by: Paul B. Mahol <onemda gmail com> MFC after: 1 month
* Commit a change that I missed in the previous commit.ed2009-09-121-0/+4
| | | | I ran `svn commit' in sys/teken/, instead of sys/.
* Make 8-bit support run-time configurable.ed2009-09-121-0/+3
| | | | | Now to do the same for xterm support. This means people can eventually toy around with xterm+UTF-8 without recompiling their kernel.
* Make use of the more flexable device hints by adding a new field,delphij2009-09-121-2/+3
| | | | vesa_mode to specify VESA mode, as suggested by jhb@.
* Extend the usage of sc(4)'s hint variable 'flag'. Bit 0x80 now meansdelphij2009-09-112-8/+15
| | | | | | | | | | "set vesa mode" and higher 16bits of the flag would be the desired mode. One can now set, for instance, hint.sc.0.flags=0x01680180, which means that the system should set VESA mode 0x168 upon boot. Submitted by: paradox <ddkprog yahoo com>, swell k at gmail.com with some minor changes.
OpenPOWER on IntegriCloud