eti(7)
NAME
eti − edge-triggered interrupt device
DESCRIPTION
The eti device is a software interface provided for edge-triggered interrupts.
Configuration
The edge-triggered interrupts are integral to the system and are always provided. Series 4000 and 5000 systems provide 4 edge-triggered interrupts per processor board. Therefore, Series 4000 HN4400 systems provide a maximum of 4 edge-triggered interrupts, and Series 4000 HN4800 and Series 5000 HN5800 systems provide a maximum of 16 edge-triggered interrupts. The (H)VME edge-triggered interrupt controller may be used to expand the number of edge-triggered interrupts to a maximum of 32 per system.
Hardware Overview
Edge triggered interrupts look for the leading edge of the interrupt signal to trigger an interrupt. Once the interrupt has been recognized, it must be disasserted and reasserted to cause a new interrupt request.
Each edge-triggered interrupt must have a pulse width of at least 1.5 microseconds. Pulses of shorter duration may not be recognized by the interrupt controller. The duration of the pulse is not important, as it is the leading edge of the pulse that triggers the interrupt.
Each interrupt may be unitarily armed or disarmed. After power up initialization, all interrupts are disarmed. An armed interrupt is allowed to generate an interrupt request. When an interrupt is disarmed, any outstanding requests are turned off and ignored.
Each interrupt may be unitarily enabled or disabled. After power up initialization, all interrupts are disabled. An enabled interrupt request is allowed to enter the interrupt priority resolution logic.
When an interrupt is detected on an armed interrupt, it sets an interrupt request to the interrupt controller. This request is held true until the appropriate cpu is interrupted and the interrupt acknowledge cycle completes. Once an interrupt request is set, if the interrupt is enabled, it is sent to the interrupt priority resolution logic. If the request has a priority greater than that of the currently active interrupt (if one is active) and greater than the processor level (for the appropriate cpu), the appropriate cpu will receive an interrupt request. Software may generate an interrupt request with the ETI_REQUEST ioctl(2).
Special Files, Minor Device Numbers
Eti device special file names have the form /dev/reti/eti#. The character "#" stands for the eti number (00-31).
Interrupt Levels
Each eti is associated with an interrupt level. Devices with higher interrupt levels will be serviced before devices of lower interrupt levels. The interrupt level is fixed. Refer to the command config(1M).
User Interface
An eti is controlled by open(2), close(2), and ioctl(2) system calls.
The open(2) call assigns a file descriptor to one edge-triggered interrupt and verifies the interrupt is not currently being used by another device driver. One device file (e.g. /dev/reti/eti00) exists for each edge-triggered interrupt. A close(2) call frees the file descriptor and removes any attached signals. The ioctl(2) call controls the edge-triggered interrupt. In addition, all ioctl(2) calls use the constants defined in <sys/eti.h>. Note that this device does not support the read(2) and write(2) system calls.
The integral edged triggered interrupts may be controlled from user-level processes through the use of the eti_request(3C) library routine. For more information on this feature, see eti_request(3C).
Ioctl Calls
All the following ioctl(2) calls require the user to have read and write access to the device.
The following ioctl(2) calls have the form:
#include <sys/types.h>
#include <sys/rtc.h>
#include <sys/eti.h>
ioctl(fildes, command, 0)
int fildes, command;
The commands are:
ETI_ARMArm the edge-triggered interrupt.
ETI_DISARMDisarm the edge-triggered interrupt.
ETI_ENABLEEnable the edge-triggered interrupt.
ETI_DISABLEDisable the edge-triggered interrupt.
ETI_REQUESTGenerate a software requested interrupt on the edge-triggered interrupt. The eti must previously have been enabled.
The remaining ioctl(2) calls have the following form:
#include <sys/types.h>
#include <sys/rtc.h>
#include <sys/eti.h>
ioctl(fildes, command, arg)
int fildes, command;
int ∗arg;
The commands are:
ETI_ATTACH_SIGNALAttach the signal number pointed to by arg to the edge-triggered interrupt. The signal will be generated on every interrupt.
ETI_VECTORPlace the edge-triggered interrupt vector number in the address pointed to by arg. Any device being attached to a frequency-based scheduler must support this ioctl command.
For compatibility reasons, this command has the same value as the IOCTLVECNUM command. The interrupt vector number returned from this call may be used on a subsequent iconnect(2) system service call to connect a user-level interrupt routine to the edge triggered interrupt. For more information on user-level interrupt routines, see iconnect(2).
ETI_VMEIf this edge-triggered interrupt is configured on an (H)VME edge-triggered interrupt controller, return a 1 in the address pointed to by arg; otherwise, return a 0.
FILES
/dev/reti/eti[00-31] eti raw (character) special files
ERROR CODES
Open or ioctl will fail if one or more of the following are true:
[ENODEV] The edge-triggered interrupt does not exist.
[ENXIO] The edge-triggered interrupt is not properly configured.
[EBUSY] The edge-triggered interrupt is in use by another device driver.
[EBADF] Fildes is not a valid open file descriptor.
[EINVAL] Request or argument is not valid.
SEE ALSO
ioctl(2), open(2), close(2), iconnect(2), eti_request(3C), pig(7)
CX/UX Administrator’s Reference