Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ igsp(7) — Interactive 3.2r4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Xigsp(1)

sdevice(4)

igsp(7)  —  

NAME

igsp − IMAgraph TI1210 driver

DESCRIPTION

The IMAgraph TI1210 kernel driver facilitates accessing the IMAgraph TI1210 board.  It is a regular character-based driver that manages one TI1210 board.  It is used by programs that draw using the graphics modes of TI1210. 

CONFIGURATION

The sdevice(4) file /etc/conf/sdevice.d/igsp describes the board address, the I/O port addresses, and the shared video memory (VRAM).  There are two entries in this file.  The second field in both entries tells whether or not the igsp is configured.  Both should be the same value, either Y or N.  The ninth and tenth fields in the first entry in this file describe the starting and ending memory addresses.  The seventh and eighth fields in the first entry describe the I/O port address including the bank select register.  The ninth and tenth fields in the second entry in this file describe the starting and ending memory address of the shared VRAM addresses.  The I/O ports and the VRAM fields are not used for the Xigsp server for X11.  All of these fields are given in hexadecimal.  The default sdevice file entries with memory addresses of C700 hex are:

igspY10002b02bfc7000c7fff
igspY100000d0000d3fff

If you want to use a memory address of B700 hex instead, then the following sdevice entries should be used:

igspY10002b02bfb7000b7fff
igspY100000d0000d3fff

If you want to use a memory address of D700 hex instead, then the following sdevice entries should be used:

igspY10002b02bfd7000d7fff
igspY100000d0000d3fff

If you change the default sdevice entry, you will have to build a new kernel and boot it for these changes to become effective. 

Be sure to configure both sub-devices of the igsp driver when adding the igsp device. 

PROGRAMMING INTERFACE

The IMAgraph TI1210 device is opened by a call to open. Currently, only minor device 0 is supported. If a non-zero minor device is specified, then an error will occur and errno will be set to ENOENT.  A simple check is done to see if the TI1210 board is in the system.  If it is not, an error will result and errno will be set to ENXIO.  A memory address clash can also cause this error.  Only one user is allowed to open the TI1210 board at a time, unless the subsequent user is the superuser.  If a subsequent open is attempted by another user who is not the superuser, an error will result and errno will be set to EPERM. 

Read and write interfaces are provided to access the memory of the Texas Instruments 34010 processor in the TI1210.  Seek addresses are specified in bytes.  Because addresses on a 34010 processor are given in bits, it is necessary to divide the bit address by 8 to get a byte address.  The state of the 34010 is saved before each read and write, and it is restored when they are completed. 

The following ioctl calls allow a user program to access the TI1210 board directly:

IGSP_GET_INFO
This ioctl returns a structure containing the addresses of the board described in the section “Configuration” above.  The structure returned is:

typedef struct  igsp_info  {
char*igsp_addr;/* physical address */
char*igsp_endaddr; /* physical address */
shortigsp_port;/* i/o port */
shortigsp_endport;/* i/o port */
char*igsp_vram;/* physical address */
char*igsp_endvram; /* physical address */
}   igsp_info_t;

This structure is filled in with information in the seventh through tenth fields of the sdevice file.  It is stored at the location specified by the argument that is passed. 

IGSP_MAP_BOARD
This ioctl allows the process to have direct access to the TI1210 memory.  The argument passed is the address of the memory to map to the TI1210 board.  It must be page (4096 byte) aligned and span a length specified by the sdevice file (which is also a multiple of 4096 bytes).  The memory that had existed at the argument passed will be irretrievably deleted, and the current contents of the TI1210 memory will be placed at those locations.  One way of allocating the virtual memory in the user’s address space that will be mapped to the TI1210 memory is to call malloc requesting (length + 4096) bytes.  Then, using the address that malloc returns, round it up to the next page (4K) boundary and use the result as the argument to this ioctl.

IGSP_UNMAP_BOARD
This ioctl call unmaps the direct access to the TI1210 memory.  The map must have been set up with IGSP_MAP_BOARD by the current process.  The argument passed should be the same one given to IGSP_MAP_BOARD.  The memory where the TI1210 memory had been becomes zeros. 

IGSP_MAP_VRAM
This ioctl allows the process to do in and out instructions at the I/O ports specified in the sdevice file as well as mapping an area of memory for the shared VRAM.  The argument passed is the address of memory to map to the VRAM.  The VRAM is mapped in the same way as the board is, with the same restrictions. 

IGSP_UNMAP_VRAM
This ioctl prevents the process from doing in and out instructions at the I/O ports specified in the sdevice file as well as unmapping the VRAM.  The argument passed should be the same one given to IGSP_MAP_VRAM. 

FILES

/dev/igsp

SEE ALSO

Xigsp(1). 
sdevice(4) in the INTERACTIVE SDS Guide and Programmer’s Reference Manual.

\*U  —  Version 1.0

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