aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
Commit message (Collapse)AuthorAgeFilesLines
* In set_mouse_pos(), try to avoid division by zero errors.Craig Rodrigues2005-09-071-1/+2
| | | | Notes: svn path=/head/; revision=149855
* In sc_set_text_mode(), reset fontwidth if it is <= 0.Craig Rodrigues2005-09-061-0/+2
| | | | | | | | | | | Eliminates division by zero errors in syscons driver. Reported by: keramida, Slawa Olhovchenkov <slw at zxy dot spb dot ru>, Kyryll Mirnenko <mirya at matrix dot kiev dot ua> Tested by: keramida, rodrigc Notes: svn path=/head/; revision=149828
* Prevent division by zero errors in sc_mouse_move()Craig Rodrigues2005-08-305-14/+17
| | | | | | | | | | | | | by explicitly setting sc->font_width, in the same places where sc->font_size is set, instead of relying on the default initialized value of 0 for sc->font_width. PR: kern/84836 Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru> MFC after: 2 days Notes: svn path=/head/; revision=149640
* kbdmux(4) keyboard multiplexer integrationMaksim Yevmenkin2005-07-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | o Add two new ioctl's KBADDKBD and KBRELKBD. These are used to add and remove keyboard to (and from) kbdmux(4) keyboard multiplexer; o Introduce new kbd_find_keyboard2() function. It does exactly the same job as kbd_find_keyboard() function except it allows to specify starting index. This function can be used to iterate over keyboards array; o Re-implement kbd_find_keyboard() as call to kbd_find_keyboard2() with starting index of zero; o Make sure syscons(4) passed KBADDKBD and KBRELKBD ioctl's onto currently active keyboard. These changes should not have any visible effect. MFC after: 1 week Notes: svn path=/head/; revision=147980
* Fix syscons on amd64. The SC_PIXEL_MODE commit from May 29th added a newPeter Wemm2005-06-142-4/+4
| | | | | | | | | | | | | | | function pointer to the vga render dispatch table and initialized it with vga_nop. The problem is that vga_nop() is a varargs function, and the table declares a non-varargs function pointer. On amd64 (and I think ppc), mixing varargs and non-varargs function pointers is fatal. Change vga_nop() and gfb_nop() from varargs to non-varargs do-nothing functions. This stops the stack corruption that only happened on amd64. Approved by: re (scottl) Notes: svn path=/head/; revision=147358
* Only set mode when the incoming ioctl is IOC_VOID, until we have betterXin LI2005-06-101-1/+3
| | | | | | | | | | solution against the ioctl collisions. Submitted by: Antoine Brodin <antoine.brodin at laposte net> PR: kern/81867 Notes: svn path=/head/; revision=147224
* Fix LINT by defining vga_pxlmouse_planar and vga_pxlmouse_direct.Scott Long2005-05-301-1/+2
| | | | Notes: svn path=/head/; revision=146811
* Deny to switch into banked video mode when it is not available. SomeXin LI2005-05-301-1/+2
| | | | | | | | | users has reported corrupted display with old video cards. Submitted by: Michal Mertl <mime traveller cz> Notes: svn path=/head/; revision=146800
* Add vr_init_t member to sc_rndr_sw_t instances in order to unbreakMarius Strobl2005-05-291-0/+3
| | | | | | | compilation after sys/dev/syscons/syscons.h rev. 1.83. Notes: svn path=/head/; revision=146746
* Add VESA mode support for syscons, which enables the support of 15, 16,Xin LI2005-05-296-71/+479
| | | | | | | | | | | | | | | | | | | | | | | | 24, and 32 bit modes. To use that, syscons(4) must be built with the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a. vesa.ko) must be either loaded, or be compiled into the kernel. Do not return EINVAL when the mouse state is changed to what it already is, which seems to cause problems when you have two mice attached, and applications are not likely obtain useful information through the EINVAL caused by showing the mouse pointer twice. Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is the video mode number from the vidcontrol -i mode output. Also, revert the video mode if something fails. Obtained from: DragonFlyBSD Discussed at: current@ with patch attached [1] PR: kern/71142 [2] Submitted by: Xuefeng DENG <dsnofe at msn com> [1], Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2] Notes: svn path=/head/; revision=146736
* - Not every architecture defaults to a black background (e.g. sparc64Marius Strobl2005-05-211-9/+9
| | | | | | | | | | uses white) so base the color of the border on SC_NORM_ATTR rather than hardcoding BG_BLACK. - Use SC_DRIVER_NAME rather than hardcoding 'sc' in message strings (see also sys/dev/syscons/syscons.h rev. 1.82). Notes: svn path=/head/; revision=146478
* On sparc64 use 'syscons' rather than 'sc' for SC_DRIVER_NAME soMarius Strobl2005-05-211-0/+8
| | | | | | | | | | syscons(4) and its pseudo-devices don't get confused (including by other device drivers) with the system controller devices which are also termed 'sc' in the OFW tree (and which we probably want to interface with hwpmc(4) one day). Notes: svn path=/head/; revision=146477
* Remove superfluous braces and add #ifndef __sparc64__ around theMarius Strobl2005-05-211-18/+41
| | | | | | | | | | | VTB_FRAMEBUFFER specific code. On sparc64 we don't use a buffer of type VTB_FRAMEBUFFER (see syscons.c) and excluding the respective code here allows to compile syscons(4) without isa(4). Requested by: joerg, marcel, yongari Notes: svn path=/head/; revision=146476
* For sparc64 conditionalize the compilation of the gfb_cursor() variantMarius Strobl2005-05-211-4/+1
| | | | | | | | | | which doesn't assume a hardware cursor on __sparc64__ rather than on DEV_CREATOR. If we want to include more than one framebuffer driver in e.g. the GENERIC kernel all drivers have to work the same way. Now that DEV_CREATOR is no longer used remove it from options.sparc64. Notes: svn path=/head/; revision=146472
* Remove old epson note support.Yoshihiro Takahashi2005-05-151-21/+2
| | | | Notes: svn path=/head/; revision=146240
* - Add color tables for 16 colors mode and 8 colors mode, use a differentYoshihiro Takahashi2005-05-151-27/+16
| | | | | | | | table on the pc98 console. - Remove old epson note support. Notes: svn path=/head/; revision=146239
* - Mask an underline attribute on the pc98 console. It enables to use the sameYoshihiro Takahashi2005-05-151-49/+28
| | | | | | | | color on the pc98 and the others. - Remove old epson note support. Notes: svn path=/head/; revision=146238
* Remove the ADJUST_CLOCK ioctl on pc98. It's not used at all.Yoshihiro Takahashi2005-05-151-6/+0
| | | | Notes: svn path=/head/; revision=146235
* Change a directory layout for pc98.Yoshihiro Takahashi2005-05-101-1/+1
| | | | | | | | | | | | - Move MD files into <arch>/<arch>. - Move bus dependent files into <arch>/<bus>. Rename some files to more suitable names. Repo-copied by: peter Discussed with: imp Notes: svn path=/head/; revision=146049
* No need to ifdef this pc98.Warner Losh2005-04-041-2/+0
| | | | Notes: svn path=/head/; revision=144619
* Remove debug printout of major/minor numbers, print name instead.Poul-Henning Kamp2005-02-272-4/+4
| | | | Notes: svn path=/head/; revision=142692
* Remove the last vestiges of the userconfig option. None of this actuallyScott Long2004-12-011-1/+1
| | | | | | | did anything, so this commit should be considered a NO-OP. Notes: svn path=/head/; revision=138249
* Add new function ttyinitmode() which sets our systemwide defaultPoul-Henning Kamp2004-10-182-26/+21
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=136680
* Fix echo in console mode.Poul-Henning Kamp2004-10-142-21/+31
| | | | Notes: svn path=/head/; revision=136505
* Disallow negative coordinates and sizes in the syscons CONS_SCRSHOTJacques Vidrine2004-09-291-2/+4
| | | | | | | | | ioctl. Reported by: Christer Oberg <christer.oberg@deprotect.com> Notes: svn path=/head/; revision=135942
* Implement the KDENABIO etc ioctl's for amd64 as well.Peter Wemm2004-09-241-2/+5
| | | | Notes: svn path=/head/; revision=135693
* Implement the syscons mouse pointer characters for amd64. It was onlyPeter Wemm2004-09-241-4/+4
| | | | | | | implemented for i386 and alpha. Notes: svn path=/head/; revision=135692
* 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-282-3/+3
| | | | Notes: svn path=/head/; revision=132772
* Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp2004-07-152-2/+2
| | | | | | | | | | | | 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
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPPoul-Henning Kamp2004-07-151-0/+2
| | | | | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything". Notes: svn path=/head/; revision=132199
* Remove erroneous semicolons.Stefan Farfeleder2004-07-131-1/+1
| | | | Notes: svn path=/head/; revision=132107
* 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-164-20/+20
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.Poul-Henning Kamp2004-06-041-2/+1
| | | | Notes: svn path=/head/; revision=130095
* Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp2004-06-042-15/+15
| | | | | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
* Remove unused variable.Poul-Henning Kamp2004-06-011-1/+0
| | | | Notes: svn path=/head/; revision=129954
* Gainfully employ the new ttyioctl in the trivial cases.Poul-Henning Kamp2004-06-012-14/+2
| | | | Notes: svn path=/head/; revision=129944
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-302-0/+2
| | | | Notes: svn path=/head/; revision=129879
* 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-212-5/+4
| | | | | | | | | | | 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-212-5/+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
* Device megapatch 1/6:Poul-Henning Kamp2004-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. Notes: svn path=/head/; revision=126076
* 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