VPICD_IRQ_Descriptor


include vpicd.inc

VPICD_IRQ_Descriptor  STRUC
    VID_IRQ_Number       dw   ?
    VID_Options          dw   0
    VID_Hw_Int_Proc      dd   ?
    VID_Virt_Int_Proc    dd   0
    VID_EOI_Proc         dd   0
    VID_Mask_Change_Proc dd   0
    VID_IRET_Proc        dd   0
    VID_IRET_Time_Out    dd   500
    VID_Hw_Int_Ref       dd   ?
VPICD_IRQ_Descriptor  ENDS

Contains information about a virtualized IRQ.

VID_IRQ_Number

Number of the IRQ to virtualize.

VID_Options

Options for virtualizing the IRQ. It can be a combination of the following values:

VPICD_OPT_READ_HW_IRR

Reads the hardware interrupt register.

VPICD_OPT_CAN_SHARE

Virtual IRQ can be shared.

VPICD_OPT_REF_DATA

Set this bit if you want to pass reference data in the VID_Hw_Int_Ref member to your hardware interrupt handler.

VPICD_OPT_VIRT_INT_REJECT

Within your virtual interrupt procedure, set this bit and return with the carry flag set if you no longer want the interrupt virtualized.

VPICD_OPT_SHARE_PMODE_ONLY

This bit is only used in debug Windows and you must also set the bit VPICD_OPT_CAN_SHARE. If set, the system displays a debug warning message if VPICD_Set_Int_Request is called. .


VID_Hw_Int_Proc

Address of the callback procedure that handles hardware interrupts for this IRQ.

VID_Virt_Int_Proc

Address of the callback procedure that handles virtual interrupts for this IRQ.

VID_EOI_Proc

Address of the callback procedure that handles end-of-interrupt commands for this IRQ.

VID_Mask_Change_Proc

Address of the callback procedure that handles changes to the IRQ mask for this IRQ.

VID_IRET_Proc

Address of the callback procedure that handles iret instructions for this IRQ.

VID_IRET_Time_Out

Maximum amount of time in milliseconds that the virtual PIC device allows before the time out occurs.

VID_Hw_Int_Ref

Reference data that the system passes to the hardware interrupt handler. The VID_Options bit VPICD_OPT_Ref_Data must be set in order for the data to be passed to the handler.

Time outs are very important to prevent Windows from hanging while simulating a hardware interrupt.