Hello,
I have a few questions regarding networking (I also want to be able to communicate with sel4 system over network). 

1. I tried the example Adrian pointed out https://github.com/SEL4PROJ/ethernet-demo-x86-manifest
When I initialize with default.xml and try to compile, I am getting the following error:  

Inline image 1

I suspect that is something related with the recent changes in camkes/sel4? Or is the default ethernet-demo app simply not configured properly? I am not talking about memory mapping/irsq, this is a different error.

2. When I use the same repository and the working manifest (pointing to specific commits so it compiles), and change the ethernet memory address and irqs I can compile the application, but I get the following error when running it: 
Inline image 2
Notably the process fails when sel4 tries to access client iospace. I know I have the irqs and the memory right, as well as the device id (pci_bdf). However, the problem is obviously the iospace_id.From what I read from the sel4 manual, the iospace_id depends on the type of iommu unit if I understand it correctly. But I am running sel4 in qemu and I don't pass any physical device to it, it is all virtual devices. To verify, I can run Ubuntu in qemu with the very same settings and it detects all virtual devices  without issues. I can also run sel4-rumprum app (see below) and it also detects the hardware without issues. 

The same error happens even when I disable the IOMMU in the sel4 config (here). 

Am I missing something fundamental here? Why in one case I need iommu to run sel4 (this case), and why in other case (sel4-rumprun or regular Ubuntu) I dont?


3. I tested the sel4-rumprun-ethernet app in qemu and it works great! I can connect over TCP socket from host and send data to sel4 running in qemu. In this case there was no issue with iommu or iospaces (I am just passing through the irq numbers and device addresses).

So my question is - was this app just a quick test (committed by Kent McLeod), or do you think using rumpkernels as camkes components is the preferred way forward? Especially because that way we have access to NetBSD drivers without much modifications. 

Thank you in advance for your advice.

Regards
Michal


On Wed, Jul 26, 2017 at 1:35 AM, <Adrian.Danis@data61.csiro.au> wrote:
Hi Gabor,

This is a bit a late reply so not sure if it's still helpful but with LWiP I would suggest looking at LWiP Bare Metal and its Native API
http://lwip.wikia.com/wiki/Porting_For_Bare_Metal
http://lwip.wikia.com/wiki/Raw/native_API

You can also see an example of a raw UDP setup here https://github.com/SEL4PROJ/camkes-apps-ethernet-demo-x86--devel/blob/master/ethernet-demo-app/ethernet-demo.c, which is from this manifest https://github.com/SEL4PROJ/ethernet-demo-x86-manifest
Be aware though that this project is a testing application and as such is *not* a good system architecture, as everything is jammed into one component. Also you will not be able to just compile and run it as it has hard coded memory addresses and interrupt numbers for a specific machine.

Hope that helps a bit,
Adrian


On Wed 28-Jun-2017 7:09 PM, Gábor Székely wrote:
Hi,

I would like to use network (TCP) on seL4, I know that I should probably be using lwip, however I have no idea how to properly initialize it (this is the first time I'm working in such a hardware close environment), so I need some help or some kind of example, but I don't know where to look. I'm working on ia32.

I also tried to run the rumprun hello world, the compillation finishes, however I get the following output when I try to run it:

Regards,
Gábor Székely


_______________________________________________
Devel mailing list
Devel@sel4.systems
https://sel4.systems/lists/listinfo/devel


_______________________________________________
Devel mailing list
Devel@sel4.systems
https://sel4.systems/lists/listinfo/devel