The virtual programmable interrupt controller VPIC.SYS is a virtual device driver responsible for virtualization of hardware interrupts to virtual DOS machines. This device driver simulates interrupts to virtual DOS machines by providing a virtual interface to the 8259 Programmable Interrupt Controller (PIC).
The virtual PIC device driver supports the hardware interrupt-related services needed by virtual device drivers and DOS Sessions. The services include setting handlers to trap EOI and IRET events, simulating interrupts to DOS Sessions, and handling PIC I/O accesses by DOS Sessions. The virtual PIC device driver maintains a per-DOS Session virtual PIC state so that each DOS Session appears to have its own independent 8259 Programmable Interrupt Controller.
This per-DOS Session virtual PIC state contains items such as the current mask, the current IR (interrupt request) and IS (interrupt service) registers, base interrupt vector and initialization mode for a particular VDM. A per-VDM state machine is used to track the initialization control word (ICW) or operation control word (OCW) for which VPIC is waiting. This module also invokes the virtual device driver's EOI handler when it receives EOI commands from a VDM.
The interrupt simulation mechanism is similar to the way signals are handled for OS/2 applications. The virtual PIC device driver can be broken up into two major parts:
Figure "Virtual Programmable Interrupt Controller" below shows this breakdown and the interfaces to other components, it shows the VPIC architecture and the role it plays in virtualizing hardware interrupts to virtual DOS machines.
Not all combinations of ICWs or OCWs are supported. Some seldom used initialization modes and operation commands are ignored. These unsupported features are:
The following tables show in detail which 8259 PIC initialization and operation commands from a VDM are supported by the VPIC. Table "PIC Initialization Control Words" shows the supported and unsupported initialization control words.
Table "PIC Operation Control Words