CONS(4)

NAME
cons - keyboard and console display interface

DESCRIPTION
The keyboard and various possible displays combine to provide a terminal-like interface to the system. Internally, these are separate devices which software combines to emulate a normal terminal. See the appropriate manual pages for information about each display and the keyboard.

The keyboard adapter also supports the speaker, which is activated when the ASCII character bel (^G) is sent to the display via software.

Console Device Control.

The display devices, /dev/ttyaed, /dev/ttymono, /dev/ttyap16, /dev/ttyapa8, and /dev/ttyap8c are all minor devices under /dev/console, and are all capable of displaying console output. Uniq to this system is the fact that you may have one or more of these displays on your workstation at a time and any one can act as a console. Since we only have one keyboard and system mouse the console driver multiplexes these two input devices to the many displays. All of the displays may have simultaneous logins and the user may "hot key" between each display. At first, this Input focus is on the first device in the above sequence to be found at initialization time. The input focus may be manually switched to the next available display by hiting the default "hot key" <F12>. When the input focus is on a display all keyboard and mouse data will be sent to the process which opened that display.

If a process opens /dev/console it gets assigned to whatever the input focus was at the time of the open. A user can forward console messages to any tty/display with the TIOCCONS ioctl.

In order to support the many displays and the multiplexing between them an, Emulator Package was developed to work with the console driver. This package allows different types off emulation on input and output to be written device independently.

The display devices, /dev/aed, /dev/mono, /dev/apa16, /dev/apa8, and /dev/apa8c are all

Should a user-process open the current console display (thus making it unavailable for console use), the console output switches to the next available display. A device is available if it is present, not already open, and access has not been denied (as described below.)

Should no display be available to serve as console, console output is stored in a system-provided circular buffer. Once the user-process completes, the display is reopened as a console and the buffer contents are flushed to the display.

Controlled access to multiple console displays.

It can be useful to deny access temporarily to one or more displays. For example, if the monochrome/printer adapter is present, the kernel assumes the presence of the monochrome display -- even if disconnected -- and attempts to initialize it. This can be blocked by modifying the access control bits for each display device (see <machinecons/consio.h>):

    CONSDEV_KERNEL (this device available to kernel)
    CONSDEV_USER (this device available to user)

An ioctl, SCRIOCSETC (screen ioctl:set configuration), sets the desired access rights of a particular device. SCRIOCGETF (screen ioctl:get flags) gets the present state of a particular device:

    CONSDEV_PRESENT    (kernel has detected adapter)
    CONSDEV_KERNEL
    CONSDEV_USER
    CONSDEV_INIT (device is initialized for console use)
    CONSDEV_OPEN (device is opened for user access).

These ioctls are used by setscreen(8).

NOTE
The kernel flashes ``98'' on the LEDs if it cannot find any configured display during initialization, and then proceeds.

FILES
/dev/console
/dev/mono
/dev/apa8
/dev/apa16
/dev/aed

SEE ALSO
ibm5151(4), ibm6153(4), ibm6155(4), ibmaed(4), keyboard(4), tty(4), setscreen(8)

DIAGNOSTICS
None.