aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/5.3.0_cvscvs2svn2004-11-041-1/+1
| | | | | | 'RELENG_5_3_0_RELEASE'. This commit was manufactured to restore the state of the 5.3-RELEASE image.
* MFC 1.429: Disallow negative coordinates and sizes in the sysconsJacques Vidrine2004-09-301-2/+4
| | | | | | | | | CONS_SCRSHOT ioctl. Approved by: re Notes: svn path=/stable/5/; revision=135978
* Just because we have a serial console attached does not mean we don'tDag-Erling Smørgrav2004-08-051-1/+1
| | | | | | | | | | | | | want a splash screen. There seems to be some confusion in the syscons code as to the meaning of the SC_KERNEL_CONSOLE flag. Its absence is sometimes interpreted to mean "I am not the system console", and sometimes to mean "I am not the only VGA console" (see the font loading code for an example of the latter). Someone with better syscons fu than myself should take a closer look. Notes: svn path=/head/; revision=133186
* Document machdep.enable_panic_key.Scott Long2004-08-021-1/+1
| | | | | | | Submitted by: Craig Rodrigues Notes: svn path=/head/; revision=132993
* Avoid casts as lvalues.Alexander Kabaev2004-07-281-2/+2
| | | | Notes: svn path=/head/; revision=132772
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-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. Notes: svn path=/head/; revision=132226
* Update for the KDB framework. Sanitize the alpha console code now thatMarcel Moolenaar2004-07-101-72/+4
| | | | | | | | | | | | | | | | | | | | | it's in the way even more. Basicly: remove all alpha specific console support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console initialization to be identical to all other platforms. In a nutshell: call cninit(). The platform specific code now only sets or clears RB_SERIAL and thus automaticly causes the right console to be selected. sio.c: o Replace the remote GDB hacks and use the GDB debug port interface instead. o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). o Remove the ugly compatibility of using the console as the debug port. Notes: svn path=/head/; revision=131939
* Second half of the dev_t cleanup.Poul-Henning Kamp2004-06-171-1/+1
| | | | | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. Notes: svn path=/head/; revision=130640
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-13/+13
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-041-11/+11
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Gainfully employ the new ttyioctl in the trivial cases.Poul-Henning Kamp2004-06-011-7/+1
| | | | Notes: svn path=/head/; revision=129944
* Rearrangements needed for syscons(4) to be used as a console deviceKen Smith2004-04-021-20/+41
| | | | | | | | | | | | | | | | | | | | | | on architectures that need to call cninit() before the machine is ready to support mutexes (required by make_dev()). - Remove make_dev() call from scinit() when flags indicate unit is the system console, rely on sc_attach_unit() to handle it. - When trying to access current screen's status (scr_stat structure) use the static one provided for the initial system console if no dev_t is available. - When calling make_dev() in sc_attach_unit() catch special case of system's initial console and set up dev_t structure to include pointer to console's scr_stat struct. Reviewed by: marcel Tested by: marcel, grehan (ppc), others on current@ Approved by: rwatson (mentor) Notes: svn path=/head/; revision=127745
* Fixed a nasty old bug where a visual bell in the currently activeRuslan Ermilov2004-03-181-1/+2
| | | | | | | | | | | VTY prevented waking up processes waiting for the output queue to get free on other VTYs. In collaboration with: Vsevolod Lobko MFC after: 1 week Notes: svn path=/head/; revision=127188
* Device megapatch 4/6:Poul-Henning Kamp2004-02-211-4/+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. Notes: svn path=/head/; revision=126080
* Device megapatch 3/6:Poul-Henning Kamp2004-02-211-3/+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. Notes: svn path=/head/; revision=126078
* Try again to get rid of makedev().Poul-Henning Kamp2004-02-141-5/+9
| | | | Notes: svn path=/head/; revision=125801
* Back out my last commit to syscons, things seem to be far more evilPoul-Henning Kamp2004-02-131-9/+5
| | | | | | | | | | | than suspected. and obviously nobody runs the patches I post to -current :-( Poul-Henning Notes: svn path=/head/; revision=125773
* Don't use makedev() to hack up dev_t's early in boot, do it rightPoul-Henning Kamp2004-02-121-5/+9
| | | | | | | with make_dev() (and avoid doing it again later). Notes: svn path=/head/; revision=125750
* Eliminate global cons_unavailable flag and replace it by the statusAlexander Kabaev2004-02-051-6/+9
| | | | | | | | bit maintained on a per-device basis. Single variable is inadequate on machines running with multiple consoles enabled. Notes: svn path=/head/; revision=125467
* __powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer.Peter Grehan2004-01-211-10/+10
| | | | | | | | | | | | | | | Took the opportunity to reduce __i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__ to !__alpha__ reviewed by: gallatin Notes: svn path=/head/; revision=124770
* Fix a panic that occurs when resuming. For some reason, sc->cur_scp isNate Lawson2003-10-291-0/+3
| | | | | | | | | NULL. Submitted by: Andrew Thompson <andy@fud.org.nz> Notes: svn path=/head/; revision=121704
* Convert to cn_name rather than cn_dev.Poul-Henning Kamp2003-09-261-2/+2
| | | | Notes: svn path=/head/; revision=120488
* Merge pc98 support from sys/pc98/pc98/syscons.c.Yoshihiro Takahashi2003-08-251-0/+21
| | | | Notes: svn path=/head/; revision=119443
* Use __FBSDID().David E. O'Brien2003-08-241-2/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119420
* - Add a font width field to struct scr_stat. Use this instead of '8'.Jake Burkholder2003-08-241-3/+2
| | | | | | | | - Use the values in the video info for the font size and width instead of second guessing. Notes: svn path=/head/; revision=119388
* Add sparc64 ifdefs.Jake Burkholder2003-08-241-9/+27
| | | | Notes: svn path=/head/; revision=119379
* Fix endian bugs accessing ioctl arguments that are passed by value.Jake Burkholder2003-08-241-3/+3
| | | | Notes: svn path=/head/; revision=119378
* Trivial addition of __amd64__ to the ifdefs for platforms that usePeter Wemm2003-05-091-9/+9
| | | | | | | | | i386-style vga console support. Approved by: re Notes: svn path=/head/; revision=114857
* - Add vm_paddr_t, a physical address type. This is required for systemsJake Burkholder2003-03-251-1/+1
| | | | | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change) Notes: svn path=/head/; revision=112569
* Don't call sysbeep() in sc_bell() if either duration or pitch is zero.John Baldwin2003-03-241-1/+1
| | | | | | | | | | | | | Otherwise sysbeep() makes an annoying clicking sound on some systems. 'kbdcontrol -b off' just sets the duration and pitch to zero, it doesn't set the QUIET_BELL flag. Tested by: SorAlx <soralx@cydem.zp.ua> PR: misc/41772 MFC after: 1 week Notes: svn path=/head/; revision=112537
* Make nokqfilter() return the correct return value.Poul-Henning Kamp2003-03-031-1/+1
| | | | | | | Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers. Notes: svn path=/head/; revision=111821
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-14/+11
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=111815
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav2003-03-021-6/+6
| | | | Notes: svn path=/head/; revision=111748
* When DDB is in the kernel, unlock VTY switching so that weMaxime Henrion2003-02-271-0/+4
| | | | | | | | | | | don't end up freezing the box. This makes VTY locking useless in the DDB case but a box which is supposed to be physically secure shouldn't compile DDB anyway. Reviewed by: silence on -audit Notes: svn path=/head/; revision=111632
* Cleanup of the d_mmap_t interface.Maxime Henrion2003-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386 Notes: svn path=/head/; revision=111462
* Change the console interface to pass a "struct consdev *" instead of aPoul-Henning Kamp2003-02-201-4/+4
| | | | | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc. Notes: svn path=/head/; revision=111194
* Add a "hw.syscons.bell" sysctl, which can disable the bell at syscons level.Olivier Houchard2003-02-201-1/+4
| | | | Notes: svn path=/head/; revision=111162
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-6/+6
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-6/+6
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Make kqueue(2) work for virtual terminals.Kelly Yancey2002-10-171-1/+2
| | | | | | | | PR: 40486 Submitted by: Jilles Tjoelker <jilles+fbsd-bugs@stack.nl> Notes: svn path=/head/; revision=105310
* Be consistent about "static" functions: if the function is markedPoul-Henning Kamp2002-09-281-5/+5
| | | | | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
* Don't use "NULL" when "0" is really meant.Archie Cobbs2002-08-211-1/+1
| | | | Notes: svn path=/head/; revision=102241
* 1. Allow information about current history size be retrieved using ioctl(2);Maxim Sobolev2002-08-191-5/+44
| | | | | | | | 2. modify screen dumpung routine, so that in addition to visible area, it allows to grab any portion of history buffer as well. Notes: svn path=/head/; revision=102108
* Add a VT_LOCKSWITCH ioctl that disallows vty switching. SomethingDima Dorfman2002-07-101-0/+14
| | | | | | | | | | | like this can be emulated by VT_SETMODEing to VT_PROCESS and never releasing the vty, but this has a number of problems, most notably that a process must stay resident for the lock to be in effect. Reviewed by: roam, sheldonh Notes: svn path=/head/; revision=99704
* Make sc_saver_keyb_only (sceen saver interrupted by keyboard input only)Alfred Perlstein2002-06-061-1/+1
| | | | | | | the default. Notes: svn path=/head/; revision=97918
* When a program launched on the local console exits, the shell willMaxime Henrion2002-05-041-1/+2
| | | | | | | | | | | call read() to get the next command, and scread() disables the screensaver. We don't want this behaviour in the sc_saver_keybonly case. Submitted by: Olivier Houchard <doginou@ci0.org> Notes: svn path=/head/; revision=96033
* Turn on TGA support.David E. O'Brien2002-04-131-2/+2
| | | | | | | Submitted by: Andrew M. Miklic <AndrwMklc@cs.com> Notes: svn path=/head/; revision=94617
* remove blanktime sysctl, this can't be done as easily as it looks.Alfred Perlstein2002-04-051-2/+0
| | | | | | | Requested by: jhb Notes: svn path=/head/; revision=93902
* Add some functionality via sysctl to syscons.Alfred Perlstein2002-04-051-1/+8
| | | | | | | | | | | | | | hw.syscons.saver.keybonly: used to specify that only input is to interrupt the screensaver. This allows one to run a chatty console app but still have the screen blank out until a key is pressed. There should probably also be an ioctl for this, we'll do that later. hw.syscons.saver.blanktime: exports the screensaver timeout via sysctl. Submitted by: Olivier Houchard <doginou@cognet.ci0.org> Notes: svn path=/head/; revision=93897
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-2/+2
| | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=93593