windows驱动中如何添加msix-table

wl277 2017-10-09 03:41:25
想要在windows的PCIE驱动中使用msix中断,但是不知道如何配置中断表,官网给出了下面的方式,但是我想知道应该用什么函数,具体配置流程,希望知道的大大能多多指导。
Dynamically Configuring MSI-X
Windows Vista Service Pack 1 (SP1), Windows Server 2008, and later operating systems support dynamically modifying the properties of MSI-X interrupt messages. (The PCI 3.0 specification defined MSI-X.) The PCI bus driver exposes the GUID_MSIX_TABLE_CONFIG_INTERFACE interface to allow drivers for PCI devices to modify the settings in the bus hardware interrupt table.
Drivers use the interface by sending an IRP_MN_QUERY_INTERFACE request to the bus driver, with the InterfaceType parameter equal to GUID_MSIX_TABLE_CONFIG_INTERFACE. The bus driver supplies a pointer to a PCI_MSIX_TABLE_CONFIG_INTERFACE structure, which supplies pointers to three routines that modify the interrupt table:
SetTableEntry assigns a message ID to the hardware table entry.
MaskTableEntry masks the interrupt corresponding to a hardware table entry.
UnmaskTableEntry unmasks the interrupt corresponding to a hardware table entry.
By default, the interrupt table is configured so that the first entry has message ID zero, the second entry has message ID one, and so on. If the number of table entries exceeds the number of messages, each additional table entry is assigned message ID zero. (The message ID is the index for the interrupt's entry in the MessageInfo member of the IO_INTERRUPT_MESSAGE_INFO structure that describes the driver's message-signaled interrupts. The IoConnectInterruptEx routine supplies a pointer to this structure.)
...全文
283 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,600

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧