summaryrefslogtreecommitdiffstats
path: root/sys/dev/vt
Commit message (Collapse)AuthorAgeFilesLines
* Increase vt font limits to allow use of GNU Unifontemaste2015-04-141-2/+2
| | | | | | | PR: 199438 Submitted by: Ting-Wei Lan <lantw44@gmail.com> MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Let unchangeable 8-bit frame buffers have vaguely correct colors.nwhitehorn2015-03-101-2/+20
| | | | MFC after: 2 weeks
* Add support for USB display link adapters to the FB and VT drivers.hselasky2015-03-071-5/+12
| | | | | | | | | | The vtophys() function is used to get the physical page address for the virtually allocated frame buffers when a physically continuous memory area is not available. This change also allows removing the masking of the FB_FLAG_NOMMAP flag in the PS3 syscons driver. The FB and VT drivers were tested using X.org/xf86-video-scfb and syscons.
* vt(4): Add support to "downgrade" from eg. vt_fb to vt_vgadumbbell2015-03-015-26/+120
| | | | | | | | | | | | | | The main purpose of this feature is to be able to unload a KMS driver. When going back from the current vt(4) backend to the previous backend, the previous backend is reinitialized with the special VDF_DOWNGRADE flag set. Then the current driver is terminated with the new "vd_fini" callback. In the case of vt_fb and vt_vga, this allows the former to pass the vgapci device vt_fb used to vt_vga so the device can be rePOSTed. Differential Revision: https://reviews.freebsd.org/D687
* vt: move suspend/resume event handlers registration outside of mutex scopeavg2015-02-161-5/+10
| | | | | | | | | This is to avoid a witness warning about a waiting memory allocation in the evnt hanlder registration code. Reported by: markj MFC after: 3 days X-MFC with: r277795
* Improve vt(4) default mouse pointer image. Previous one looked rather ugly,danfe2015-02-131-28/+34
| | | | | | | | | especially on native monitor resolutions. This one essentially matches X11 default pointer. Differential Revision: https://reviews.freebsd.org/D1801 No objection from: emaste Approved by: adrian, dumbbell
* vtvga: improve the device description.rpaulo2015-02-051-1/+2
|
* Use unsigned int for index value.delphij2015-01-271-5/+8
| | | | | | | | | | | | | | | | | | | | Without this change a local attacker could trigger a panic by tricking the kernel into accessing undefined kernel memory. We would like to acknowledge Francisco Falcon from CORE Security Technologies who discovered the issue and reported to the FreeBSD Security Team. More information can be found at CORE Security's advisory at: http://www.coresecurity.com/content/freebsd-kernel-multiple-vulnerabilities This is an errata candidate for releng/10.1 and releng/9.3. Earlier releases are not affected. Reported by: Francisco Falcon from CORE Security Technologies Security: CVE-2014-0998 Reviewed by: dumbbell MFC after: 3 days
* hook userland threads suspend + resume into acpi suspend codeavg2015-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, split power_suspend into power_suspend and power_suspend_early. power_suspend_early is called before the userland is frozen. power_suspend is called after the userland is frozen. Currently only VT switching is hooked to power_suspend_early. This is needed because switching away from X server requires its cooperation, so obviously X server must not be frozen when that happens. Freezing userland during ACPI suspend is useful because not all drivers correctly handle suspension concurrent with other activity. This is especially applicable to drivers ported from other operating systems that suspend all software activity between placing drivers and hardware into suspended state. In particular drm2/radeon (radeonkms) depends on the described procedure. The driver does not have any internal synchronization between suspension activities and processing of userland requests. Many thanks to kib for the code that allows to freeze and thaw all userland threads. Note that ideally we also need to park / inhibit (non-special) kernel threads as well to ensure that they do not call into drivers. MFC after: 17 days
* vt(4): Use power_{suspend,resume} event handlers to implementavg2015-01-274-15/+60
| | | | | | | | | | | | | | | | suspend/resume The goal is to avoid that the vt(4) resume happens before the video display is resumed. The original patch was provided by Andriy Gapon. This new patch registers the handlers in vt_upgrade(). This is done once, thanks to the VDF_ASYNC flag. I abused this flag because it was already abused by the keyboard allocation. The event handlers then call the backend if it provides callbacks for suspend/resume. Differential Revision: https://reviews.freebsd.org/D1004 On behalf of: dumbbell MFC after: 2 weeks
* Make PS3 work with the userspace kboot loader. loader.ps3 will disappearnwhitehorn2015-01-051-0/+9
| | | | | | from the tree in the near future. Done at: Hackathon
* The "vt_suspend_flush_timer()" function is sometimes called lockedhselasky2015-01-021-1/+10
| | | | | | | | | | | which prevents us from doing a "callout_drain()" call. The callout in question has a lock associated with it and we are not freeing the callout. That means we can use the "callout_stop()" function to atomically stop the callback iff the "callout_stop()" function is called locked. This patch applies proper locking to "callout_stop()" and replaces a "callout_drain()" with a "callout_stop()". MFC after: 1 week
* vt_vga: fix an off-by-one errorroyger2014-12-301-1/+1
| | | | | | This correctly sets the end of the memory region registered by vt_vga. Reported by: marius
* Partially revert "vt: register the memory regions used by the vt drivers"royger2014-12-301-53/+0
| | | | | | | Revert the EFI part of r276064 until I can test it properly on a real EFI system. This was causing problems to people booting using UEFI and vt. Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
* Support ALT_BREAK_TO_DEBUGGER in vt(4)emaste2014-12-272-1/+4
| | | | Submitted by: Andre Albsmeier on -hackers
* vt: register the memory regions used by the vt driversroyger2014-12-222-0/+108
| | | | | | | | | | | | | | | | | Current VT drivers don't register the memory regions they use with the nexus. This patch makes vt_vga and vt_efifb register the memory regions they use. This is needed (at least) for Xen support, since the FreeBSD kernel will try to use the holes in the memory map to map memory from other domains and setup it's grant table. Sponsored by: Citrix Systems R&D Reported by: sbruno Tested by: emaste Reviewed by: ray PR: 195537 Differential Revision: https://reviews.freebsd.org/D1291
* vt(4): Support syscons' SC_HISTORY_SIZE to configure history sizedumbbell2014-11-041-1/+6
| | | | | | | | | | Therefore, to set histry size to 2000 lines, add the following line to your kernel configuration file: options SC_HISTORY_SIZE=2000 The default history remains at 500 lines. MFC after: 1 week
* vt(4): Fix keyboard allocation when kbdmux(4) isn't useddumbbell2014-11-021-1/+1
| | | | | | | | | | The problem was that only the kbdmux keyboard index was saved in vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this case, the keyboard was correctly allocated, but the returned index was discarded. PR: 194718 MFC after: 1 week
* vt(4): Adjust the cursor position after changing the window sizedumbbell2014-11-012-0/+13
| | | | | | | | | | | | | | | | A new terminal_set_cursor() is added: it wraps the existing teken_set_cursor() function. In vtbuf_grow(), the cursor position is adjusted at the end of the function. In vt_change_font(), we call terminal_set_cursor() just after terminal_set_winsize_blank(), while the terminal is mute. This fixes a bug where, after loading a kernel video driver which increases the terminal window size, the cursor remains at its old position, in other words, in the middle of the display content. PR: 194421 MFC after: 1 week
* vt(4): Add PIO_VFONT_DEFAULT ioctl to restore the default builtin fontdumbbell2014-10-231-0/+5
| | | | | | | | | | | | | To restore the default font using vidcontrol(1), use the "-f" flag without an argument: vidcontrol -f < /dev/ttyv0 PR: 193910 Differential Revision: https://reviews.freebsd.org/D971 Submitted by: Marcin Cieslak <saper@saper.info> Reviewed by: ray@, emaste@ Approved by: ray@ MFC after: 1 week
* vt(4): Refuse to load a font if hw.vga.textmode is selecteddumbbell2014-10-201-0/+3
| | | | | | | | Before, the font was loaded and the window size recalculated, giving an unusable terminal, even if the actual font didn't change. Reported by: beeessdee@ruggedinbox.com MFC after: 3 days
* Do nothing in vt_upgrade if there is no vt driveremaste2014-10-171-0/+2
| | | | | | | | | | | Previously, if no drivers attached at boot we would panic with "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0". PR: 192248 Reviewed by: ray MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D954
* Allow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,ray2014-10-071-0/+7
| | | | | | | | similar as syscons(4) do. Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn> MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* vt(4): Don't recalculate buffer size if we don't know screen sizedumbbell2014-10-041-1/+2
| | | | | | | | | | | | When the screen size is unknown, it's set to 0x0. We can't use that as the buffer size, otherwise, functions such as vtbuf_fill() will fail. This fixes a panic on RaspberryPi, where there's no vt(4) backend configured early in boot. PR: 193981 Tested by: danilo@ MFC after: 3 days
* vt(4): Save/restore keyboard mode & LED states when switching windowdumbbell2014-10-022-36/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | Add new functions to manipulate these mode & state, instead of calling kbdd_ioctl() everyhere. This fixes at least two bugs: 1. The state of the Scroll Lock LED and the state of scroll mode could be out-of-sync. For instance, if one enables scroll mode on window #1 and switches to window #2, the LED would remain on, but the window wouldn't be in scroll mode. Similarily, when switching between a console and an X.Org session, the LED states could be inconsistent with the real state. 2. When exiting from an X.Org session, the user could be unable to type anything. The workaround was to switch to another console window and come back. Differential Revision: https://reviews.freebsd.org/D821 Reviewed by: ray@ Approved by: ray@ Tested by: kwm@ MFC after: 3 days
* Make gcc happy by initialising the variable only set in a couple ofbz2014-09-201-0/+1
| | | | | | | case statements without a default. MFC after: 2 days X-MFC with: r271871
* vt(4): Remove superfluous word in commentdumbbell2014-09-191-1/+1
| | | | | | Submitted by: brueffer@ MFC after: 3 days MFC with: 271871
* vt(4): Rewrite history scrollingdumbbell2014-09-192-87/+172
| | | | | | | | | | | | | | | | | | | It's now possible to scroll up the 500 hard-coded lines of history, not just a fraction of them. For instance, one can reach the top of the boot process. Sometimes, when scrolling or when changing the screen size (by changing the font or loading a KMS driver for instance), one could see the history cycling (old content appeared below latest lines). This is fixed. Now, when the resolution changes are more lines can be shown, the displayed area is adjusted so that, if the screen was filled with content before, it's filled with content after as well: more history is visible, instead of having blank lines below the previously visible content. MFC after: 3 days
* vt(4): Remove vt_buf->vb_dirtymaskdumbbell2014-09-193-50/+3
| | | | | | | This structure and the associated functions were unused since the implementation of vd_bitblt_text_t callbacks. MFC after: 3 days
* vt(4): Use strncpy() to copy into a fixed-size bufferdumbbell2014-09-181-1/+2
| | | | | CID: 1230007 MFC after: 3 days
* vt(4): Fix out-of-bounds array access in VT_ACTIVATE ioctl handlingdumbbell2014-09-181-1/+1
| | | | | CID: 1229964 MFC after: 3 days
* vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivativedumbbell2014-09-164-5/+8
| | | | | | | Review: https://reviews.freebsd.org/D789 Reviewed by: nwhitehorn Approved by: nwhitehorn MFC after: 2 days
* vt(4): Fix a LOR which occurs during a call to vt_upgrade()dumbbell2014-09-161-1/+1
| | | | | | | | Reported by: kib@ Review: https://reviews.freebsd.org/D785 Reviewed by: ray@ Approved by: ray@ MFC after: 2 days
* vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endifdumbbell2014-09-131-0/+2
| | | | | | | This fixes the build with sparc64 LINT for instance. Reported by: bz@ MFC after: 3 days
* Fix 'function declaration isn't a prototype' warning.ray2014-09-121-1/+1
| | | | | Pointed by: ian MFC after: 1 week
* Fix stray char on paste.ray2014-09-121-1/+1
| | | | | Tested by: dumbbell and me MFC after: 1 week
* Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.ray2014-09-121-1/+11
| | | | | | | (forgetted in last commit) Reviewed by: dumbbell (as D755) MFC after: 1 week
* Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.ray2014-09-121-38/+62
| | | | | Reviewed by: dumbbell (as D755) MFC after: 1 week
* Remove stray whitespaces.ray2014-09-123-3/+3
|
* Fix one more spelling mistake.ray2014-09-101-1/+1
| | | | Pointed by: danfe
* spelling fixesray2014-09-102-3/+3
| | | | | Submitted by: "Sam Fourman Jr." <sfourman@gmail.com> MFC after: 1 week
* o Add sysctls to enable/disable potentially dengerous key combinations, likeray2014-09-101-9/+65
| | | | | | | | | reboot/halt/debug. o Add support for most key combinations supported by syscons(4). Reviewed by: dumbbell, emaste (prev revision of D747) MFC after: 5 days Sponsored by: The FreeBSD Foundation
* Revert r269474. Special keyboard combinations should be handled by separateray2014-09-092-18/+5
| | | | sysctls.
* vt(4): Change the terminal and buffer sizes, even without a fontdumbbell2014-09-081-24/+35
| | | | | | | | | | | | | | | | | | | | | | This fixes a bug where scroll lock would not work for tty #0 when using vt_vga's textmode. The reason was that this window is created with a static 256x100 buffer, larger than the real size of 80x25. Now, in vt_change_font() and vt_compute_drawable_area(), we still perform operations even of the window has no font loaded (this is the case in textmode here vw->vw_font == NULL). One of these operation resizes the buffer accordingly. In vt_compute_drawable_area(), we take the terminal size as is (ie. 80x25) for the drawable area. The font argument to vt_set_border() is removed (it was never used) and the code now uses the computed drawable area instead of re-doing its own calculation. Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de> Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de> MFC after: 3 days
* vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text modedumbbell2014-09-051-0/+6
| | | | MFC after: 3 days
* vt(4): Indicate that KDSETRAD case falls through the next casedumbbell2014-08-291-0/+1
| | | | | CID: 1229953 MFC after: 1 week
* vt(4): Change vb_history_size from "int" to "unsigned int"dumbbell2014-08-292-3/+3
| | | | | CID: 1230002, 1230003 MFC after: 1 week
* vt(4): If the terminal shrinks, make sure the mouse is inside the new areadumbbell2014-08-271-2/+13
| | | | MFC after: 1 week
* vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfbdumbbell2014-08-272-33/+30
| | | | | | | | | | | | There were two issues: 1. The area given to vt_is_cursor_in_area() was adding the drawable area offset, something already handled by this function. 2. The cursor was shifted on the screen by the offset of this area and thus was misplaced or not erased. Furthermore, when reaching the bottom or right borders, the cursor was either totally removed or not erased correctly. MFC after: 1 week
* vt(4): Recompute the drawable area when the resolution changesdumbbell2014-08-271-3/+2
| | | | | | This was only done when the font changed. MFC after: 1 week
OpenPOWER on IntegriCloud