summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
Commit message (Collapse)AuthorAgeFilesLines
* MFH (r293034, r29304): plasma screensaverdes2016-01-263-0/+479
|
* MFC r277796: hook userland threads suspend + resume into acpi suspend codeavg2015-05-111-1/+1
|
* MFC r276795:delphij2015-01-231-1/+1
| | | | Fix sos@'s name.
* 267622 Log:ray2014-07-072-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename vt(4) vga module to dismiss interference with syscons(4) vga module. 267623 Log: Remove stale link to deleted vt(4) xboxfb driver. 267624 Log: syscons(4) and vt(4) can be built together now. 267625 Log: Allow to disable syscons(4) if "hw.syscons.disable" kenv is set. 267626 Log: Suspend vt(4) initialization if "kern.vt.disable" kenv is set. 267965 by emaste@ Log: Use a common tunable to choose between vt(4)/sc(4) With this change and previous work from ray@ it will be possible to put both in GENERIC, and have one enabled by default, but allow the other to be selected via the loader. (The previous implementation had separate kern.vt.disable and hw.syscons.disable tunables, and would panic if both drivers were compiled in and neither was explicitly disabled.) 268175 by emaste@ Log: Fix vt(4) detection in kbdcontrol and vidcontrol As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence of a vt(4) sysctl is not sufficient to determine that vt(4) is in use. Reported by: Trond Endrestøl 268045 by emaste@ Log: Add vt(4) to GENERIC and retire the separate VT config vt(4) and sc(4) can now coexist in the same kernel. To choose the vt driver, set the loader tunable kern.vty=vt . Sponsored by: The FreeBSD Foundation
* MFC 259016,259019,259049,259071,259102,259110,259129,259130,259178,259179,jhb2014-03-061-0/+7
| | | | | | | | | 259203,259221,259261,259532,259615,259650,259651,259667,259680,259727, 259761,259772,259776,259777,259830,259882,259915,260160,260449,260450, 260688,260888,260953,261269,261547,261551,261552,261553,261585: Merge the vt(4) driver (newcons) to stable/10. Approved by: ray
* Increase maximum number of columns to support 1920x1200 displays.jmmv2014-03-021-2/+2
| | | | | | | | | | | This is a MFC of r262480 and r262502. Please note that this is changing a constant in a header file so it could affect ABIs. However, as far as I can tell, this is apparently only used in code to declare static arrays and thus it should be safe to change... PR: kern/180558
* Merge from project branch via main. Uninteresting commits are trimmed.markm2013-10-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor of /dev/random device. Main points include: * Userland seeding is no longer used. This auto-seeds at boot time on PC/Desktop setups; this may need some tweeking and intelligence from those folks setting up embedded boxes, but the work is believed to be minimal. * An entropy cache is written to /entropy (even during installation) and the kernel uses this at next boot. * An entropy file written to /boot/entropy can be loaded by loader(8) * Hardware sources such as rdrand are fed into Yarrow, and are no longer available raw. ------------------------------------------------------------------------ r256240 | des | 2013-10-09 21:14:16 +0100 (Wed, 09 Oct 2013) | 4 lines Add a RANDOM_RWFILE option and hide the entropy cache code behind it. Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA. Add the RANDOM_* options to LINT. ------------------------------------------------------------------------ r256239 | des | 2013-10-09 21:12:59 +0100 (Wed, 09 Oct 2013) | 2 lines Define RANDOM_PURE_RNDTEST for rndtest(4). ------------------------------------------------------------------------ r256204 | des | 2013-10-09 18:51:38 +0100 (Wed, 09 Oct 2013) | 2 lines staticize struct random_hardware_source ------------------------------------------------------------------------ r256203 | markm | 2013-10-09 18:50:36 +0100 (Wed, 09 Oct 2013) | 2 lines Wrap some policy-rich code in 'if NOTYET' until we can thresh out what it really needs to do. ------------------------------------------------------------------------ r256184 | des | 2013-10-09 10:13:12 +0100 (Wed, 09 Oct 2013) | 2 lines Re-add /dev/urandom for compatibility purposes. ------------------------------------------------------------------------ r256182 | des | 2013-10-09 10:11:14 +0100 (Wed, 09 Oct 2013) | 3 lines Add missing include guards and move the existing ones out of the implementation namespace. ------------------------------------------------------------------------ r256168 | markm | 2013-10-08 23:14:07 +0100 (Tue, 08 Oct 2013) | 10 lines Fix some just-noticed problems: o Allow this to work with "nodevice random" by fixing where the MALLOC pool is defined. o Fix the explicit reseed code. This was correct as submitted, but in the project branch doesn't need to set the "seeded" bit as this is done correctly in the "unblock" function. o Remove some debug ifdeffing. o Adjust comments. ------------------------------------------------------------------------ r256159 | markm | 2013-10-08 19:48:11 +0100 (Tue, 08 Oct 2013) | 6 lines Time to eat crow for me. I replaced the sx_* locks that Arthur used with regular mutexes; this turned out the be the wrong thing to do as the locks need to be sleepable. Revert this folly. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> (In original diff) ------------------------------------------------------------------------ r256138 | des | 2013-10-08 12:05:26 +0100 (Tue, 08 Oct 2013) | 10 lines Add YARROW_RNG and FORTUNA_RNG to sys/conf/options. Add a SYSINIT that forces a reseed during proc0 setup, which happens fairly late in the boot process. Add a RANDOM_DEBUG option which enables some debugging printf()s. Add a new RANDOM_ATTACH entropy source which harvests entropy from the get_cyclecount() delta across each call to a device attach method. ------------------------------------------------------------------------ r256135 | markm | 2013-10-08 07:54:52 +0100 (Tue, 08 Oct 2013) | 8 lines Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use EVENTHANDLER(mountroot) instead. This means we can't count on /var being present, so something will need to be done about harvesting /var/db/entropy/... . Some policy now needs to be sorted out, and a pre-sync cache needs to be written, but apart from that we are now ready to go. Over to review. ------------------------------------------------------------------------ r256094 | markm | 2013-10-06 23:45:02 +0100 (Sun, 06 Oct 2013) | 8 lines Snapshot. Looking pretty good; this mostly works now. New code includes: * Read cached entropy at startup, both from files and from loader(8) preloaded entropy. Failures are soft, but announced. Untested. * Use EVENTHANDLER to do above just before we go multiuser. Untested. ------------------------------------------------------------------------ r256088 | markm | 2013-10-06 14:01:42 +0100 (Sun, 06 Oct 2013) | 2 lines Fix up the man page for random(4). This mainly removes no-longer-relevant details about HW RNGs, reseeding explicitly and user-supplied entropy. ------------------------------------------------------------------------ r256087 | markm | 2013-10-06 13:43:42 +0100 (Sun, 06 Oct 2013) | 6 lines As userland writing to /dev/random is no more, remove the "better than nothing" bootstrap mode. Add SWI harvesting to the mix. My box seeds Yarrow by itself in a few seconds! YMMV; more to follow. ------------------------------------------------------------------------ r256086 | markm | 2013-10-06 13:40:32 +0100 (Sun, 06 Oct 2013) | 11 lines Debug run. This now works, except that the "live" sources haven't been tested. With all sources turned on, this unlocks itself in a couple of seconds! That is no my box, and there is no guarantee that this will be the case everywhere. * Cut debug prints. * Use the same locks/mutexes all the way through. * Be a tad more conservative about entropy estimates. ------------------------------------------------------------------------ r256084 | markm | 2013-10-06 13:35:29 +0100 (Sun, 06 Oct 2013) | 5 lines Don't use the "real" assembler mnemonics; older compilers may not understand them (like when building CURRENT on 9.x). # Submitted by: Konstantin Belousov <kostikbel@gmail.com> ------------------------------------------------------------------------ r256081 | markm | 2013-10-06 10:55:28 +0100 (Sun, 06 Oct 2013) | 12 lines SNAPSHOT. Simplify the malloc pools; We only need one for this device. Simplify the harvest queue. Marginally improve the entropy pool hashing, making it a bit faster in the process. Connect up the hardware "live" source harvesting. This is simplistic for now, and will need to be made rate-adaptive. All of the above passes a compile test but needs to be debugged. ------------------------------------------------------------------------ r256042 | markm | 2013-10-04 07:55:06 +0100 (Fri, 04 Oct 2013) | 25 lines Snapshot. This passes the build test, but has not yet been finished or debugged. Contains: * Refactor the hardware RNG CPU instruction sources to feed into the software mixer. This is unfinished. The actual harvesting needs to be sorted out. Modified by me (see below). * Remove 'frac' parameter from random_harvest(). This was never used and adds extra code for no good reason. * Remove device write entropy harvesting. This provided a weak attack vector, was not very good at bootstrapping the device. To follow will be a replacement explicit reseed knob. * Separate out all the RANDOM_PURE sources into separate harvest entities. This adds some secuity in the case where more than one is present. * Review all the code and fix anything obviously messy or inconsistent. Address som review concerns while I'm here, like rename the pseudo-rng to 'dummy'. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item) ------------------------------------------------------------------------ r255319 | markm | 2013-09-06 18:51:52 +0100 (Fri, 06 Sep 2013) | 4 lines Yarrow wants entropy estimations to be conservative; the usual idea is that if you are certain you have N bits of entropy, you declare N/2. ------------------------------------------------------------------------ r255075 | markm | 2013-08-30 18:47:53 +0100 (Fri, 30 Aug 2013) | 4 lines Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the usual harvest queues. It was a nifty idea, but too heavyweight. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> ------------------------------------------------------------------------ r255071 | markm | 2013-08-30 12:42:57 +0100 (Fri, 30 Aug 2013) | 4 lines Separate out the Software RNG entropy harvesting queue and thread into its own files. # Submitted by: Arthur Mesh <arthurmesh@gmail.com> ------------------------------------------------------------------------ r254934 | markm | 2013-08-26 20:07:03 +0100 (Mon, 26 Aug 2013) | 2 lines Remove the short-lived namei experiment. ------------------------------------------------------------------------ r254928 | markm | 2013-08-26 19:35:21 +0100 (Mon, 26 Aug 2013) | 2 lines Snapshot; Do some running repairs on entropy harvesting. More needs to follow. ------------------------------------------------------------------------ r254927 | markm | 2013-08-26 19:29:51 +0100 (Mon, 26 Aug 2013) | 15 lines Snapshot of current work; 1) Clean up namespace; only use "Yarrow" where it is Yarrow-specific or close enough to the Yarrow algorithm. For the rest use a neutral name. 2) Tidy up headers; put private stuff in private places. More could be done here. 3) Streamline the hashing/encryption; no need for a 256-bit counter; 128 bits will last for long enough. There are bits of debug code lying around; these will be removed at a later stage. ------------------------------------------------------------------------ r254784 | markm | 2013-08-24 14:54:56 +0100 (Sat, 24 Aug 2013) | 39 lines 1) example (partially humorous random_adaptor, that I call "EXAMPLE") * It's not meant to be used in a real system, it's there to show how the basics of how to create interfaces for random_adaptors. Perhaps it should belong in a manual page 2) Move probe.c's functionality in to random_adaptors.c * rename random_ident_hardware() to random_adaptor_choose() 3) Introduce a new way to choose (or select) random_adaptors via tunable "rngs_want" It's a list of comma separated names of adaptors, ordered by preferences. I.e.: rngs_want="yarrow,rdrand" Such setting would cause yarrow to be preferred to rdrand. If neither of them are available (or registered), then system will default to something reasonable (currently yarrow). If yarrow is not present, then we fall back to the adaptor that's first on the list of registered adaptors. 4) Introduce a way where RNGs can play a role of entropy source. This is mostly useful for HW rngs. The way I envision this is that every HW RNG will use this functionality by default. Functionality to disable this is also present. I have an example of how to use this in random_adaptor_example.c (see modload event, and init function) 5) fix kern.random.adaptors from kern.random.adaptors: yarrowpanicblock to kern.random.adaptors: yarrow,panic,block 6) add kern.random.active_adaptor to indicate currently selected adaptor: root@freebsd04:~ # sysctl kern.random.active_adaptor kern.random.active_adaptor: yarrow # Submitted by: Arthur Mesh <arthurmesh@gmail.com> Submitted by: Dag-Erling Smørgrav <des@FreeBSD.org>, Arthur Mesh <arthurmesh@gmail.com> Reviewed by: des@FreeBSD.org Approved by: re (delphij) Approved by: secteam (des,delphij)
* Reload font when syscons(4) is resuming without switching mode.jkim2013-07-171-27/+34
| | | | | Reported by: adrian (more than a year ago) Prodded by: adrian (less than a month ago)
* On some generations of the Intel GPU, disabling of the VGA Displaykib2013-06-181-1/+5
| | | | | | | | | | | | | | | stops updating the vertical retrace indicator. The text mouse renderer in syscons is executing from the callout and spins waiting for the start of next frame. As result, after the X server finishes, since the VGA cannot be turned on, but syscons does not know about this, the clock swi spins forever. Hack around the problem by disabling wait for the retrace if KMS is activated. Diagnosed and tested by: Michiel Boland <boland37@xs4all.nl> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* MFcalloutng (r244249, r244306 by mav):davide2013-03-042-28/+32
| | | | | | | | | | | | - Switch syscons from timeout() to callout_reset_flags() and specify that precision is not important there -- anything from 20 to 30Hz will be fine. - Reduce syscons "refresh" rate to 1-2Hz when console is in graphics mode and there is nothing to do except some polling for keyboard. Text mode refresh would also be nice to have adaptive, but this change at least should help laptop users who running X. Sponsored by: Google Summer of Code 2012, iXsystems inc. Tested by: flo, marius, ian, markj, Fabian Keil
* Make sure that all mouse buttons are released when clientshselasky2013-02-061-1/+20
| | | | | | | | using /dev/consolectl close. This fixes a problem where if a USB mouse is detached while a button is pressed, that button is never released. MFC after: 1 week
* Add tty_set_winsize().ed2012-11-031-33/+12
| | | | | This removes some of the signalling magic from the Syscons driver and puts it in the TTY layer, where it belongs.
* Piggyback MIPS changes and add ARM syscons support for devices withgonzo2012-08-253-3/+6
| | | | | | framebuffer While here - sort #if defined() order alphabetically
* Provide basic glue to allow syscons to be used on MIPS, modelledrwatson2012-08-253-3/+3
| | | | | | | | | on PowerPC support. This was clearly not something syscons was designed to do (very specific assumptions about the nature of VGA consoles on PCs), but fortunately others have long since blazed the way on making it work regardless of that. Sponsored by: DARPA, AFRL
* Move tty_opened_ns() into syscons.c which is currently thehselasky2012-03-291-0/+3
| | | | | | | only client of this macro. Suggested by: ed @ MFC after: 1 week
* Fix for NULL-pointer panic during boot, if keys are pressed too early.hselasky2012-03-291-10/+11
| | | | MFC after: 1 week
* 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
OpenPOWER on IntegriCloud