Storport MSI (Message signaled interrupts)

Source: Internet
Author: User

I recently learned storport miniport driver. When I saw interrupt, I found two methods: one is to respond through the hwinterrupt function in hw_initialization_data (storport, line-based interrupts and message-based interrupts are supported. The other is to respond through hwmsinterruptroutine in port_configuration_information (storport), and only message-based
Interrupts.

Both methods have been tried. So far they are not clear about their differences. For example, if the prawn knows, please kindly advise me ~

The first method is to use the hwinterrupt function in hw_initialization_data to respond. It is relatively simple. You only need to set the corresponding function in DriverEntry. It seems that all interrupts can be responded. During the processing, I found many non-local device interrupts.

The second method is more complex. You need to set the parameters in port_configuration_information in hwfindadatper:

Phw_message_signaled_interrupt_routine hwmsinterruptroutine;
Interrupt_synchronization_mode interruptsynchronizationmode;
Hwmsinterruptrountine is the MSI response function, and interruptsynchronizationmode is the MSI synchronization mode supported by miniport. The values are as follows:

Typedef Enum _ interrupt_synchronization_mode {
Interruptsupportnone,
Interruptsynchronizeall,
Interruptsynchronizepermessage
} Interrupt_synchronization_mode;
You can set the value as needed. I only tried the interruptsynchronizeall method.

In addition, you must add the following items to the installation file *. inf:

// This will 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, 0x00000010HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, 0x00010001, 1//  This code courtesy of Adaptec Corporation

Miniport supports the MSI method. Otherwise, your hwmsinterruptrountine will not be called because the system does not think that your miniport supports MSI.

Related Article

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.