往中断地址中写msg。msix使用读写方式,msi使用pci操作寄存器方式。 都是获取message addr和message data __pci_write_msi_msg:if(entry->pci.msi_attrib.is_msix){void__iomem*base=pci_msix_desc_addr(entry);//目标msix entrywritel(msg->address_lo,base+PCI_MSIX_ENTRY_LOWER_ADDR);writel(msg->addres...
[20] Unsupported Request Error Status 收到的报文不属于任何一种协议规定的DLLP或TLP类型,或者报文的域段非法或越界(如MEM WRITE访问越界)等。注意,只要是会返回Comleter报文的请求,就不会上报Unsupported Request Error,而是通过Comleter报文来指示,比如,cfg报文访问设备未实现的function。 [21] ACS Violation Statu...
2566structmsi_msg msg; 2567intirq, ret; 2568irq=create_irq(); 2569if(irq<0) 2570returnirq; 2571 2572ret=msi_compose_msg(dev, irq,&msg); 2573if(ret<0) { 2574destroy_irq(irq); 2575returnret; 2576} 2577 2578set_irq_msi(irq, desc); 2579write_msi_msg(irq,&msg); 2580 2581set_ir...
l INTx 中断 Message(INTx Interrupt Messages) 许多设备都适用 PCI 2.3 的 MSI(Message Signaled Interrupt)方法来传输中断,但是对于老的设备来说可能会不支持 MSI。对于这些情况,PCIe 定义了一个“虚拟线 virtual wire”作为替代方案,设备通过发送 Message 来模拟 PCI 中断引脚(INTA-INTD)的拉起与释放。中断设备...
这个函数的作用是,给定的pci设备,以及一些msix表的entry,申请向量号位于一个范围的中断向量。配置设备的MSI-X Capability结构体。 struct msix_entry 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 struct msix_entry{u32 vector;/* Kernel uses to write allocated vector */u16 entry;/* Driver...
Message Requests follow the same ordering rules as Memory Write Requests。 寻址方式:隐含寻址,由Type域中的r[2:0]决定,即Type域的最后三位。具体寻址映射如下: r[2:0]是010时,寻址方式就是ID寻址。 5. Completion Rules(应答机制) completion包用ID寻址方式,寻址使用的ID就是request提供的requester ID。除...
msi-map = <0x0 &its 0x0 0x1000>; interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>, <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>, <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>; interrupt-names = "sys", "legacy", "client"; #interrupt-cells = <1>; ...
Pci.Read() 和 Pci.Write() 函数用来访问 PCI/PCIE 设备的配置空间。参数 Offset 用来指定在配置空间内的偏移地址,比如 Offset=0x10 时,是指 BAR0 寄存器。 PCI 设备的基本配置空间是由 64 字节(0x00~0x3F)组成的,这是所有 PCI/PCIE 设备必须支持的。此外,PCI/PCIE 设备还扩展了 0x40~0xFF 这段配置空...
7. pci_enable_msi():它允许PCI设备使用MSI中断机制,当函数被调用时,它将被指定的PCI设备启用MSI中断,并返回中断号。 8. request_irq():注册中断服务函数,当中断发生时,系统调用这个函数。 9. pcie_capability_write_dword(..., ..., PCI_EXP_DEVCTL_EXT_TAG):PCI_EXP_DEVCTL_EXT_TAG,标识设备的DevCtl...
[ 2369.908075] ---[ cut here ]--- [ 2369.908077] kernel BUG at drivers/pci/msi.c:355! [ 2369.908081] invalid opcode: 0000 [#1] SMP [ 2369.908148] Modules linked in: fuse xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv...