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).
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
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/i...
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 alexander.weidinger@tum.de
sub RSA 4096/0453A69B 2018-04-04 sub RSA 4096/7852D6D1 2018-04-04
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
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.
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.
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/i...
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 alexander.weidinger@tum.de
sub RSA 4096/0453A69B 2018-04-04 sub RSA 4096/7852D6D1 2018-04-04
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
-- Stefan Kalkowski Genode labs
https://github.com.skalk | https://genode.org
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
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/...
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/platfor...
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/i...
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 alexander.weidinger@tum.de
sub RSA 4096/0453A69B 2018-04-04 sub RSA 4096/7852D6D1 2018-04-04
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
-- Stefan Kalkowski Genode labs
https://github.com.skalk | https://genode.org
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
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/...
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/platfor...
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/i...
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 alexander.weidinger@tum.de
sub RSA 4096/0453A69B 2018-04-04 sub RSA 4096/7852D6D1 2018-04-04
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
-- Stefan Kalkowski Genode labs
https://github.com.skalk | https://genode.org
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Hi Stefan, hi everyone,
unfortunately I'm still struggling with the USB driver (and therefore Network) of the Raspberry Pi 2 (and 3).
As one can see, for the RPi 3 sometimes! the USB driver works and therefore I assume the same should be possible for the RPi 2. At least they they do share the same USB/Network-Chip (LAN9514).
I checked the memory map and adapted the base addresses accordingly, the interrupts seem to have not changed between RPi 1 and RPi 2 (apart from the multicore aspect).
Even some USB urbs are sent until the error -92 appears.
I currently have no idea where else to look and therefore I would be helpful for any hints I can get, regarding how I should continue to solve the problem I have with the USB driver.
Is the usb_otg/usb_dwc driver just not compatible with the Raspberry Pi 2 and I should look at the current driver situation in the Linux Kernel? As far as I know usb_otg/usb_dwc was used in the early time for the Raspberry Pi 2 until it got replaced by dwc2? Anyone has an idea if/what big difference there is between the driver versions dwc and dwc2? Would it make sense to look at the new driver and port it to Genode?
I saw that some changes were made regarding the USB support in Genode with version 18.08 - does this change anything for the RPi?
Thanks in advance! Any help is appreciated!
Regards, Alexander
Hi Alexander,
On Thu, Nov 08, 2018 at 06:18:02PM +0100, Alexander Weidinger wrote:
Hi Stefan, hi everyone,
unfortunately I'm still struggling with the USB driver (and therefore Network) of the Raspberry Pi 2 (and 3).
As one can see, for the RPi 3 sometimes! the USB driver works and therefore I assume the same should be possible for the RPi 2. At least they they do share the same USB/Network-Chip (LAN9514).
I checked the memory map and adapted the base addresses accordingly, the interrupts seem to have not changed between RPi 1 and RPi 2 (apart from the multicore aspect).
Even some USB urbs are sent until the error -92 appears.
I currently have no idea where else to look and therefore I would be helpful for any hints I can get, regarding how I should continue to solve the problem I have with the USB driver.
Is the usb_otg/usb_dwc driver just not compatible with the Raspberry Pi 2 and I should look at the current driver situation in the Linux Kernel? As far as I know usb_otg/usb_dwc was used in the early time for the Raspberry Pi 2 until it got replaced by dwc2? Anyone has an idea if/what big difference there is between the driver versions dwc and dwc2? Would it make sense to look at the new driver and port it to Genode?
I'm sorry, but I'm afraid I cannot really help you. I have not used the Raspberry Pi 2 or 3 with Genode until now. If the dwc driver subsystem split into dwc and dwc2 in the Linux kernel, and the last one is typically used by Raspberry Pi 2 + 3 there are high chances that you succeed when enabling it in Genode's Linux-based USB driver too.
I saw that some changes were made regarding the USB support in Genode with version 18.08 - does this change anything for the RPi?
Sure, we updated the Linux kernel version used as base, fixed some minor issues in the surrounding lx_kit/lx_emul library, and split USB host controller driver from client-side devices, like net and input. So you can for instance check your changes to the host controller driver when enabling dwc2 against different USB client devices first, e.g. HID mouse or keyboard, before testing the network device.
Thanks in advance! Any help is appreciated!
Good luck & best regards Stefan
Regards, Alexander
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
It is a very old thread but it seems I found root cause of this problem and I think that it can be important to inform about my findings. I added comments below.
Alexander Weidinger alexander.weidinger@tum.de writes:
unfortunately I'm still struggling with the USB driver (and therefore Network) of the Raspberry Pi 2 (and 3).
I've been fighting with exactly this problem for past month.
As one can see, for the RPi 3 sometimes! the USB driver works and therefore I assume the same should be possible for the RPi 2. At least they they do share the same USB/Network-Chip (LAN9514).
I did not check networking yet but eliminated -92 errors for keyboard and mouse.
I checked the memory map and adapted the base addresses accordingly, the interrupts seem to have not changed between RPi 1 and RPi 2 (apart from the multicore aspect).
Even some USB urbs are sent until the error -92 appears.
They seemed to be sent but during those "sends" device was not properly informed about memory address for use for dma.
On rpi3 (and others) there is a difference between bus addresses and physical addresses. In [1] I made a "brutal" fix working for rpi3. It is definitely not the final one as it is not just for rpi.
I currently have no idea where else to look and therefore I would be helpful for any hints I can get, regarding how I should continue to solve the problem I have with the USB driver.
Is the usb_otg/usb_dwc driver just not compatible with the Raspberry Pi 2 and I should look at the current driver situation in the Linux Kernel? As far as I know usb_otg/usb_dwc was used in the early time for the Raspberry Pi 2 until it got replaced by dwc2? Anyone has an idea if/what big difference there is between the driver versions dwc and dwc2? Would it make sense to look at the new driver and port it to Genode?
During my attempts I ported this new driver and it did not help so probably fixing dma can help on previous versions of the driver too.
Thanks in advance! Any help is appreciated!
Alexander, I don't know if you are still interested in this but if you check if my findings help I would definitely like to know about this.
Regards Tomasz Gajewski
[1] https://github.com/tomga/genode/commit/61abaa60eb18c8cd89a030b522f54c943d438...
Regards, Alexander
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Hello Tomasz,
On Sat, Apr 13, 2019 at 06:40:59PM +0200, Tomasz Gajewski wrote:
Alexander, I don't know if you are still interested in this but if you check if my findings help I would definitely like to know about this.
First of all, thanks for the amazing reversing work and explanation! I only silently followed the discussions on GitHub about the RPi, since I didn't have any findings to contribute.
I did not check networking yet but eliminated -92 errors for keyboard and mouse.
I integrated your "brutal" fix and did a short test with a RPi 3. Networking seems to work and the error seems to be eliminated.
During my attempts I ported this new driver and it did not help so probably fixing dma can help on previous versions of the driver too.
I used it in conjunction with the dwc driver, so your hypothesis seems to be correct.
Best regards, Alexander
Alexander Weidinger alexander.weidinger@tum.de writes:
I did not check networking yet but eliminated -92 errors for keyboard and mouse.
I integrated your "brutal" fix and did a short test with a RPi 3. Networking seems to work and the error seems to be eliminated.
It's a great news.
I'd like to ask you how do you test networking. Sometimes I have problems with establishing which test programs are supposed to work and therefore sometimes fight with more than one problem at a time.
I make my attempts on rpi3b+ and it has a different ethernet device so starting from some known state working on rpi3b (without plus) will help.
Tomasz Gajewski
Tomasz Gajewski tomga@wp.pl writes:
Alexander Weidinger alexander.weidinger@tum.de writes:
I did not check networking yet but eliminated -92 errors for keyboard and mouse.
I integrated your "brutal" fix and did a short test with a RPi 3. Networking seems to work and the error seems to be eliminated.
It's a great news.
I'd like to ask you how do you test networking. Sometimes I have problems with establishing which test programs are supposed to work and therefore sometimes fight with more than one problem at a time.
Alexander, after a while I realized you wrote which scenario you were running and that I have already tried running it earlier. If that's not a problem could you post a log of it when it is working?
I don't have any errors when running it but there is also nothing that would suggest that an address from dhcp is retrieved so probably something is missing and it would help me to know what it is.
My log for lwip ends with:
[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 -> usb_drv] Enabled EHCI (USB 2.0) support [init -> usb_drv] Using configured mac: 0x404fec2c
Regards, Tomasz Gajewski
Hi Tomasz,
just for clarity, I am using run/lwip for testing the network.
It may also be important, that I'm still using Genode 18.05 and Fiasco.OC r79 for this and that I made small adaptions, mostly for the changed memory addresses from 0x20* to 0x3f*. (Every change I did should be documented in the e-mail history.)
Afaik the new VFS plugin for TCP/IP is still broken when using Genode with Fiasco.OC, correct me if I'm wrong here Genode folks. But since you also used lwip(_legacy) it should work.
The output looks like this on my end:
[init -> platform_drv] --- Raspberry Pi platform driver --- [...] [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 -> foc_gpio_drv] --- Raspberry Pi GPIO driver --- [init -> usb_drv] No <raw> config node found - not starting external USB service [init -> foc_gpio_drv] Warning: no GPIO config [init -> usb_drv] Enabled EHCI (USB 2.0) support [init -> foc_gpio_drv] Warning: no GPIO config [init] child "platform_drv" announces service "Platform" [init] child "foc_gpio_drv" announces service "Gpio" [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 10.0.0.5 [init -> test-lwip_httpsrv] Packet received! [init -> test-lwip_httpsrv] Will send response
Best regards, Alexander
PS: I attached the complete log of one boot.
On Mon, Apr 15, 2019 at 12:37:14AM +0200, Tomasz Gajewski wrote:
Tomasz Gajewski tomga@wp.pl writes:
Alexander Weidinger alexander.weidinger@tum.de writes:
I did not check networking yet but eliminated -92 errors for keyboard and mouse.
I integrated your "brutal" fix and did a short test with a RPi 3. Networking seems to work and the error seems to be eliminated.
It's a great news.
I'd like to ask you how do you test networking. Sometimes I have problems with establishing which test programs are supposed to work and therefore sometimes fight with more than one problem at a time.
Alexander, after a while I realized you wrote which scenario you were running and that I have already tried running it earlier. If that's not a problem could you post a log of it when it is working?
I don't have any errors when running it but there is also nothing that would suggest that an address from dhcp is retrieved so probably something is missing and it would help me to know what it is.
My log for lwip ends with:
[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 -> usb_drv] Enabled EHCI (USB 2.0) support [init -> usb_drv] Using configured mac: 0x404fec2c
Regards, Tomasz Gajewski
Alexander Weidinger alexander.weidinger@tum.de writes:
[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 10.0.0.5 [init -> test-lwip_httpsrv] Packet received! [init -> test-lwip_httpsrv] Will send response
Thank you for providing log. Now I know which code is not executed but should. It will definitely help.
Regards Tomasz
Hello Tomasz,
On Sat, Apr 13, 2019 at 18:40:59 CEST, Tomasz Gajewski wrote:
On rpi3 (and others) there is a difference between bus addresses and physical addresses. In [1] I made a "brutal" fix working for rpi3. It is definitely not the final one as it is not just for rpi.
Great finding! I instantly had a look into the BCM2835/7 ARM Peripherals manuals and it seems the 0x40000000 bus address range is specified as L2-cache coherent alias of the first 256 MiB SDRAM, which are also mapped uncached to bus address 0xc0000000.
Do you agree that from this specification 0xc0000000 should also work for DMA-based devices on Rpi1?
Regards
Hello Tomasz,
On 4/15/19 9:42 AM, Christian Helmuth wrote:
Hello Tomasz,
On Sat, Apr 13, 2019 at 18:40:59 CEST, Tomasz Gajewski wrote:
On rpi3 (and others) there is a difference between bus addresses and physical addresses. In [1] I made a "brutal" fix working for rpi3. It is definitely not the final one as it is not just for rpi.
Great finding! I instantly had a look into the BCM2835/7 ARM Peripherals manuals and it seems the 0x40000000 bus address range is specified as L2-cache coherent alias of the first 256 MiB SDRAM, which are also mapped uncached to bus address 0xc0000000.
Do you agree that from this specification 0xc0000000 should also work for DMA-based devices on Rpi1?
great findings. I didn't know about address ranges on Rpi's and definitely will have a look at them when fixing issue 3247 [1].
Thanks,
Sebastian
[1] https://github.com/genodelabs/genode/issues/3247
Sebastian Sumpf Sebastian.Sumpf@genode-labs.com writes:
Hello Tomasz,
On 4/15/19 9:42 AM, Christian Helmuth wrote:
Hello Tomasz,
On Sat, Apr 13, 2019 at 18:40:59 CEST, Tomasz Gajewski wrote:
On rpi3 (and others) there is a difference between bus addresses and physical addresses. In [1] I made a "brutal" fix working for rpi3. It is definitely not the final one as it is not just for rpi.
Great finding! I instantly had a look into the BCM2835/7 ARM Peripherals manuals and it seems the 0x40000000 bus address range is specified as L2-cache coherent alias of the first 256 MiB SDRAM, which are also mapped uncached to bus address 0xc0000000.
Do you agree that from this specification 0xc0000000 should also work for DMA-based devices on Rpi1?
great findings. I didn't know about address ranges on Rpi's and definitely will have a look at them when fixing issue 3247 [1].
You, as Genode Team, knew about this but it is somewhat hidden in rpi.h in:
enum Videocore_cache_policy { NON_COHERENT = 0, COHERENT = 1, L2_ONLY = 2, UNCACHED = 3 };
which is later translated to bits 30 and 31 of addresses in framebuffer code. Anyway it probably didn't matter much on rpi1 as problems started to be observable on later versions.
Regards Tomasz Gajewski