Storport MSI (message signaled interrupts)

Source: Internet
Author: User

In the recent study of Storport miniport Driver, when you see interrupt, there are two ways to respond by Hw_initialization_data function in Storport (hwinterrupt). Support line-based interrupts and message-based interrupts; another is through Port_configuration_information (Storport) Hwmsinterruptroutine in response to message-based interrupts.

These two ways have tried, so far not clear their differences, such as the prawns know, but also please enlighten ~

The first way, through the hw_initialization_data in the Hwinterrupt function to respond, relatively simple, only to set the corresponding function in DriverEntry. Seems to be able to respond to all of the interrupts, the author found in the process of a lot of non-device interrupt.

The second approach is relatively complex, and you need to set the parameters in the port_configuration_information in Hwfindadatper:

Phw_message_signaled_interrupt_routine Hwmsinterruptroutine;
Interrupt_synchronization_mode Interruptsynchronizationmode;
Where Hwmsinterruptrountine is the MSI response function, Interruptsynchronizationmode is the MSI synchronization mode supported by miniport, with the following values:

typedef enum _INTERRUPT_SYNCHRONIZATION_MODE {
Interruptsupportnone,
Interruptsynchronizeall,
Interruptsynchronizepermessage
} Interrupt_synchronization_mode;
Can be based on the needs of the value, the author only tried the Interruptsynchronizeall way.

In addition, the following items need to be added to the installation file *.inf:

This'll create entries under:
//hkey_local_machine\system\currentcontrolset\enum\pci\ven_xxxx&
// Dev_yyyy&subsys_zzzzvvvv&rev_xx\3&61aaa01&0&fa\device
//Parameters\interrupt Management \messagesignaledinterruptproperties

[XYZdriver_Inst.nt.HW]
AddReg = Msienable_addreg

[msienable_ AddReg]
HKR, Interrupt management\messagesignaledinterruptproperties, 0x00000010 HKR
, Interrupt management\ Messagesignaledinterruptproperties, msisupported, 0x00010001, 1


//This  code courtesy of Adaptec Corporation


indicates that miniport supports MSI, or that your miniport supports MSI, and that your hwmsinterruptrountine will not be invoked.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.