summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/sysmouse.c
Commit message (Collapse)AuthorAgeFilesLines
* 267622 Log:ray2014-07-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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.
* Last minute TTY API change: remove mutex argument from tty_alloc().ed2009-05-291-1/+1
| | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
* Reduce the default baud rate of PTY's to 9600.ed2008-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | On RELENG_6 (and probably RELENG_7) we see our syscons windows and pseudo-terminals have the following buffer sizes: | LINE RAW CAN OUT IHIWT ILOWT OHWT LWT COL STATE SESS PGID DISC | ttyv0 0 0 0 7680 6720 2052 256 7 OCcl 1146 1146 term | ttyp0 0 0 0 7680 6720 1296 256 0 OCc 82033 82033 term These buffer sizes make no sense, because we often have much more output than input, but I guess having higher input buffer sizes improves guarantees of the system. On MPSAFE TTY I just sent both the input and output buffer sizes to 7 KB, which is pretty big on a standard FreeBSD install with 8 syscons windows and some PTY's. Reduce the baud rate to 9600 baud, which means we now have the following buffer sizes: | LINE INQ CAN LIN LOW OUTQ USE LOW COL SESS PGID STATE | ttyv0 1920 0 0 192 1984 0 199 7 2401 2401 Oil | pts/0 1920 0 0 192 1984 0 199 5631 1305 2526 Oi This is a lot smaller, but for pseudo-devices this should be good enough. You need to do a lot of punching to fill up a 7.5 KB input buffer. If it turns out things don't work out this way, we'll just switch to 19200 baud.
* Make sysmouse(4) use its own locks, instead of using Giant.ed2008-08-241-14/+10
| | | | | | | | | | | | | | | | | When I changed syscons(4) to work with the MPSAFE TTY code, I just locked all device nodes down using the compatibility feature that allows you to override the TTY's lock (Giant in this case). Upon closer inspection, it seems sysmouse(4) only has two internal variables that need locking: mouse_level and mouse_status. I haven't done any performance benchmarks on this, though I think it won't have any dramatic improvements on the system. It is good to get rid of Giant here, because the third argument of tty_alloc() has only been added to ease migration to MPSAFE TTY. It should not be used when not needed. While there, remove SC_MOUSE, which is a leftover from the MPSAFE TTY import.
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-201-103/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* In keeping with style(9)'s recommendations on macros, use a ';'rwatson2008-03-161-1/+1
| | | | | | | | | after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+3
| | | | | | | | | | | | | 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>
* Fix -Wundef.ru2005-12-041-1/+1
|
* Remove debug printout of major/minor numbers, print name instead.phk2005-02-271-2/+2
|
* Add new function ttyinitmode() which sets our systemwide defaultphk2004-10-181-6/+1
| | | | | | | | | | | | | | 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.
* Fix echo in console mode.phk2004-10-141-6/+9
|
* Preparation commit for the tty cleanups that will follow in the nearphk2004-07-151-1/+1
| | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.phk2004-06-041-2/+1
|
* Machine generated patch which changes linedisc calls from accessingphk2004-06-041-4/+4
| | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit.
* Remove unused variable.phk2004-06-011-1/+0
|
* Gainfully employ the new ttyioctl in the trivial cases.phk2004-06-011-7/+1
|
* Device megapatch 4/6:phk2004-02-211-1/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 3/6:phk2004-02-211-2/+0
| | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures.
* Device megapatch 1/6:phk2004-02-211-4/+1
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+8
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* KSE Milestone 2julian2001-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
* Call ttymalloc() when sysmouse is opened, rather thanyokota2001-07-061-1/+1
| | | | | when the driver is attached. MFC after: 2 weeks
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Initiate deorbit burn sequence for <machine/mouse.h>.phk2000-10-091-2/+1
| | | | | | | | | | Replace all in-tree uses with <sys/mouse.h> which repo-copied a few moments ago from src/sys/i386/include/mouse.h by peter. This is also the appropriate fix for exo-tree sources. Put warnings in <machine/mouse.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/mouse.h> files will be removed.
* Initiate deorbit burn sequence for <machine/console.h>.phk2000-10-081-1/+1
| | | | | | | | | Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>. This is also the appropriate fix for exo-tree sources. Put warnings in <machine/console.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/console.h> files will be removed.
* Harvest mouse events for the entropy device in a better place. In themarkm2000-09-101-3/+0
| | | | | | new location, all mouse events are harvested, not just the ones being written out to moused(8). This means that mouse entropy is harvested at the consoles as well as in X.
* Fix ioctl MOUSE_SETMODE as defined in mouse(4).yokota2000-08-271-2/+5
| | | | | (Do not return EINVAL when -1 is specified as a new value, as it should mean "preserve the current value.")
* o Fix a horrible bug where small reads (< 8 bytes) would return themarkm2000-07-251-4/+1
| | | | | | | | wrong bytes. o Improve the public interface; use void* instead of char* or u_int64_t to pass arbitrary data around. Submitted by: kris ("horrible bug")
* Add entropy-harvesting calls.markm2000-07-091-0/+6
| | | | /dev/random now has new-and-improved entropy!
* Use config's conditional compilation rather than using #ifdefs that makepeter2000-01-291-5/+0
| | | | | modular compilation harder. I'm doing this because people seem to like cut/pasting examples of bad practices in existing code.
* This is the 3rd stage of syscons code reorganization.yokota2000-01-151-0/+344
- 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.
OpenPOWER on IntegriCloud