I have a problem with some code I've ported from QNX 6.6 to QNX 7 for an x86 system, dealing with a PCIe device.
The motherboard (Gigabyte Z390 UD) is quite new, so I expect it should be no issue.
I can set BIOS settings for "other PCI devices" to "UEFI" or "Legacy" and have the same results.
It appears the program in QNX 7 never receives interrupts from the card. It does in QNX 6.6 on the same machine.
Both cases do not enable MSI capability. I start the pci-server with no parameters.
I've been researching QNX 7 pci-server stuff, but have come to no solution.
Environment variables include PCI_HW_MODULE=/lib/dll/pci/pci_hw-Intel_x86.so
I have not set PCI_HW_CONFIG_FILE
The code for QNX 7 to get IRQ is:
pci_err_t r;
pci_irq_t irq;
int_t nirq = 1;
r = pci_device_read_irq(m_hPciDevice, &nirq, &irq);
if (r == PCI_ERR_OK)
{
slog2f(NULL, 0, SLOG2_INFO, "IRQ count %d", nirq);
if (nirq == 1)
slog2f(NULL, 0, SLOG2_INFO, "IRQ value %d", irq);
}
This shows some QNX 7 slog output from program and pci_server during trying to setup the card.
It shows that it can find the card, because the addresses found are correct.
But the IRQ reported is zero.
Read device addresses
Address 0x4b50c000, BAR# 0, size 0, type 16384
Address 0x4b500000, BAR# 0, size 1, type 32768
Address 0x4b508000, BAR# 0, size 2, type 16384
using pci_device_read_irq
IRQ count 1
IRQ value 0
Map memory index 2, addr 0x0, mem 7fc6e1c
Map memory index 3, addr 0x2, mem 7fc6e24
Map memory index 0, addr 0x1, mem 1e029394
pci_server.3..0 pci_dbg 0 DEBUG,1,0,3 [3:3]: intpin_to_pirq(): Determine B1:D0:F0 PIRQ ...
pci_server.3..0 pci_dbg 0 DEBUG,1,0,3 [3:3]: intpin_to_pirq(): B1:D0:F0 swizzle intpin A --> intpin A
pci_server.3..0 pci_dbg 0 DEBUG,1,0,3 [3:3]: intpin_to_pirq(): B0:D1:F0 swizzle intpin A --> intpin B
pci_server.3..0 pci_dbg 0 DEBUG,1,0,3 [3:3]: intpin_to_pirq(): B1:D0:F0 on PIRQ B
pci_server.3..0 pci_dbg 0 DEBUG,1,1,3 [3:3]: B1:D0:F0 INTA --> PIRQB
pci_server.3..0 pci_dbg 0 DEBUG,1,1,3 [3:3]: PIRQB --> IRQ 0
pci_server.3 pci_log 0 INFO ,1,2,3 [3:3]: hw_alloc_irq(B1:D0:F0, 1, 0x0, 1, 806b130) OK
[PCI_ERR_OK]
------------------------------------------------------------------------------------------------------
QNX 7 pci-tool query output:
B001:D00:F00 @ idx 0 in slot 1 of chassis 0
vid/did: 1bee/001e
<vendor id - unknown>, <device id - unknown>
class/subclass/reg: ff/00/00
Unknown Class code
revid: 1
cmd/status registers: 7/10
Capabilities: 05 (MSI) --> 01 (PMI) --> 10 (PCIe) --> *
Address Space list - 3 assigned
[0] MEM, addr=4b40c000, size=4000, align: 4000, attr: 32bit ENABLED
[1] MEM, addr=4b400000, size=8000, align: 8000, attr: 32bit ENABLED
[2] MEM, addr=4b408000, size=4000, align: 4000, attr: 32bit ENABLED
Interrupt list - 0 assigned
hdrType: 0
ssvid: 1bee ?
ssid: 001e
PCIe Capability Details
PCIe port Type: [0] (EP) Endpoint Device
PCIe Extended Capabilities: 02 (VC-MFVC v1) --> *
PMI Capability Details
PMI supported states: D0 D3hot D3cold *
PMI current state: D0
PME's supported from states: *
PME's are disabled
**** Note Interrupt list 0 assigned. Is this a pci-server issue??
You can see in the pci query in QNX 6.6 (below), it has interrupt pin A, and interrupt line 11.
------------------------------------------------------------------------------------------------------
QNX 6 pci query output:
Class = Unknown (Unknown)
Vendor ID = 1beeh, Unknown
Device ID = 1eh, Unknown Unknown
PCI index = 0h
Class Codes = ff0000h
Revision ID = 1h
Bus number = 1
Device number = 0
Function num = 0
Status Reg = 10h
Command Reg = 7h
I/O space access enabled
Memory...
View Full Message