E1000 nic interrupt problem
E1000 nic interrupt problem
Hi, I am currently writing driver for e1000 nic. I can transmit packets. But the problem is, when I transmit packet it should fire an interrupt. I m using VBox for emulation, and I use pci express. No interruptLine is supported on pci express. So I search for msi, msi-x for e1000, no msi,msi-x. How can I setup interrupt for e1000? Since I need interrupt working for receiving packet.
Re: E1000 nic interrupt problem
Since you talked about MSI, I suspect you are using the APIC. For this reason, its not easy.
To work on all machines, you must obtain the _PRT objects in ACPI. This requires an AML interpreter, which isn't a task for the faint of heart. If you feel up to the challenge, read through the ACPI spec to do it.
If you want ACPI, but don't want to write it, you Intel's ACPICA. Its well documented on the wiki.
Or, you could read the MP tables. That probably won't work on newer machines, as ACPI prevailed over MP / PnP / APM at the end of the 90's. But it will work on QEMU and Bochs.
To work on all machines, you must obtain the _PRT objects in ACPI. This requires an AML interpreter, which isn't a task for the faint of heart. If you feel up to the challenge, read through the ACPI spec to do it.
If you want ACPI, but don't want to write it, you Intel's ACPICA. Its well documented on the wiki.
Or, you could read the MP tables. That probably won't work on newer machines, as ACPI prevailed over MP / PnP / APM at the end of the 90's. But it will work on QEMU and Bochs.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: E1000 nic interrupt problem
Yes it is.Kamal123 wrote:No interruptLine is supported on pci express.
Re: E1000 nic interrupt problem
The OP made it sound like their using APIC, if I'm not mistaken.Octocontrabass wrote:Yes it is.
Re: E1000 nic interrupt problem
At least Interrupt line, MSI or MSI-X must be supported for all devices (I believe this is mandated by both the PCI local bus spec and PCIe). You cannot (and should not) have a device that does not support at least one of these mechanisms. Are you sure your reading the PCIe configuration space correctly?
Re: E1000 nic interrupt problem
I am using APIC and I am sure that my pcie config registers are correct. I need to go through acpica. But how to enable the msi or interrupt for any device through aml? Please provide the steps.
Re: E1000 nic interrupt problem
You don't need ACPI for MSI. You only need ACPI for
non MSI devices with APIC. Simply follow the steps on the wiki PCI page for MSI.
non MSI devices with APIC. Simply follow the steps on the wiki PCI page for MSI.
Re: E1000 nic interrupt problem
Hi, thanks for reply. I have msi part working. But for non msi device, I need to handle interrupt.nexos wrote:You don't need ACPI for MSI. You only need ACPI for
non MSI devices with APIC. Simply follow the steps on the wiki PCI page for MSI.