summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcvt/pcvt_drv.c
Commit message (Collapse)AuthorAgeFilesLines
* Part 3 of the pcvt/voxware revival.peter1999-01-011-0/+1641
| | | | Reviewed by: core
* Pre 3.0 branch cleanup casualty #4: pcvtphk1998-12-271-1641/+0
|
* * Fix a couple of places in the device pager where an address wasdfr1998-11-081-1/+1
| | | | | | | | | | | truncated to 32 bits. * Change the calling convention of the device mmap entry point to pass a vm_offset_t instead of an int for the offset allowing devices with a larger memory map than (1<<32) to be supported on the alpha (/dev/mem is one such). These changes are required to allow the X server to mmap the various I/O regions used for device port and memory access on the alpha.
* Initialize isa_devtab entries for interrupt handlers in individualbde1998-10-221-0/+2
| | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato
* Added D_TTY to the cdevswitch flags for all tty drivers. This is requiredbde1998-08-231-6/+7
| | | | | | | | | for the Lite2 fix for always returning EIO in dead_read(). Cleaned up the cdevswitch initializers for all tty drivers. Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes.
* Changed %n to %r in devfs name format strings. %n has almost gone away.bde1998-07-151-1/+1
|
* Check for missing keyboard.jkh1998-07-031-0/+26
| | | | | PR: 7108 Submitted by: Hellmuth Michaelis <hm@hcs.de>
* This commit fixes various 64bit portability problems required fordfr1998-06-071-1/+1
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Staticize.eivind1998-02-091-2/+2
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-0/+2
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that arebde1997-12-061-2/+3
| | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
* Update select -> poll in drivers.peter1997-09-141-1/+1
|
* #include <machine/stdarg.h> in the one place in pcvt that it is usedbde1997-07-201-0/+6
| | | | instead of centrally.
* Removed a stray semicolon.bde1997-07-201-1/+1
|
* Fixed the type of timeout functions and removed casts that hid thebde1997-04-201-2/+3
| | | | | | | | | | | | | type mismatches. There was no problem in practice (at least on 386's). Don't cast NULL in calls to timeout functions. pcvt is fully prototyped and doesn't support K&R. Timeout functions take args of type `void *', so use magic numbers of type `void *' for UPDATE_* to reduce the danger of wrong conversions. Removed FreeBSD-pre-1.1-related TIMEOUT_FUNC_T macro. It was especially bogus for the pre-1.1 case.
* Use the same IOPL check as in syscons.bde1997-04-141-6/+9
| | | | Reviewed by: pst, joerg
* Fix the new (kbdio) keyboard layer to correctly work if PCVT_SCANSET == 2joerg1997-03-071-0/+8
| | | | | | even early in the boot process (boot -c or -d). Submitted by: yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA)
* Move pcvt towards using kbdio (finally!).joerg1997-03-061-0/+47
| | | | | | | | | | Warning: this won't work yet with PCVT_SCANSET=2 along in early console mode (boot -c, or boot -d). A big thanks to Kazutaka, and a word of apologies for delaying the review for that long time... Submitted by: yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA)
* Don't claim the console when the driver is disabled. The getc/putcbde1996-10-091-1/+1
| | | | | part of the console driver usually works when the driver is disabled, but the normal read/write part doesn't (it caused a panic).
* Changed cncheckc() interface so that it is 8-bit clean - return -1bde1996-09-141-1/+1
| | | | | | | | | instead of 0 if there is no input. pcvt_drv.c: Partially fixed pccncheckc(). It returned a boolean value instead of the character that it fetches from the input fifo (if any). I think it still discards characters after the first for multi-char input.
* Updated #includes to 4.4Lite style.bde1996-09-101-1/+1
|
* Remove devconf, it never grew up to be of any use.phk1996-09-061-57/+0
|
* Fix two minor oddities introduced by my yesterday's patches:joerg1996-08-121-4/+12
| | | | | | | | | . preserve a multi-char sequence in a small static buffer inside pccngetc(), so it won't be clobbered later (used to happen when breaking into DDB user Ctrl-Alt-ESC), and . simplify the ``keystroke is present'' determination in sgetc(), thus making pccncheck() actually working without waiting for a keystroke.
* Fix many long-standing bugs and problems with pcvt, namely:joerg1996-08-101-4/+19
| | | | | | | | | | | | | | | | | | . make pccncheck() work even when interrupts are disabled, so the ``Press a key on the console...'' procedure will work, . make kernel colors #ifndef, so they can be overridden from the config file, . use shutdown_nice() instead of cpu_reset() if Ctrl-Alt-Del is enabled, . allow pccngetc() to return more than a single character, so the arrow keys will work (and thus visual UserConfig!), . fix a warning. This closes all know PRs related to pcvt, in particular #845, #1236, and #1265. PR #991 is a duplicate for 845, and PR #1283 has already been fixed earlier in rev 1.11 of pcvt_conf.h. Submitted by: Ulf Kieber (kieber@sax.de), for the kernel color fix
* Clean up -Wunused warnings. Also clean up a -Winline warning while here.gpalmer1996-06-121-40/+41
| | | | Reviewed by: bde
* Added DEVFS support to create ttyv* devicesscrappy1996-03-281-2/+19
| | | | Reviewed by: julian@freebsd.org
* Get rid of two and a half printf in the kernel.phk1996-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | Add more features to the one remaining to handle the job: + signed quantity. # alternate format - left padding * read width as next arg. n numeric in (argument specified) default radix. Fix the DDB debugger to use these. Use vprintf in debug routine in pcvt. The warnings from gcc may become more wrong and intolerable because of this. Warning: I have not checked the entire source for unsupported or changed constructs, but generally belive that there are only a few. Suggested by: bde
* Removed my devsw access functions [un]register_cdev() andbde1995-12-141-4/+8
| | | | | | | | | | | | | | getmajorbyname() which were a better (sigh) temporary interface to the going-away devswitches. Note that SYSINIT()s to initialize the devswitches would be fatal in syscons.c and pcvt_drv.c (and are bogus elsewhere) because they get called independently of whether the device is attached; thus devices that share a major clobber each other's devswitch entries until the last one wins. conf.c: Removed stale #includes and comments.
* Removed new alias d_size_t for d_psize_t.bde1995-12-101-3/+3
| | | | | | | | | | Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and d_devtotty_t. Sorted declarations of switch functions into switch order. Removed duplicated comments and declarations of nonexistent switch functions.
* Pass 3 of the great devsw changesjulian1995-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* Completed function declarations and/or added prototypes.bde1995-11-241-0/+2
|
* Don't allow mmapping the page after last video page.bde1995-10-141-1/+1
| | | | Obtained from: syscons.c (bug obtained from original pccons.c)
* Fix benign type mismatches in isa interrupt handlers. Many returned intbde1995-09-191-12/+8
| | | | instead of void.
* Make pcvt and syscons live in the same kernel. If both are enabled, thenbde1995-09-101-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the first one in the config has priority. They can be switched using userconfig(). i386/i386/conf.c: Initialize the shared syscons/pcvt cdevsw entry to `nx'. Add cdevsw registration functions. Use devsw functions of the correct type if they exist. i386/i386/cons.c: Add renamed syscons entry points to constab. i386/i386/cons.h: Declare the renamed syscons entry points. i386/i386/machdep.c: Repeat console initialization after userconfig() in case the current console has become wrong. This depends on cn functions not wiring down anything important. sys/conf.h: Declare new functions. i386/isa/isa.[ch]: Add a function to decide which display driver has priority. Should be done better. i386/isa/syscons.c: Rename pccn* -> sccn*. Initialize CRTC start address in case the previous driver has moved it. i386/isa/syscons.c, i386/isa/pcvt/* Initialize the bogusly shared variable Crtat dynamically in case the stored value was changed by the previous driver. Initialize cdevsw table from a template. Don't grab the console if another display driver has priority. i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h: Don't externally declare now-static cdevsw functions. i386/isa/pcvt/pcvt_hdr.h: Set the sensitive hardware flag so that pcvt doesn't always have lower priority than syscons. This also fixes the "stupid" detection of the display after filling the display with text. i386/isa/pcvt/pcvt_out.c: Don't be confused the off-screen cursor offset 0xffff set by syscons. kern/subr_xxx.c: Add enough nxio/nodev/null devsw functions of the correct type for syscons and pcvt.
* Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handlingbde1995-07-311-15/+13
| | | | | tab delays etc. pcvt was using them to recover from a (rarely lost) race. Use a little more locking to avoid the race.
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-311-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce TS_CONNECTED and TS_ZOMBIE states. TS_CONNECTED is set while a connection is established. It is set while (TS_CARR_ON or CLOCAL is set) and TS_ZOMBIE is clear. TS_ZOMBIE is set for on to off transitions of TS_CARR_ON that occur when CLOCAL is clear and is cleared for off to on transitions of CLOCAL. I/o can only occur while TS_CONNECTED is set. TS_ZOMBIE prevents further i/o. Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp) and TSA_HUP_OR_INPUT(tp). The former address is now used only for off to on carrier transitions and equivalent CLOCAL transitions. The latter is used for all input events, all carrier transitions and certain CLOCAL transitions. There are some harmless extra wakeups for rare connection- related events. Previously there were too many extra wakeups for non-rare input events. Drivers now call l_modem() instead of setting TS_CARR_ON directly to handle even the initial off to on transition of carrier. They should always have done this. l_modem() now handles TS_CONNECTED and TS_ZOMBIE as well as TS_CARR_ON. gnu/isdn/iitty.c: Set TS_CONNECTED for first open ourself to go with bogusly setting CLOCAL. i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c: We fake carrier, so don't also fake CLOCAL. kern/tty.c: Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to test CLOCAL. TS_ISOPEN was tested instead, but that broke when we disabled the clearing of TS_ISOPEN for certain transitions of CLOCAL. Testing TS_CONNECTED fixes ttyselect() returning false success for output to devices in state !TS_CARR_ON && !CLOCAL. Optimize the other selwakeup() call (this is not related to the other changes). kern/tty_pty.c: ptcopen() can be declared in traditional C now that dev_t isn't short.
* Move the inline code for waking up writers to a new functionbde1995-07-221-0/+4
| | | | | | | | | | | ttwwakeup(). The conditions for doing the wakeup will soon become more complicated and I don't want them duplicated in all drivers. It's probably not worth making ttwwakeup() a macro or an inline function. The cost of the function call is relatively small when there is a process to wake up. There is usually a process to wake up for large writes and the system call overhead dwarfs the function call overhead for small writes.
* Obtained from: partly from an ancient patch of mine via 1.1.5bde1995-07-211-2/+2
| | | | | | | | | | | | | | | Temporarily nuke TS_WOPEN. It was only used for the obscure MDMBUF flow control option in the kernel and for informational purposes in `pstat -t'. The latter worked properly only for ptys. In general there may be multiple processes sleeping in open() and multiple processes that successfully opened the tty by opening it in O_NONBLOCK mode or during a window when CLOCAL was set. tty.c doesn't have enough information to maintain the flag but always cleared it in ttyopen(). TS_WOPEN should be restored someday just so that `pstat -t' can display it (MDMBUF is already fixed). Fixing it requires counting of processes sleeping in open() in too many serial drivers.
* Remove trailing whitespace.rgrimes1995-05-301-42/+42
|
* Fix benign type mismatches int console functions. dev_t was assumedbde1995-04-251-0/+18
| | | | | | | | | to be `int' or smaller and some functions returned `int' instead of `void'. The first bug was detected when console functions were defined in a place central enough for type checking to actually work and the second bug was introduced when the interface was changed to match what the console functions in other drivers actually return.
* Update pcvt to 3.20 b24joerg1995-04-081-34/+17
|
* Correct a few minor things in pcvt:joerg1995-04-011-0/+58
| | | | | | o the includes are now properly done by <sys/foo.h> instead of "foo.h" o a bunch of undeclared functions has been resolved o pcvt finally supports devconfig
* Update pcvt to 3.20b23joerg1995-04-011-2/+10
| | | | Submitted by: Hellmuth Michaelis <hm@altona.hamburg.com>
* Update to beta3.20/b22joerg1995-03-051-18/+71
| | | | pcvt_ioctl.h doesn't belong to here.
* Bring pcvt console driver into the tree - now users can chose whicheverjkh1995-02-051-0/+1427
console driver they like best (2 is ok, it was 4 that was a little insane for awhile there! :-). Submitted by: hm
OpenPOWER on IntegriCloud