Troubleshooting interrupt delivery

Tomasz Gajewski tomga at wp.pl
Thu Sep 2 09:43:16 CEST 2021


Hi,

after some time of inactivity I decided to get back to my work on
porting Genode to different Raspberry Pi devices. As in the meantime
major blocker (problem with usb host) seem to by resolved and much
improvements in multiple aspects related to introducing new boards
(platform driver, unified naming of depot packages, etc.) I'm optimistic
about results. However I run into a problem that stopped me for quite
some time now and I'm getting out of ideas.


I started with an attempt to make run/ping work on Raspberry Pi 2. I
thought that it will be a straightforward work as:

 * it already works on Raspberry Pi 1

 * Raspberry Pi 2 is has the same usb and network device

 * interrupt controller is similar and I already have implementation for
   it working on some earlier Genode release


With addition of some logs I've verified that on both variants (Pi 1 and
Pi 2):

 * 'rpi_usb_host_drv' asked for a device from 'rpi_new_platform_drv'

 * 'Irq_session_component::sigh(...) was called for IRQ 9 (usb device
   interrupt) - I believe that it was due to rpc from 'rpi_usb_host_drv'

 * 'Irq::Context' constructor was called in 'rpi_usb_host_drv' and after
   that 'Irq_session_component::sigh()' and
   'Irq_session_component::ack_irq()' were called for interrupt 9

 * after some device driver initialization and discovery
   'rpi_usb_host_drv' prints log 'dev_dbg: Calling
   enable_global_interrupts' and after that IRQ 9 is detected in
   `bcm2835_pic.cc` and 'Kernel::User_irq::occured()' for that interrupt
   is called.

After that there is a difference. On a Raspberry Pi 1
'Lx_kit::Irq::Context::handle_irq()' in 'rpi_usb_host_drv' is executed
but it doesn't on version 2.

As I verified that interrupt is detected and processed AFAIU properly on
base-hw level I don't see other device specific things that can cause
this behavior.

Is it possible that new platform driver somehow 'blocks' this interrupt
delivery? I don't see how would that be as calls to 'sigh()' and
'ack_irq()' worked.


Can someone share some ideas what can be wrong or how should I try to
debug such problem? Maybe that is something obvious and only I can't
find it.


Currently my branch is based on master from the middel of August and if
that can help I can publish it after some minor cleanup.


Tomasz Gajewski



More information about the users mailing list