summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcvt
Commit message (Collapse)AuthorAgeFilesLines
* - Remove cdevsw_add().yokota1999-10-061-4/+5
| | | | | - Call ttyregister() and make_dev() to register virtual terminals. - Set nottystop to tp->t_stop.
* Introduce ttyread() and ttywrite() which do the canonical thing.phk1999-09-281-26/+2
| | | | | | Use them in many tty drivers. Reviewed by: julian, bde
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* This patch clears the way for removing a number of tty relatedphk1999-09-251-12/+6
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-20/+0
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-1/+1
| | | | may not compile, I can't test it.
* Keyboard allocation/deallocation fix.yokota1999-06-292-33/+69
| | | | | | | | - Do not try to allocate a keyboard in pccnprobe() when probing the vt driver for the kernel console. Rather, allocate a keyboard when initializing the vt driver in pccninit(). - Release the keyboard in pccnterm(). - Don't try to read from the keyboard, if it is not present.
* The second phase of syscons reorganization.yokota1999-06-221-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split syscons source code into manageable chunks and reorganize some of complicated functions. - Many static variables are moved to the softc structure. - Added a new key function, PREV. When this key is pressed, the vty immediately before the current vty will become foreground. Analogue to PREV, which is usually assigned to the PrntScrn key. PR: kern/10113 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de> - Modified the kernel console input function sccngetc() so that it handles function keys properly. - Reorganized the screen update routine. - VT switching code is reorganized. It now should be slightly more robust than before. - Added the DEVICE_RESUME function so that syscons no longer hooks the APM resume event directly. - New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING, SC_NO_HISTORY and SC_NO_SYSMOUSE. Various parts of syscons can be omitted so that the kernel size is reduced. SC_PIXEL_MODE Made the VESA 800x600 mode an option, rather than a standard part of syscons. SC_DISABLE_DDBKEY Disables the `debug' key combination. SC_ALT_MOUSE_IMAGE Inverse the character cell at the mouse cursor position in the text console, rather than drawing an arrow on the screen. Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG) SC_DFLT_FONT makeoptions "SC_DFLT_FONT=_font_name_" Include the named font as the default font of syscons. 16-line, 14-line and 8-line font data will be compiled in. This option replaces the existing STD8X16FONT option, which loads 16-line font data only. - The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c. - The video driver provides a set of ioctl commands to manipulate the frame buffer. - New kernel configuration option: VGA_WIDTH90 Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These modes are mot always supported by the video card. PR: i386/7510 Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx. - The header file machine/console.h is reorganized; its contents is now split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h (another new file). machine/console.h is still maintained for compatibility reasons. - Kernel console selection/installation routines are fixed and slightly rebumped so that it should now be possible to switch between the interanl kernel console (sc or vt) and a remote kernel console (sio) again, as it was in 2.x, 3.0 and 3.1. - Screen savers and splash screen decoders Because of the header file reorganization described above, screen savers and splash screen decoders are slightly modified. After this update, /sys/modules/syscons/saver.h is no longer necessary and is removed.
* Simplify cdevsw registration.phk1999-05-311-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-6/+20
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Updated a comment (Crtat is no longer bogusly shared with syscons).bde1999-05-121-2/+0
| | | | Don't declare a nonexistent variable.
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* Suser() simplification:phk1999-04-272-3/+3
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Make pcvt compile and run again after find_display() is gone as part ofhm1999-04-204-109/+23
| | | | the new-bus changes. Also fix several compiler warnings.
* Staticize.eivind1999-04-111-1/+1
|
* Keyboard driver update in preparation for the USB keyboard driver.yokota1999-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - Refined internal interface in keyboard drivers so that: 1. the side effect of device probe is kept minimal, 2. polling mode function is added, 3. and new ioctl and configuration options are added (see below). - Added new ioctl: KDSETREPEAT Set keyboard typematic rate. There has existed an ioctl command, KDSETRAD, for the same purpose. However, KDSETRAD is dependent on the AT keyboard. KDSETREPEAT provides more generic interface. KDSETRAD will still be supported in the atkbd driver. - Added new configuration options: ATKBD_DFLT_KEYMAP Specify a keymap to be used as the default, built-in keymap. (There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP, SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap. These options are now gone for good. The new option is more general.) KBD_DISABLE_KEYMAP_LOADING Don't allow the user to change the keymap.
* Use suser() to check for super user rather than examining cr_uid directly.phk1999-01-301-1/+1
| | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles.
* Remove unintended trigraph sequences in comments for -Walldillon1999-01-271-2/+2
|
* Fix various breakage after the recent keyboard driver change.yokota1999-01-142-14/+15
| | | | | | - Don't try to set typematic rate if there is not a keyboard. - Fix wrong test on error code. - Don't try to claim the keyboard twice. The second call will fail.
* The first stage of console driver reorganization: activate newyokota1999-01-113-275/+203
| | | | | | | | | | | | | keyboard and video card drivers. Because of the changes, you are required to update your kernel configuration file now! The files in sys/dev/syscons are still i386-specific (but less so than before), and won't compile for alpha and PC98 yet. syscons still directly accesses the video card registers here and there; this will be rectified in the later stages.
* Remove a hard-coded table of kernel console I/O functions exportedyokota1999-01-071-5/+13
| | | | | | | | | | from sc, vt and sio drivers. Use instead a linker_set to collect them. Staticize ??cngetc(), ??cnputc(), etc functions in sc and vt drivers. We must still have siocngetc() and siocnputc() as globals because they are directly referred to by i386-gdbstub.c :-( Oked by: bde
* Part 3 of the pcvt/voxware revival.peter1999-01-0110-0/+17319
| | | | Reviewed by: core
* Pre 3.0 branch cleanup casualty #4: pcvtphk1998-12-2710-17319/+0
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-1/+4
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-1/+1
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* * 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-222-0/+3
| | | | | | | 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.
* Correct handling of ASCII DEL (0x7F).jkoshy1998-08-191-4/+6
| | | | | | | | | | | | I don't have access to a real VT220 to verify this against. However, I'm committing the patch in `good faith' because (a) getting hold of a real VT220 is going to be increasingly difficult the longer the PR sits around, (b) some one was troubled enough to in a PR and (c) the fix is minor and has no other implications. PR: 7559 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
* Correct glyph displayed by PCVT in ISO Latin-1 mode.jkoshy1998-08-191-1/+1
| | | | | PR: 7610 Submitted-by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
* 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.
* Correct sleep priority.dyson1998-06-021-2/+2
|
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-171-1/+1
|
* Support compiling with `gcc -ansi'.bde1998-04-151-1/+1
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Don't access "time" directly.phk1998-03-291-2/+2
|
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-0/+2
| | | | used.
* Staticize.eivind1998-02-091-2/+2
|
* Back out DIAGNOSTIC changes.eivind1998-02-061-2/+0
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-0/+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.
* Make all the documented (in pcvt(4)) options supported options. Whilejoerg1997-10-181-0/+3
| | | | | | | i was at it, do no longer insist on `PCVT_FREEBSD' being declared in the config file, but default it to a reasonable value. More cleanup to follow, but this part is safe for RELENG_2_2, too.
* Update for changes in the callout interface.gibbs1997-09-212-14/+25
|
* Fix the broken VT_WAITACTIVE ioctl for the case where the third argjoerg1997-09-141-15/+3
| | | | | | | | | | | | | | | was 0. PR: 4164 Submitted by: Joe Traister <traister@mojozone.org> While i was at it, also fixed a broken return value for the VT_RELDISP ioctl, iff the third arg was legally VT_TRUE, but the destination screen was in process mode so the actual switch had to be deferred. This was breaking the ability to directly toggle between two X servers running on two VTs, since the server getting the bogus error return was running wild, and competing with the other one for the hardware. (Sigh, this was a very long-standing bug.)
* Update select -> poll in drivers.peter1997-09-141-1/+1
|
* Finished (?) converting md_regs to a `struct trapframe *'. Some bogus castsbde1997-07-201-2/+2
| | | | are now unnecessary.
* #include <machine/stdarg.h> in the one place in pcvt that it is usedbde1997-07-202-6/+6
| | | | instead of centrally.
OpenPOWER on IntegriCloud