Hi all,
I was trying to manually (hack) set MSI in Genode under base-foc but failed. I'd like to describe my approach here and see if anyone can spot any mistakes or missing parts?
First, I added the Msi_flag (0x80000000) to the IRQ number in the l4_icu_bind() and setup_irq_mode() functions in genode/base-foc/src/core/irq_session_component.cc. So the kernel will know this is a MSI-type IRQ. In addition, I added a l4_icu_msi_info() function to return msg info for driver msi configuration (In my case it returns the first available vector in IDT, which is 0x21)
Second, in my driver code, I do the following:
Genode::Irq_connection _irq(80); //random MSI number Dev->config_msi(0x21); //configure the dev (e1000 card in my case) to use MSI mode while (1) { _irq.wait_for_irq(); Dev->interrupt_handler(); } However, I never saw any MSI-type interrupt triggered by Fiasco kernel. After instrumenting kernel, I did see kernel created an MSI-type irq object and the corresponding Irq_sender object and attached itself to the right receiving thread (Interrupt_handler::handler_cap()). But I don't know why Irq_sender::kinvoke was not triggered in the kernel.
Thank you very much for your help!
Best regards, Jilong