Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ skd(7) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stty(1)

console(7)

display(7)

keyboard(7)

sasy(7)

slp(7)

termio(7)

vt(7)

ioctl(2)



          skd(7)               INTERACTIVE UNIX System               skd(7)



          NAME
               skd - SunRiver keyboard display driver

          DESCRIPTION
               The SunRiver console is composed of two separate pieces:
               the keyboard (see keyboard(7)) and the display.  The key-
               board interface is discussed separately in keyboard(7).  The
               display is functionally equivalent to display(7) except for
               the differences described in this entry.

             Ioctl Calls
               The following ioctls can be used with either the monochrome
               or color/graphics adapter:

               KDDISPTYPE
                    This ioctl returns the following structure, which is
                    pointed to with the argument that is passed:

                    struct kd_disparam {
                    long type;/* display type */
                    char *addr;/* display memory address */
                    ushort ioaddr [ MKDIOADDR ];/* valid I/O addresses */
                    };

                    The type member indicates the type of display and will
                    be one of the following:
                                       _________________
                                      | KD_MONO       1|
                                      | KD_HERCULES   2|
                                      | KD_CGA        3|
                                      | KD_EGA        4|
                                      | KD_VGA        5|
                                      |________________|
                    The addr member indicates the physical address of the
                    display.  It will be either 0xF10000 in systems without
                    cache memory and 0x8000F10000 in the case of systems
                    with cache memory.  The ioaddr member contains the glo-
                    bal keyboard/display port list that is used for direct
                    ins and outs to the SunRiver Station.

               KDMAPDISP
                    This call allows one to have direct access to the
                    display and I/O ports.  It is especially useful in pro-
                    viding a way to do nonportable but fast graphics on the
                    display.  The following structure, defined in
                    <sys/kd.h>, is pointed to by the argument to the ioctl:


                    struct kd_memloc {
                     char  *vaddr; /* virtual address to map to*/
                     char  *physaddr;/* physical address to map from */
                     long  length; /* size in bytes to map */
                     long  ioflg;  /* enable I/O addresses if non-zero */


          Rev. 1.2                                                   Page 1





          skd(7)               INTERACTIVE UNIX System               skd(7)



                    };

                    The vaddr argument is the linear address in the process
                    where the display buffer will appear.  This address
                    must be on a page (4K byte) boundary.  The physaddr
                    argument is the physical address of the SunRiver Sta-
                    tion.  It must be between 0xF10000 and 0xF30000.  It
                    must also be on a page boundary.  The length argument
                    is the size of the display buffer that will be mapped
                    in.  It must be a multiple of 4K bytes.  The ioflg
                    argument tells whether (1) or not (0) to enable the
                    global keyboard/display ports for direct access to the
                    I/O ports similar to the KDENABIO and KDDISABIO ioctls.

                    The memory that had existed at address vaddr for length
                    bytes will be irretrievably deleted, and the current
                    contents of the display buffer will be placed at those
                    locations.  It is necessary for the virtual terminal to
                    be in process (VT_PROCESS) mode and for the display
                    device to be in KD_GRAPHICS mode.  One way of allocat-
                    ing the virtual memory in the user's address space that
                    will be mapped to the screen is to call malloc request-
                    ing (length + 4096) bytes.  Then using the address that
                    malloc returns, round it up to the next page (4K byte)
                    boundary and use the result as vaddr.

                    The ioctl will fail if the virtual terminal is not in
                    process mode or if the display is not in KD_GRAPHICS
                    mode [EACCES].  It will fail if any of the arguments
                    are out of range or not properly aligned [EFAULT].  It
                    will fail if the display is already mapped to [EIO].

               KDMAPBIOS
                    This call takes no arguments.  It maps in the system
                    BIOS to virtual address 0xC0000 in the user's address
                    space.

               KDMAPSUNRIV
                    This ioctl is not implemented.  It returns -1.

               KDMACHENV
                    This call returns information about the machine
                    environment.  The following structure, defined in
                    <sys/machenv.h>, is returned by the ioctl:


                    struct machenv {
                     unsigned      charmachine;
                     unsigned      charadapter;
                     unsigned      chardrive;
                     unsigned      charspecial;
                    };



          Rev. 1.2                                                   Page 2





          skd(7)               INTERACTIVE UNIX System               skd(7)



                    The only field currently being used is the machine
                    field.  This field can contain a 0 or the value 1,
                    which indicates that the computer in use is a COMPAQ.

          FILES
               /dev/st*

          SEE ALSO
               stty(1), console(7), display(7), keyboard(7), sasy(7),
               slp(7), termio(7), vt(7).
               ioctl(2) in the INTERACTIVE SDS Guide and Programmer's
               Reference Manual.

          ADDED VALUE
               This entry, supplied by INTERACTIVE Systems Corporation, is
               an extension of UNIX System V.







































          Rev. 1.2                                                   Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026