Hi Stefan, sorry for the late response, but I was occupied with different tasks over the time and didn't find the time to further dig through that problem.
As proposed I put a Genode::log before and after your specified line `_task.unblock();` and I can see the output after the 'dev_info: 1 port detected line' two times and between the dev_info and dev_error messages multiple times. I assume this means, that IRQs are handled correctly? To the MBox error I got the last times - this error is also occurring for the RPi2 but only when using over 960? MB. I assume even more memory is used by peripheries than the expected available 1008MB of memory for both the RPi2 and RPi3. I already adapted the RAM base in the MBox class. Currently I'm digging through the documentations and see if I find additional differences between RPi1 and RPi2 regarding the USB stack. Regards Alexander On 6/27/18 11:12, Stefan Kalkowski wrote: > Hi Alexander, > > On Tue, Jun 26, 2018 at 06:38:05PM +0200, Alexander Weidinger wrote: >> Hi Stefan, >> >> thanks for the answer! >> >> I did some additional tests, this time with a RPi 3 Model B (a few changes >> on the kernel config, but no code changes at genode) >> and on this platform the usb driver sometimes (rarely) completely >> initializes and is usable. >> For the RPi 2 I'm still out of luck - but I'm pretty sure IRQs are handled >> correctly and go through. > > I see, although proofing it with one message print would give you > assurance ;-) > >> >> RPi 3 successfully initializing USB: >>> [init -> platform_drv] --- Raspberry Pi platform driver --- >>> [init] child "timer" announces service "Timer" >>> [init -> usb_drv] No <hid> config node found - not starting the USB HID >>> (Input) service >>> [init -> usb_drv] No <storage> config node found - not starting the USB >>> Storage (Block) service >>> [init -> usb_drv] No <raw> config node found - not starting external USB >>> service >>> [init -> foc_gpio_drv] --- Raspberry Pi GPIO driver --- >>> [init -> usb_drv] Enabled EHCI (USB 2.0) support >>> [init -> foc_gpio_drv] Warning: no GPIO config >>> [init -> foc_gpio_drv] Warning: no GPIO config >>> [init] child "platform_drv" announces service "Platform" >>> [init] child "foc_gpio_drv" announces service "Gpio" >>> [init -> platform_drv] Error: Mbox: timeout waiting for response >>> [init -> usb_drv] Using configured mac: 0x405ffbfc >>> [init -> usb_drv] dev_info: DWC OTG Controller >>> [init -> usb_drv] dev_info: new USB bus registered, assigned bus number 1 >>> [init -> usb_drv] dev_info: irq 9, io mem 0x00000000 >>> [init -> usb_drv] dev_info: USB hub found >>> [init -> usb_drv] dev_info: 1 port detected >>> [init -> usb_drv] dev_info: new high-speed USB device number 2 using dwc_otg >>> [init -> usb_drv] dev_info: USB hub found >>> [init -> usb_drv] dev_info: 5 ports detected >>> [init -> usb_drv] dev_info: new high-speed USB device number 3 using dwc_otg >>> [init -> usb_drv] Using configured mac: 0x408ffc24 >>> [init -> usb_drv] netif_info: open: enable queueing (rx 4, tx 60) mtu 1500 >>> simple framing >>> [init -> usb_drv] nedev_info: hardware isn't capable of remote wakeup >>> [init] child "usb_drv" announces service "Nic" >>> [init -> usb_drv] netif_info: register 'smsc95xx' at usb-dwc_otg-1.1, >>> smsc95xx USB 2.0 Ethernet, 02:00:00:00:01:01 >>> [init -> test-lwip_httpsrv] Create new socket ... >>> [init -> test-lwip_httpsrv] Now, I will bind ... >>> [init -> test-lwip_httpsrv] Now, I will listen ... >>> [init -> test-lwip_httpsrv] Start the server loop ... >>> [init -> test-lwip_httpsrv] got IP address 192.168.137.136 >> >> I also need to take a look at "Error: Mbox: timeout waiting for response", >> which I'm getting for both the RPi 2 and RPi 3 >> but I think the error is unrelated to the USB problem. > > Well, that is interesting, did you also got that warning on rpi2? > In fact, it can be related to any device usage on rpi. The platform > driver is used for power and clock settings. It communicates with the > video core, which controls much more than graphics, e.g., power > settings of the ARM core. You can check, whether the warning about > the Mbox timeout is related to this platform driver call: > > https://github.com/genodelabs/genode/blob/18.05/repos/dde_linux/src/lib/usb/spec/rpi/platform.cc#L168 > > Just print a message before and after the call, and have a look > whether the warning occurs during the call. If so, there is a high > chance that your usb core is not fully power enabled and won't react > accordingly. > > Then you might check the I/O memory address used to communicate with > the videocore here: > > https://github.com/genodelabs/genode/blob/18.05/repos/os/src/drivers/platform/spec/rpi/mbox.h#L38 > > Any changes in between the revisions of the Broadcom SoCs that are > related to this ARM core - Videocore communication channel might be > interesting to investigate too. Maybe, you find hints when looking at > the commit history of other OSes that already support RPI 1/2/3 > related to that subsystem. > > Regards > Stefan > >> >> Additional ideas what I could check? >> >> Best regards >> Alexander >> >> PS: The RPi 2 sometimes hangs at startup, presumably around the 'Calibrating >> timer loop...'. >> Interestingly I'm also not able to boot this image in QEMU (with the raspi2 >> machine), >> since it's always stuck at this position in the boot process. >> >> On Thu, Jun 21, 2018 at 01:20:57PM +0200, Stefan Kalkowski wrote: >>> Hello Alexander, >>> >>> On Wed, Jun 20, 2018 at 02:19:29PM +0200, Alexander Weidinger wrote: >>>> Hello everyone, >>>> >>>> when executing 'lwip' on the RPi 2, I get the following output for the >>>> usb_drv: >>>> >>>>> [init -> usb_drv] dev_info: DWC OTG Controller >>>>> [init -> usb_drv] dev_info: new USB bus registered, assigned bus number 1 >>>>> [init -> usb_drv] dev_info: irq 9, io mem 0x00000000 >>>>> [init -> usb_drv] dev_info: USB hub found >>>>> [init -> usb_drv] dev_info: 1 port detected >>>>> [init -> usb_drv] dev_info: new high-speed USB device number 2 using >>>>> dwc_otg >>>>> [init -> usb_drv] dev_error: device descriptor read/all, error -92 >>>>> [init -> usb_drv] dev_info: new high-speed USB device number 3 using >>>>> dwc_otg >>>>> [init -> usb_drv] dev_error: device descriptor read/all, error -92 >>>>> [init -> usb_drv] dev_info: new high-speed USB device number 4 using >>>>> dwc_otg >>>>> [init -> usb_drv] dev_error: device descriptor read/8, error -92 >>>>> [init -> usb_drv] dev_error: device descriptor read/8, error -92 >>>>> [init -> usb_drv] dev_info: new high-speed USB device number 5 using >>>>> dwc_otg >>>>> [init -> usb_drv] dev_error: device descriptor read/8, error -92 >>>>> [init -> usb_drv] dev_error: device descriptor read/8, error -92 >>>>> [init -> usb_drv] dev_error: unable to enumerate USB device >>>> >>>> Does anyone have an idea what I can do, to get the Ethernet adapter >>>> working? Any help is appreciated! >>>> I don't really understand the problem here, since the driver works >>>> flawlessly for the RPi 1 B+ (using foc_rpi as platform) - which uses the >>>> same chip as the RPi 2 (SMSC LAN9514). >>> >>> I assume that the driver does not get any interrupt. Probably the >>> interrupt controller hierarchy is different in between Pi 1 >>> and 2 resp. BCM2835 and BCM2836. So the question is how Fiasco.OC >>> maps interrupt numbers that core is asking for to the SoC' ones. >>> To validate or refute my assumption, you can instrument the dde_linux code >>> at: >>> >>> https://github.com/genodelabs/genode/blob/18.05/repos/dde_linux/src/lx_kit/irq.cc#L136 >>> >>> and proof whether an interrupt is delivered to the driver. >>> >>> regards >>> Stefan >>> >>>> >>>> My Genode version [2] and Fiasco.OC version [3]. >>>> >>>> To the backstory: >>>> ----------------- >>>> I am currently in the process of "porting" Fiasco.OC/Genode to the >>>> Raspberry Pi 2 (Model B). >>>> >>>> As a basis I use Genode in the version 18.05 and Fiasco.OC in the >>>> version 79. I created a new device, the rpi2, and based it on the >>>> already available rpi model. >>>> >>>> The main changes I did for the rpi2 platform [1] are >>>> - the different arm architecture - from armv6 to armv7a in a few files >>>> - the different physical base address - from 0x2000:0000 to 0x3f00:0000 >>>> - a RAM size of 1008 MB starting at 0x0000:0000 (1024 MB - 16 MB for >>>> peripherals) >>>> >>>> I use version 79 of the Fiasco.OC kernel since it adds support for the >>>> three different BCM283X platforms. In order to get version 79 of the >>>> kernel running with Genode, I used the official 79 as a basis and >>>> cherry-picked commits from Genode's version of Fiasco.OC (72). [0] >>>> >>>> My setup works completely fine for the RPi 1 (Model B+), even for the >>>> usb/nic driver. As the RPi 1 (Model B+) makes use of the SMSC LAN9514, >>>> instead of the SMSC LAN9512 (used in RPi Model B) it should also work >>>> for the RPi 2 (Model B), since this SBC also uses the SMSC LAN9514. >>>> >>>> [0] https://github.com/skalk/foc/commits/r72 >>>> [1] https://github.com/irgendwie/genode/commits/foc-rpi2 >>>> [2] https://github.com/irgendwie/genode/tree/foc-rpi2 >>>> [3] https://github.com/irgendwie/foc/tree/genode-r79-rpi2 >>>> ----------------- >>>> >>>> Best regards >>>> Alexander >>> >>> pub RSA 4096/2751A2CE 2018-04-04 Alexander Weidinger >>> <[email protected]> >>>> sub RSA 4096/0453A69B 2018-04-04 >>>> sub RSA 4096/7852D6D1 2018-04-04 >>>> >>> >>> >>> >>> >>>> _______________________________________________ >>>> Genode users mailing list >>>> [email protected] >>>> https://lists.genode.org/listinfo/users >>> >>> >>> -- >>> Stefan Kalkowski >>> Genode labs >>> >>> https://github.com.skalk | https://genode.org >>> >>> _______________________________________________ >>> Genode users mailing list >>> [email protected] >>> https://lists.genode.org/listinfo/users >> >> _______________________________________________ >> Genode users mailing list >> [email protected] >> https://lists.genode.org/listinfo/users >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Genode users mailing list [email protected] https://lists.genode.org/listinfo/users
