IBMAED(4)

NAME
ibmaed, aed - IBM Academic Information Systems experimental display interface

SYNOPSIS
pseudo-device aed

DESCRIPTION
The IBM Academic Information Systems experimental display is a black-and-white, all-points-addressable, bit-mapped display with 812,900 points on the screen. It is driven by an adapter with an on-board processor. The processor executes a microprogram loaded by the host into the display's control store. The microprogram controls the interface between host and display. The host communicates with the microprogram through an area of read/write shared RAM. This memory starts at address 0xf40a4000 and is organized as 4K of 8-bit bytes.

On system startup, the display driver loads the control store with a default microprogram that is part of the driver's initialized data area. The display operates in glass tty mode (the default) and window-manager mode:

-   In glass tty mode, the display serves as the default display device for /dev/console. Kernel printfs and characters written to /dev/console are written to this display. Default mode is in effect when the microprogram starts.

-   In window-manager mode, a user-level process, such as a window manager, can load its own microprogram into the display's control store, and read or write to the display's communications memory. When a process opens /dev/aed, the kernel switches console output to another display device, if available, or buffers the output until later (see cons(4)). At this point, the control memory and communications memory are available for manipulation by the user process. Glass tty mode is reentered when /dev/aed is closed.

The following system calls are supported by /dev/aed:

open
    Initiates window-manager mode. Only one process can open /dev/aed. All file descriptors must be closed before another open is allowed. The process and its children that have file descriptors open to /dev/aed have direct access to the display's shared RAM, until an execve(2) system call is completed.

close
    Terminates a process's read/write access to the display's shared RAM. The last close to /dev/aed ends window-manager mode and reinstates glass tty mode.

read
    Allows read access to the display's control store.

write
    Allows write access to the display's control store.

ioctl
    (Ioctl's defined in <sys/aedioctl.h>) AEDSEM_WHILE, AEDSEM_UNTIL, AEDSEM_SET_WAIT all poll the semaphore, waiting for an event. A specified number of polls occurs before the call returns with a failing (-1) return code. You may alter the default of 250 polls by issuing a AEDSEM_TIMEOUT request. It is often advisable to reissue the failed call later, allowing the display a little more time. It is up to the programmer to decide how many tries make sense before the display can be assumed to be hung. The following requests are supported:

    IOCINFO    Returns device information.

    IOCTYPE    Returns device type.

    AEDGET_SRAM_LOC    Reports address of display-shared RAM.

    AEDRESET    Resets the display. The display processor is
            halted and the program counter is set to 0.

    AEDSEM_READ    Reads the display semaphore.

    AEDSEM_SET    Sets display semaphore to a specified value.

    AEDSEM_SET_WAIT    Sets display semaphore to a specified value and waits
            for it to change, then returns the new value.

    AEDSEM_WHILE    Polls display semaphore until it is no longer equal to
            a specified value.

    AEDSEM_UNTIL    Polls display semaphore until it is equal to a specified
            value.

    AEDSEM_TIMEOUT    Sets the timeout interval.  The default is 250 polls.
            See AEDSEM_WHILE, AEDSEM_UNTIL, AEDSEM_SET_WAIT.
            A request to set the timeout to zero returns the current
            timeou