Let me describe the question in more detail first...
I got a trace file(captured via one protocol analyzer, OS unknown) and we can see how host initializes and access device.
The device supports multiple MSI and the MSI settings are: MMC=3, MME=3, MA = FEExxxxx, MD = xxA8, MSIE=1. Besides, we can see total 8 IVs(Interrupt vector) are assigned to device(0,1,2,3,..,7)
If we just check the interrupt messages device issued in the trace file then we can see below:
- - memory write to FEExxxxx with Data xxA8
- memory write to FEExxxxx with Data xxA8
- ...
- memory write to FEExxxxx with Data xxA9
- memory write to FEExxxxx with Data xxAC
- ...
- memory write to FEExxxxx with Data xxAD
Thus it is true that a function modifies the lower message data bits to generate the allocated number of messages. Because 8 IVs are assigned to the device I "guess" there should be 8 ISRs are allocated/installed for this device, am I right ?
Now my question is: Is it possible that we just install only 1 ISR for this device ?
Ex. within ISR, sw first identify the cause of MSI message and then execute accordingly.
The problem is: How to identify which cause ? (What we can access within ISR is the device PCI config registers, including MSI capability registers)
I was even wondering if sw can access local apic registers to identify the interrupt "cause" (because MSI messages are received by local apic...)
* Finally I have to say this task(servicing multiple MSIs) shall be executed in DOS, not Windows or Linux. Thus no APIs or system call can be invoked...