IOCTL_HAL_REQUEST_SYSINTR

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

This IOCTL requests an IRQ-to-SYSINTR mapping. It should be called by bus drivers that populate the registry with SYSINTRs for the device driver that the bus drivers load.

The OEMIoControl function calls this IOCTL.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_REQUEST_SYSINTR.
  • lpInBuf
    [in] IRQ to translate into a SYSINTR.
  • nInBufSize
    [in] Size of lpInBuf.
  • lpOutBuf
    [out] SYSINTR translated from an IRQ.
  • nOutBufSize
    [out] Size of lpOutBuf.
  • lpBytesReturned
    [in] If not NULL, set to size of DWORD.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

A bus driver reads its SYSINTR value from the registry. It also reads the IRQ value, if necessary. If this is a built-in device, set up the mapping in the OEMInit function and place the SYSINTR in the associated registry entry for the device. Bus drivers, such as the PCI bus driver, use IOCTL_HAL_REQUEST_SYSINTR to allocate SYSINTRs and subsequently populate the registry for the device it is loading a driver for.

There are two ways to map multiple system interrupts to a single shared IRQ:

  • Use IOCTL_HAL_REQUEST_SYSINTR to pass the OAL your IRQ. The OAL returns a Sysintr value that you can use.
    If your driver unloads, use IOCTL_HAL_RELEASE_SYSINTR.
  • Hard-code the Sysintr values into your OAL.
    Multiple Sysintr values can correspond to one IRQ. IRQ values and Sysintr values have a one-to-one relationship, which defines the default Sysintr value for the IRQ. For example, see SETUP_INTERRUPT_MAP and OEMRequestSysIntr.
    You can add the hard-coded Sysintr values, beginning at SYSINTR_FIRMWARE + 16, to OEMInit, immediately after the last SETUP_INTERRUPT_MAP. You cannot use SETUP_INTERRUPT_MAP directly because it includes instances of DEBUGCHK that ensure the same IRQ is not mapped twice. Although this method is not as flexible as the one above, after you configure the OAL, you can update the registry to inform the serial drivers which Sysintr to use.

For information about mapping multiple IRQs to a SYSINTR, see OALIoCtlHalRequestSysIntr.

The following code example states the calling convention used by the common implementation of IOCTL_HAL_REQUEST_SYSINTR.

UINT32 aIrqs[3];

aIrqs[0] = -1;
// Using -1 indicates we are not using the legacy calling convention.

aIrqs[1] = OAL_INTR_TRANSLATE;  
// Flags – in this case we want the existing sysintr if it
// has already been allocated, and a new sysintr otherwise.

aIrqs[2] = irq;

OEMIoControl(IOCTL_HAL_REQUEST_SYSINTR, aIrqs, sizeof(aIrqs), &sysIntr, sizeof(sysIntr), NULL);

Requirements

Header pkfuncs.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IOCTL_HAL_TRANSLATE_IRQ
IOCTL_HAL_RELEASE_SYSINTR
OEMInit
OEMIoControl
OEMRequestSysIntr

Other Resources

Controlling Debug Message Output With Macros
NdisMRegisterInterrupt
Installable ISRs and the Kernel