Re: building x86-32

2023-03-09 Thread Matthias Lange
Hi,

On [09-03-2023 18:42], lieutenant_bea...@web.de wrote:
>Hello,
> 
>I try to build a x86-32 image on 20.04.1-Ubuntu x86_64.
>Doing 'make setup' and select ia32 gives this output:
>#
># configuration written to .kconfig
>#
>All build tools checked ok.
>gcc -fPIC -Wall -pedantic -g -m64 -c
>/home/b/l4re-snapshot-22.04.0/src/l4/tool/gendep/deptrack.c -o
>/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/deptrack.64.o
>gcc -fPIC -Wall -pedantic -g -m64 -c
>/home/b/l4re-snapshot-22.04.0/src/l4/tool/gendep/syscall.c -o
>/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/syscall.64.o
>gcc -m64 -shared -Wl,--no-as-needed
>
> -Wl,-soname,/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/64/libgendep.so
>-ldl -o
>/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/64/libgendep.so
>/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/deptrack.64.o
>/home/b/l4re-snapshot-22.04.0/obj/l4/x86/tool/gendep/syscall.64.o
> 
>Notice 'gcc -m64'! And also the object-files are '*.64.o'
>Is there a fault in the Makefile?
>Shouldn't it be m32?

This is correct. The output you mentioned here is from building some host
tools that are needed by the L4Re build system.

Best,
Matthias.

> 
>Thanks
>B.

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer   web: https://www.kernkonzept.com

Kernkonzept GmbH
Buchenstraße 16b
01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

You might not be working when I am and that's ok! Please make sure to only
reply when it suits you. Mails can wait.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Is there a benchmark for the IPC of L4Re?

2022-09-23 Thread Matthias Lange
Hi,

you can use the pingpong tool from the L4Re snapshot [1].

We would appreciate if you could share your benchmarking results with us. Due
to the flexibility of the possible configurations we offer to give feedback on
whether the numbers are reasonable.

Best,
Matthias.

[1] http://l4re.org/download/snapshots/


On [21-09-2022 08:21], Mincheol Sung wrote:
> Hi,
> 
> I am trying to measure the performance of the IPC of L4Re. I am wondering
> whether there is a benchmark for the IPC performance.
> 
> Mincheol

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer   web: https://www.kernkonzept.com

Kernkonzept GmbH
Buchenstraße 16b
01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

You might not be working when I am and that's ok! Please make sure to only
reply when it suits you. Mails can wait.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Build for x86_64 bare-metal machine

2022-09-19 Thread Matthias Lange
Hi,

please have a look into Kernkonzept's github and their wiki on building L4Re
[1]. This should get you started.

Best,
Matthias.

[1] https://github.com/kernkonzept/manifest/wiki/BUILDING


On [18-09-2022 16:05], Mincheol Sung wrote:
> Hi guys,
> 
> I am hanging out with L4, but couldn't find instructions/tutorials for
> building L4Re for an x86_64 bare-metal machine. Can you point me in the
> right direction? Thanks in advance.
> 
> Mincheol

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer   web: https://www.kernkonzept.com

Kernkonzept GmbH
Buchenstraße 16b
01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

You might not be working when I am and that's ok! Please make sure to only
reply when it suits you. Mails can wait.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Qemu cannot launch pre-built epi images using OVMF.fd

2022-07-11 Thread Matthias Lange
Hi,

I just tried to confirm your report with the hell.efi.iso image which seems to
work fine. Does that image also work for you?

The warning you are seeing indicates that there is something wrong with the
BIOS and that the address of the ACPI tables is not correctly passed from the
BIOS to L4Re's bootstrap component.

Regards,
Matthias.

On [07-07-2022 10:04], 郭聪 wrote:
> 
> Hi,
> 
> I cannot launch those amd64 pre-built epi images with Qemu 4.2.1 on Ubuntu 
> 20.04.  All the pc images are fine. I have added the '-bios 
> /usr/share/qemu/OVMF.fd' option. There is a warning "KERNEL: Warning: ACPI: 
> Could not find RSDP, skip init" and then "no console will be available to 
> OS". It seems that the first warning is from Fiasco, in 
> fiasco/src/kern/acpi.cpp. I guess this is because the ACPI version. How can I 
> solve this issue? Does anyone see the same problem? Thank you very much!
> 

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer   web: https://www.kernkonzept.com

Kernkonzept GmbH
Buchenstraße 16b
01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

You might not be working when I am and that's ok! Please make sure to only
reply when it suits you. Mails can wait.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
https://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Boot problems with Fiasco.OC on the NanoPC-T3 Plus

2021-01-25 Thread Matthias Lange
Hi Andreas,

great that you got it running.

On [25-01-2021 10:49], Andreas Resch wrote:
> Hey everyone,
> 
> thanks for the help, we finally got the board to successfully run the hello
> world application. As suggested we booted the provided Ubuntu image and in
> /proc/interrupts we found that the Timer used is associated with the IRQ
> number 56. Which is strange because the TRM states that the same Timer
> should be the IRQ number 24. We applied the new number and got out of the
> Calibrating timer loop, and after fixing some issues with our new timer
> driver we finally got it to work.

This can be easily explained. The timer interrupt is a GIC SPI (shared
peripheral interrupt) interrupt. They start from 32 upwards (24 + 32 = 56).
Number 0 - 31 are PPIs (per processor interrupts). You can spot this in the
FDT for your platform if you look out for the GIC_SPI macro in the interrupt
cell.

> Regarding the RAM, we're still not quite sure why setting the RAM size to 2
> GB fails, we settled to only specify one GB and call it a day, for now.

Most certainly parts of the RAM are reserved for the trusted firmware. The raw
device tree might not help you here but you can grab the one the platform was
booted with from /sys/firmware and disassemble it. This one should tell you
the memory nodes that can safely be used by the OS.

Cheers,
Matthias.

> Thanks again everybody!
> 
> 
> Andreas
> 
> On 16.01.21 13:33, Andreas Resch wrote:
> > Hi Matthias, hi Adam,
> > 
> > 
> > I can't find anything in the TRM regarding such hardware features in the
> > region where the code exits. It exits right when scanning for the ram
> > size in scan_ram_size at *(unsigned long *)(base_addr + offset) ==
> > 0x12345678) with the address as 0x8000, which is exactly in the
> > middle of the RAM, very strange. Setting the PLATFORM_RAM_SIZE_MB to
> > 1024 and removing the method setup_memory_map from our
> > Platform_arm_s5p6818 class boots as well. I'm starting to think that the
> > culprit is inside the bootloader that is just a 'hacked' version of a
> > 'hacked' version of u-boot 2016.01 I forked at
> > https://github.com/reschandreas/NanoPC-T3Plus/tree/master/U-Boot , could
> > that assumption be correct?
> > 
> > Regarding the timer, my teammate implemented a new driver and it looks
> > like the timer is counting. However, we're now suspecting that our
> > interrupt controller is not correctly initialized although we're doing
> > it exactly like other Platforms with the GIC-400 and we have checked the
> > base addresses several times.
> > 
> > Sadly the only running Linux version we could find is one really old one
> > from friendlyarm where we couldn't extract meaningful information.
> > 
> > 
> > Andreas
> > 
> > On 15.01.21 01:27, Adam Lackorzynski wrote:
> > > On Thu Jan 14, 2021 at 23:54:38 +0100, Matthias Lange wrote:
> > > > On [14-01-2021 23:24], Andreas Resch wrote:
> > > > > Hello everyone,
> > > > > 
> > > > > as part of a practical course at my university my group has
> > > > > to bring Fiasco.OC and L4re to the NanoPC-T3 Plus which is
> > > > > powered by the S5P6818 from Samsung/Nexell.
> > > > > We’re currently stuck on multiple fronts, and as a sort of
> > > > > last resort I’m asking here for help, I hope you don’t mind.
> > > > > 
> > > > > 1. Problem - The RAM
> > > > > We implemented a working uart driver for our board and when
> > > > > using all (seemingly) correct values for the RAM region (as
> > > > > stated in the TRM is located from 0x4000 to 0xc000)
> > > > > our SBC only boots up to the message “Hello from
> > > > > Startup::stage2” and then hangs in the function
> > > > > Kmem_alloc::Kmem_alloc() , we believe because the value of
> > > > > Map_base is with 0x4000 far too big but haven’t
> > > > > found a way to fix this issue whilst keeping the correct RAM
> > > > > region. Does someone have an idea why setting the incorrect
> > > > > RAM region results in more progress in the boot process (as
> > > > > stated in the following paragraph)?
> > > 0x4000 is a virtual address, and is the start of the memory
> > > mapping in Fiasco. This looks like the memory is already used in the
> > > platform, as Matthias already suspected.
> > > 
> > > > The reason most likely is that the kernel touches a memory
> > > > region that is
> > > > reserved or used by someone else 

Re: Boot problems with Fiasco.OC on the NanoPC-T3 Plus

2021-01-14 Thread Matthias Lange
> If anyone could maybe guide me into the right direction I’d be more than 
> happy!
> Thank you very much!
> 
> Best regards
> Andreas
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer

matthias.la...@kernkonzept.com  Kernkonzept GmbH
https://www.kernkonzept.com Buchenstraße 16b
https://twitter.com/kernkonzept 01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Linux with hardware access on amd64 PC ...

2020-08-31 Thread Matthias Lange
| View::Info:
> 
> mag | flags: 0
> 
> mag | size:1024x768
> 
> mag | pos: 0x0
> 
> mag | bytes_per_line: 2048
> 
> mag | buffer_offset:0
> 
> mag | RGBA(2):5(11):6(5):5(0):0(0)
> 
> mag | memory 0x120 - 0x2ff
> 
> mag | Plugin: Mag_client service started
> 
> mag | Plugin: Frame-buffer service started
> 
> mag | L4INPUT native mode activated
> 
> mag | L4INPUT:!!! W A R N I N G !!!
> 
> mag | L4INPUT:Please, do not use Fiasco's "-esc" with L4INPUT.
> 
> mag | L4INPUT:!!! W A R N I N G !!!
> 
> mag |
> /home/andreas/tud/l4re-snapshot-20.08.0/src/l4/pkg/input/lib/src/init.c:110:
> failed l4input_internal_i8042_init(): -16
> 
> PH0 offs=0020 flags=r-x PH-type=0x1
> 
> virt=0020 evirt=00af0740
> 
> phys=0020 ephys=00af0740
> 
> f_sz=008f0740 memsz=008f0740
> 
> PH1 offs=00c0 flags=rw- PH-type=0x1
> 
> virt=00c0 evirt=00db1000
> 
> phys=00c0 ephys=00db1000
> 
> f_sz=001b1000 memsz=001b1000
> 
> PH2 offs=00db1000 flags=rwx PH-type=0x1
> 
> virt=00db1000 evirt=01016000
> 
> phys=00db1000 ephys=01016000
> 
> f_sz=00077000 memsz=00265000
> 
> PH3 offs=00af0704 flags=--- PH-type=0x4
> 
> virt=00af0704 evirt=00af0740
> 
> phys=00af0704 ephys=00af0740
> 
> f_sz=003c memsz=003c
> 
> Starting binary at 0x20, argc=6 argv=0xafff5f18 *argv=0x7100fff4
> argv0=rom/vmlinuz
> 
> External resolver is at 0x68000d30
> 
> ==> L4Linux starting... <
> 
> Linux version 5.7.0-l4 (andreas@deepl) (gcc version 7.5.0 (Ubuntu
> 7.5.0-3ubuntu1~18.04), GNU ld (GNU Binutils for Ubuntu) 2.30) #1 Thu Aug 20
> 20:11:24 PDT 2020
> 
> Binary name: rom/vmlinuz
> 
> Linux kernel command line (5 args): mem=64M console=tty0
> l4x_rd=rom/ramdisk-amd64.rd root=1:0 ramdisk_size=4000
> 
> CPU mapping (l:p)[1]: 0:0
> 
> Image: 0020 - 01016000 [14424 KiB].
> 
> Areas: Text: 0020 - 008006d1 [6145kB]
> 
>     RO-Data:00a0 - 00af1000 [964kB]
> 
>     Data: 00c0 - 00c54840 [338kB]
> 
>     Init: 00db1000 - 00e27000 [472kB]
> 
>     BSS:00e28000 - 0100 [1888kB]
> 
> Device scan:
> 
>   Device: L4ICU
> 
>   Device: PCI0
> 
>   Device: pci_l4x[1]
> 
> L4Re: rom/vmlinuz: Unhandled exception: PC=0x68008618 PFA=0x0 LdrFlgs=0x0
> 
> 
> 
> On 8/20/20 4:12 PM, Adam Lackorzynski wrote:
> > Hi,
> > 
> > On Mon Aug 17, 2020 at 22:35:11 -0700, Andreas Steinmetzler wrote:
> > > Hi,
> > > 
> > > I'm experimenting with the TuD Snapshot release 2020.07.1 and can compile
> > > and run Fiasco, L4re and L4Linux in their basic configurations (amd64
> > > architecture) using the default l4lx.cfg file of the distribution.
> > > 
> > > As this is not all that useful, I was looking in getting the system use 
> > > the
> > > available hardware. Based on snippets I found on the internet and the
> > > example config files, I created the following cfg and devs files, but now
> > > L4Linux immediately runs into an unhandled exception (full boot log at the
> > > end of this eMail).
> > > 
> > > Was wondering if someone from the mailing list can share a set of config
> > > files which would allow to get L4Linux up and using at least some of the
> > > basic hardware like network and disks on a typical PC board. In my current
> > > experiments I'm using the following config files (see below).
> > > 
> > > Any help or pointers are appreciated!
> > An error like this should not happen, irrespective of any config.
> > I've uploaded 2020.08.0 and checked that the amd64 L4Linux configs in
> > the L4Linux-mag setup works and sees PCI devices.
> > Could you work from that config?
> > 
> > 
> > 
> > Adam
> > 
> > ___
> > l4-hackers mailing list
> > l4-hackers@os.inf.tu-dresden.de
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer

matthias.la...@kernkonzept.com  Kernkonzept GmbH
https://www.kernkonzept.com Buchenstraße 16b
https://twitter.com/kernkonzept 01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Access to Arm Trusted Firmware

2020-07-14 Thread Matthias Lange
Hi Stefan,

I just wanted to confirm that your observations and findings are correct. That
is the interface you have to use. Then it is up to your component to provide
the right payload for ATF.

Good luck,
Matthias.

On [13-07-2020 11:25], Stefan Kalkowski wrote:
> Hello Matthias,
> 
> thank you for your reply. See my comment inline below.
> 
> On Fri, Jul 10, 2020 at 08:58:57PM +0200, Matthias Lange wrote:
> > Hi Stefan,
> > 
> > On [09-07-2020 22:37], Stefan Kalkowski wrote:
> > > Dear l4-hackers,
> > > 
> > > I've seen that Fiasco.OC provides support for the i.MX8 SoC universe.
> > > I'm curious about whether the kernel provides any means to access the
> > > ARM Trusted Firmware (ATF) in general? (especially regarding the
> > > vendor-specific calls for powering different peripheral domains). I've
> > > seen some kind of platform control privilege for cpu powering if I
> > > understood it correctly. Is there something more generic available?
> > 
> > Fiasco.OC uses the PSCI interface to boot secondary cores. Via the platform
> > control capability it is possible for a userspace component to trigger 
> > system
> > shutdown and reset. I am not a 100% sure about suspend / resume.
> > 
> > Apart from that there is no further support or usage in the kernel.
> > 
> > Accessing other ATF services should be done in userspace I would say. Maybe
> > you can help me to understand what your platform driver is supposed to do?
> 
> Exactly, that is what the platform driver is about, powering
> peripheral device domains, like PCI-x or USB, configuring clocks etc.
> as a userland component.
> 
> However, accessing the ATF via a 'smc' call is a privileged only
> instruction. That is why I was asking for a generic 'smc' tunnel, or
> similar.
> 
> My colleague Christian Helmuth refered me to this commit:
> 
>   
> https://github.com/kernkonzept/fiasco/commit/d52cf4a33742faea752e6b6e493b21d99de3a1e4#diff-c92ec6b15ac25b493c76a28007d9003f
> 
> I guess this is what I was looking for. I assume this special initial
> Smc kobject is part of the roottask's initially mapped capabilities?
> Which would be fine for me, and is exactly what I was looking for.
> 
> I had no time until now to dive deeply into the current kernel
> interface, but needed to decide where to locate something like the
> `smc` calling interface in the most generic fashion to fit more than
> one kernel. That is why I asked you for help/reference. I think now I
> got the picture.
> 
> Best regards
> Stefan
> 
> > Regards,
> > Matthias.
> > 
> > > I'm asking, because right now I write a platform driver for Genode
> > > running on the i.MX 8M with focus on the base-hw kernel. But if
> > > there is a way I would like to support Fiasco.OC as well.
> > > 
> > > Thank you in advance for any clearing up & best regards
> > > Stefan
> > > 
> > > -- 
> > > Stefan Kalkowski
> > > Genode labs
> > > 
> > > https://github.com/skalk | https://genode.org
> > > 
> > > ___
> > > l4-hackers mailing list
> > > l4-hackers@os.inf.tu-dresden.de
> > > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> > 
> > ___
> > l4-hackers mailing list
> > l4-hackers@os.inf.tu-dresden.de
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 
> -- 
> Stefan Kalkowski
> Genode labs
> 
> https://github.com/skalk | https://genode.org
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange  phone: +49 (0) 351-41 888 614
Senior Operating Systems Engineer

matthias.la...@kernkonzept.com  Kernkonzept GmbH
https://www.kernkonzept.com Buchenstraße 16b
https://twitter.com/kernkonzept 01097 Dresden

Geschäftsführer: Dr.-Ing. Michael Hohmuth
Registergericht: Amtsgericht Dresden
Handelsregister: HRB 31129

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Access to Arm Trusted Firmware

2020-07-10 Thread Matthias Lange
Hi Stefan,

On [09-07-2020 22:37], Stefan Kalkowski wrote:
> Dear l4-hackers,
> 
> I've seen that Fiasco.OC provides support for the i.MX8 SoC universe.
> I'm curious about whether the kernel provides any means to access the
> ARM Trusted Firmware (ATF) in general? (especially regarding the
> vendor-specific calls for powering different peripheral domains). I've
> seen some kind of platform control privilege for cpu powering if I
> understood it correctly. Is there something more generic available?

Fiasco.OC uses the PSCI interface to boot secondary cores. Via the platform
control capability it is possible for a userspace component to trigger system
shutdown and reset. I am not a 100% sure about suspend / resume.

Apart from that there is no further support or usage in the kernel.

Accessing other ATF services should be done in userspace I would say. Maybe
you can help me to understand what your platform driver is supposed to do?

Regards,
Matthias.

> I'm asking, because right now I write a platform driver for Genode
> running on the i.MX 8M with focus on the base-hw kernel. But if
> there is a way I would like to support Fiasco.OC as well.
> 
> Thank you in advance for any clearing up & best regards
> Stefan
> 
> -- 
> Stefan Kalkowski
> Genode labs
> 
> https://github.com/skalk | https://genode.org
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Problems Compiling L4RE with L4Linux

2020-03-27 Thread Matthias Lange
Hi,

the error tells you that the boot module "vmm.lua" could not be found. As it
is not part of your boot FS (see log output) you have to add it to your
modules.list entry.

Please be aware that the vmm lua library cannot be used to start L4Linux.
There you have to use the "traditional" way of using an instance of L4.Loader.

Regards,
Matthias.


On [25-03-2020 17:39], Or Becker wrote:
> Hi,
> 
> I'm trying to compile L4RE with L4Linux and execute it with qemu.
> I followed the Github tutorial but the default Ned script didn't work
> (since I'm using the L4Linux I guess), so I used a different Ned script I
> found online (In the future I will have multiple VMs so I thought to do it
> in advanced).
> 
> My Ned script is simple:
> 
> package.path = "rom/?.lua";
> 
> 
> 
> local L4 = require "L4";
> 
> local vmm = require "vmm";
> 
> 
> 
> vmm.start_vm({
> 
>   id = 1,
> 
>   mem = 128,
> 
>   mon = false,
> 
>   rd = "rom/ramdisk-armv8.cpio.gz",
> 
>   fdt = "rom/virt-arm_virt.dtb",
> 
>   bootargs = "console=hvc0 earlyprintk=1 rdinit=/bin/sh",
> 
>   kernel = "rom/Image.gz",
> 
>   log = L4.Env.log
> 
> });
> 
> But when I try to execute "make E=uvmm1 qemu", an error occurred:
> 
> Allocate ARM PPI 25 to virtual 0
> 
> Allocate ARM PPI 27 to virtual 1
> 
> Allocate ARM PPI 25 to virtual 0
> 
> Allocate ARM PPI 27 to virtual 1
> 
> Calibrating timer loop... done.
> 
> MDB: use page size: 30
> 
> MDB: use page size: 21
> 
> MDB: use page size: 12
> 
> SIGMA0: Hello!
> 
>   KIP @ 40003000
> 
>   allocated 4KB for maintenance structures
> 
> SIGMA0: Dump of all resource maps
> 
> RAM:
> 
> [4:4000;4fff]
> 
> [0:40054000;400e]
> 
> [0:40109000;40117fff]
> 
> [0:4011d000;4012]
> 
> [4:4013;4017afff]
> 
> [0:4017b000;40189fff]
> 
> [4:4018a000;40197fff]
> 
> [0:40198000;410f]
> 
> [4:4110;4264bfff]
> 
> [0:4264c000;7eff]
> 
> IOMEM:--
> 
> [0:0;3fff]
> 
> [0:8000;]
> 
> MOE: Hello world
> 
> MOE: found 1009576 KByte free memory
> 
> MOE: found RAM from 4000 to 7f00
> 
> MOE: allocated 1008 KByte for the page array @0x40198000
> 
> MOE: virtual user address space [0-7f]
> 
> MOE: rom name space cap -> [C:103000]
> 
> MOE: rwfs name space cap -> [C:105000]
> 
>   BOOTFS: [4110-41197700] [C:107000] uvmm
> 
>   BOOTFS: [41198000-411c4e70] [C:109000] l4re
> 
>   BOOTFS: [411c5000-41246690] [C:10b000] ned
> 
>   BOOTFS: [41247000-412475ae] [C:10d000] virt-arm_virt.dtb
> 
>   BOOTFS: [41248000-41453600] [C:10f000] ramdisk-armv8.cpio.gz
> 
>   BOOTFS: [41454000-41454138] [C:111000] uvmm1.ned
> 
>   BOOTFS: [41455000-4264ba00] [C:113000] Image.gz
> 
> MOE: cmdline: moe rom/uvmm1.ned
> 
> MOE: Starting: rom/ned rom/uvmm1.ned
> 
> MOE: loading 'rom/ned'
> 
> Ned says: Hi World!
> 
> Ned: loading file: 'rom/uvmm1.ned'
> 
> lua error: rom/uvmm1.ned:4: module 'vmm' not found:
> 
> no field package.preload['vmm']
> 
> no file 'rom/vmm.lua'
> 
> no file '/usr/local/lib/lua/5.3/vmm.so'
> 
> no file '/usr/local/lib/lua/5.3/loadall.so'
> 
> no file './vmm.so'.
> 
> qemu-system-aarch64: terminating on signal 2
> 
> Makefile:6: recipe for target 'do-all-make-goals' failed
> 
> make: *** [do-all-make-goals] Interrupt
> I tried to add more paths to the package.path but the error stays the same
> (even if uvmm.lua exists in the path)
> Can you please help me?
> 
> Thank you,
> Or

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Re with GCC 9; Repositories and Roadmaps

2020-01-22 Thread Matthias Lange
eople 
> seem pretty unmotivated about getting people on board, although it can be 
> said 
> that within certain parameters, they at least have a system that meets their 
> objectives to some degree.)

You are right that no public roadmap for L4Re exists today. But that doesn't
mean there isn't any ;). Currently L4Re is not targeted to become a general
purpose OS.

I would also disagree that there is no L4Re development at all. A fair amount
of development is about stability and robustness. For example we are still
dealing with the fallout of Meltdown and Spectre and the following hardware
vulnerabilities.

> = Some Thoughts =
> 
> It rather looks like the amount of time I have to spend on L4Re-related 
> development will be significantly reduced for the foreseeable future. In some 
> respects, I feel that I have learned quite a bit, but in other respects, I 
> feel that it has been a frustrating exercise to try and get up to speed with 
> L4Re development. (And I hardly want to get started on my Fiasco development 
> experience.)
> 
> Although literature obviously exists about various L4 implementations, I 
> don't 
> feel that the documentation experience is coherent at all. Many of the 
> pertinent details are also obscured by the focus on code-originating 
> reference 
> documentation. And where microkernel-based systems should be emphasising the 
> nature of the interfaces between components, there instead seems to be a 
> policy of hiding such details in the implementation details of various 
> abstractions (implemented multiple times in an almost archaelogical fashion).
> 
> Indeed, this latter policy is quite infuriating because it binds the 
> developer 
> to existing functionality and frameworks unnecessarily. So, when developing 
> my 
> components for low-end devices, I went along with L4Re framework classes due 
> to an incomplete understanding of the IPC mechanisms (which also brought 
> other 
> irritations because those classes assume a more complete understanding), but 
> also because interfacing with other components is not obvious when the 
> protocols are squirreled away across multiple header and implementation files.

Yes, documentation could always be better. In fact we (Kernkonzept) is
searching for a documentation engineer for months. In the end it is about
priorities and unfortunately documentation is currently not our top priority.

> I have even gone as far as to write my own interface description language 
> tool 
> to permit the generation of IPC code and to help emphasise component 
> interfaces and protocols. It seems to me that a lot of the point in having 
> systems that facilitate component-oriented architectures is to make such 
> details explicit, as was indeed emphasised by projects like Spring. 
> Otherwise, 
> everyone might as well be writing stuff for frameworks in the Linux kernel.
> 
> Anyway, I am sure that there are plenty of people developing for and 
> enhancing 
> L4Re who are content with their situation and what they are able to achieve. 
> But I personally feel that opportunities are being missed to apply these 
> technologies to areas where they would make a real (and, crucially, positive) 
> difference.

Would you mind sharing the use-cases you have in mind?

Regards,
Matthias.

> If anyone else (still reading by this point) is even vaguely interested in 
> general-purpose operating system development on L4Re, it would be nice to 
> hear 
> from you.
> 
> Paul
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Kernel Helpers segmentation fault

2019-11-13 Thread Matthias Lange
Hi,

I assume you are running a Linux user program on L4Linux which causes a
segmentation fault of the L4Linux kernel? Further, is this a 32 or 64bit
setup?

Regards,
Matthias.


On [13-11-2019 08:45], Sateesh K wrote:
> Hi,
>   My setup is as follows:
>   l4linux 4.19.0-l4
>   Fiasco.OC
>   Raspberry Pi 3 Model B
> 
>   I am running a helloworld.go program which is causing the following stack
> trace.
> 
> (gdb) bt full
> #0  0x0f60 in ?? ()
> No symbol table info available.
> #1  0x0001143c in kernelCAS64 ()
> at /usr/local/go/src/sync/atomic/asm_linux_arm.s:112
> No locals.
> #2  0x0001103c in sync/atomic.loadUint64 (addr=0x10442080, val=48)
> at /usr/local/go/src/sync/atomic/64bit_arm.go:10
> No locals.
> #3  0x00071f44 in internal/poll.(*fdMutex).rwlock (mu=0x10442080,
> read=false,
> ~r1=160) at /usr/local/go/src/internal/poll/fd_mutex.go:130
> mutexBit.lo = 4
> mutexMask.hi = 2147481600
> mutexMask.lo = 0
> mutexSema = 0x1044208c
> mutexWait.hi = 2048
> mutexWait.lo = 0
> #4  0x00072314 in internal/poll.(*FD).writeLock (fd=0x10442080, ~r0=...)
> at /usr/local/go/src/internal/poll/fd_mutex.go:237
> No locals.
> #5  0x00072a94 in internal/poll.(*FD).Write (fd=0x10442080, p=..., ~r1=0,
> ~r2=...) at /usr/local/go/src/internal/poll/fd_unix.go:243
> n = -1212420096
> nn = 118
> --Type  for more, q to quit, c to continue without paging--c
> #6  0x00073958 in os.(*File).write (b=..., err=..., f=0x1040c0f0, n=2729821
> 44) at /usr/local/go/src/os/file_unix.go:243
> No locals.
> #7  0x00072ffc in os.(*File).Write (b=..., err=..., f=0x1040c0f0, n=0) at
> /usr/local/go/src/os/file.go:144
> err.data = 0x12c0e8  ""
> err.itab = 0x8b7a8  "\004"
> ~r2.data = 0x10456014 ""
> ~r2.itab = 0x0
> #8  0x0008b7fc in fmt.Fprintln (a=..., err=..., n=233960, w=...) at
> /usr/local/go/src/fmt/print.go:255
> p = 0x10456080
> #9  0x0008b888 in fmt.Println (a=..., err=..., n=0) at
> /usr/local/go/src/fmt/print.go:264
> No locals.
> #10 0x000916c0 in main.main () at /home/pi/hello.go:6
> No locals.
> 
>  On further analysis, I find that segmentation fault is at
> 
> __kuser_cmpxchg64.
> 
> I have enabled CONFIG_KUSER_HELPERS=y when building the linux kernel.
> 
> Any hint please on how to proceed.
> 
> 
> Best Regards,
> Sateesh Kalidas

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: http://os.inf.tu-dresden.de/pipermail/l4-hackers/2019/008421.html

2019-11-04 Thread Matthias Lange
Hi,

On [01-11-2019 18:44], Sateesh K wrote:
> Hi,
>   I am trying to bring up Raspberry Pi 3 B peripherals (specifically SD
> card) onto the linux which is onto of Fiasco.OC. I have read the following
> thread which is close to what I am doing.
> http://os.inf.tu-dresden.de/pipermail/l4-hackers/2019/008421.html.
> 
>  I have a question, how to get a .dtb file. Please help.

A .dtb (device tree blob) file is a compiled version of a .dts (device tree
source) file. This is done using the dtc (device tree compiler).

You have to write the dts file manually. You can take inspiration from the
Raspberry Pi 3 B native device tree from Linux and add the devices necessary
for the SD card to your dts file.

Best,
Matthias.

> Best Regards,
> Sateesh Kalidas

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Fiasco.OC-UX on MIPS?

2019-08-22 Thread Matthias Lange
Hi Paul,

On [22-08-2019 13:33], Paul Boddie wrote:
> On Monday 19. August 2019 00.31.16 Adam Lackorzynski wrote:
> > Hi Paul,
> > 
> > UX is an interesting way of virtualizing a kernel and gives interesting
> > insights into both Fiasco and Linux. I guess with some work it would be
> > well possible to make this work on MIPS.
> 
> After writing my message, I did think of pursuing a simpler, iterative 
> approach to making the kernel run as a Linux process, ultimately employing 
> most of the same techniques but without trying to adapt the existing UX code.
> 
> > But, before going on this endeavor what about QEMU? It should be much
> > quicker and simpler to run it through QEMU,
> 
> This did occur to me: after all, what is mostly needed is a way of emulating 
> the privileged instructions, and QEMU is a general framework for achieving 
> this. (The documentation isn't completely clear about whether I would end up 
> emulating everything even on the same architecture.)
> 
> So, I have built Fiasco and L4Re for the MIPS Malta platform, and it seems to 
> be possible to launch a system using the Makefile. For instance:
> 
> make O=mybuild qemu E=hello

Did you set the correct qemu options in your Makeconf.boot? And you may have
to specify the correct platform type because the default afik 'boston', like

  make O=mybuild qemu PT=malta E=hello

Also check the qemu cmdline that it contains "-M malta".

> However, I imagine that either a graphical example is needed where the SDL 
> interface for QEMU is being used, or that some options are required to get 
> QEMU to use a simple serial console. There appear to be some options and the 
> possibility to do something like this:
> 
> make O=mybuild qemu E=hello QEMU_OPTIONS='-nographic'
> 
> Maybe even the machine type is necessary amongst the options as well. This 
> doesn't seem to produce output, though.
> 
> I have to ask: what do people actually use when developing L4Re and Fiasco?

Qemu is always a good start. It allows very quick development and test cycles.
In the end you of course have to test on hardware.

Regards,
Matthias.

> 
> Paul
> 
> _______
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Want to run L4Re on Raspberry PI.

2019-05-29 Thread Matthias Lange
On [29-05-2019 14:35], Paul Boddie wrote:
> On Wednesday 29. May 2019 08.39.11 Matthias Lange wrote:
> > 
> > On [28-05-2019 21:21], Lei Zhou wrote:
> > > Thanks Paul for your prompt response.  I will give it try and see how it
> > > goes.Regards,   Lei
> > I just want to add two things to Paul's very good description.
> > 
> > First, have you checked our build instructions and how tos on our github [1]
> > ?
> 
> Maybe there should be some updates to l4re.org to communicate any new advice.
> 
> > And second, which Raspberry Pi model are you targeting? Newer (> gcc 4.7)
> > cross-toolchains seem to have dropped support for ARMv6k. While you still
> > can compile L4Re/Fiasco for that architecture the binaries will not run
> > later.
> 
> One thing I did forget to mention was the cross-toolchains, which was 
> regrettable. I believe that the Debian toolchains in Debian 9 (Stretch), 10 
> (Buster) or unstable (Sid) should be good enough, but as is noted above, the 
> architecture variant of earlier Raspberry Pi models (and the Pi Zero) is not 
> supported in Debian any more (which is why Raspbian exists).
> 
> I suppose that L4Re could be compiled natively within Raspbian if that is 
> already deployed. I don't remember if there are any complications for ARM 
> about code output, but looking at the src/l4/mk/arch/Makeconf.arm, it seems 
> that a fairly standard arm-linux-gnueabihf toolchain is indicated. (I suppose 
> I could be thinking about certain "bare metal" configurations requiring 
> differently-configured compilers.)

The issue we have with "standard" cross toolchains is the libgcc they are
shipping. It is compiled for ARMv7 and contains instructions that are
unknown / illegal on ARMv6k. The mean thing is, that our build system tells
GCC via "-march=armv6zk" what code to generate but then links the wrong
libgcc.

Matthias.

> 
> Otherwise, I had some success with Buildroot in generating toolchains, these 
> being needed for my soft-float MIPS configuration.
> 
> Paul
> 
> > [1] https://github.com/kernkonzept/manifest/wiki

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Want to run L4Re on Raspberry PI.

2019-05-29 Thread Matthias Lange
___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> https://urldefense.proofpoint.com/v2/url?u=http-3A__os.inf.tu-2Ddresden.de_mailman_listinfo_l4-2Dhackers=DwICAg=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE=zgPsMwBitHoKyTzLULGKGmtjlsV9d0M7_KqUo-WYeMg=J6lpTAqtNJtvcMcj_FL4Mh9mKv7PvWan1CJ_GXFQ640=uLGBMQocsBFKE1qBlKHaggEsOU2vSlFjh_XJXr20rMo=
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


QEMU advent calendar

2018-12-21 Thread Matthias Lange
Hi,

today we have another small treat for those interested in L4Re. You should
check door 21 [1] of the QEMU advent calendar for a peek on what you can build
with our newly released #L4Re projects.

Happy holidays!

Matthias.

[1] https://www.qemu-advent-calendar.org/2018/#day-21


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


New L4Re projects released

2018-12-20 Thread Matthias Lange
Dear L4 folks,

as the year is slowly coming to an end we want to take the opportunity to
announce the release of new L4Re projects to our github [1].

This release includes the development version of our small virtual machine
monitor uvmm [2]. It is capable of running Linux on all three of L4Re's
supported architectures.

Another noteworthy project is io [3] which is our IO device multiplexing and
virtualizing component.

To get you started we added a new tutorial [4] on how to setup and run a Linux
VM on L4Re.

We hope you enjoy the new release and we love to hear what you think.

Happy holidays!

Matthias.


[1] https://github.com/kernkonzept
[2] https://github.com/kernkonzept/uvmm
[3] https://github.com/kernkonzept/io
[4] https://github.com/kernkonzept/manifest/wiki/LinuxVM


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: UEFI L4 image?

2018-11-26 Thread Matthias Lange
Hi Peter,

On [26-11-2018 17:14], Peter Wiehe wrote:
> Hello Matthias,
> 
> 2018-11-26 10:02 GMT+01:00, Matthias Lange :
> > Hi Peter,
> >
> > On [25-11-2018 01:08], Peter Wiehe wrote:
> >> Hello,
> >>
> >> can you give me a link to an UEFI flat PE image of L4Re? If that's not
> >> available, then perhaps a link to instructions how to produce one
> >> myself?
> >
> > It seems that bit rot has taken its toll and the support is currently
> > broken.
> >
> > Is there a specific reason you want to use the PE image directly?
> >

[...]

> If you mean why I don't want to build from source, it's simply to make
> my life easier :)
> If you mean why a single flat PE image instead of modules it's because
> I assume that is neccessary to run on UEFI not supporting Legacy BIOS.
> But maybe I assume wrong and UEFI can handle modules? (Maybe you don't
> call it modules but rather something different...)

Ok, maybe I was a little bit unclear in my first reply. In fact you don't need
a PE image to boot L4Re on an UEFI system without CSM. It's working out of the
box.

All you need is a grub2 that can be booted by UEFI. Either use the one
provided by your Linux distro or build one yourself:

$~: configure --with-platform=efi
...
$~: grub-mkimage -O x86_64-efi ...

Then, all you have to do is use multiboot2 to boot L4Re. The entry in grub.cfg
for the hello example would look like this:

menuentry 'hello' {
multiboot2 /boot/bootstrap /bootstrap
module2 /boot/fiasco fiasco
module2 /boot/sigma0 sigma0
module2 /boot/moe moe --init=rom/hello
module2 /boot/l4re l4re
module2 /boot/hello hello
}

Good luck,
Matthias.

> Kind regards
> Peter

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: UEFI L4 image?

2018-11-26 Thread Matthias Lange
Hi Peter,

On [25-11-2018 01:08], Peter Wiehe wrote:
> Hello,
> 
> can you give me a link to an UEFI flat PE image of L4Re? If that's not
> available, then perhaps a link to instructions how to produce one
> myself?

It seems that bit rot has taken its toll and the support is currently broken.

Is there a specific reason you want to use the PE image directly?

In theory this should work from the L4 build directory

  $~: make efiimage E=hello

This creates a single PE image (images/bootstrap.efiimage) which contains all
of the required modules.

Regards,
Matthias.

> Kind regards
> Peter

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: UEFI

2018-11-23 Thread Matthias Lange
Hi,

On [22-11-2018 23:19], Peter Wiehe wrote:
> Hi everybody!
> 
> Is it possible to run L4 on UEFI?

Yes! You can boot L4Re on UEFI systems, even where no CSM is provided. You
just have to use grub2 and multiboot2.

Or do you mean booting L4Re from UEFI directly? There is some untested support
for creating a single-image PE binary that in theory can be booted directly
from the UEFI shell.

Cheers,
Matthias.

> Kind regards
> Peter Wiehe


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: High 32 bits of SFMASK is reserved

2018-09-20 Thread Matthias Lange
Hi,

On [18-09-2018 22:45], Yuxuan Shui wrote:
> Hi,
> 
> In cpu-64.cpp, in function Cpu::setup_sysenter, Fiasco try to set
> IA32_FMASK (called MSR_SFMASK in the code) to ~0ULL. However, only the
> lower 32bit of FMASK should be written to.
> 
> This cause problems on some platforms.

The fix has landed in our public repository [1]. Thank you for reporting this
issue.

Regards,
Matthias.

[1] 
https://github.com/kernkonzept/fiasco/commit/cbb304483dec557749580e680c95b6293ef9b6e8

> -- 
> 
> Regards
> Yuxuan Shui

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Porting L4Re and Fiasco.OC to the Ben NanoNote and Letux 400

2018-04-26 Thread Matthias Lange
Hi Paul,

On [23-04-2018 12:23], Paul Boddie wrote:
> On Monday 23. April 2018 09.54.55 Matthias Lange wrote:
> > 
> > On [18-04-2018 01:34], Paul Boddie wrote:
> > > 
> > > http://blogs.fsfe.org/pboddie/?p=2175
> > > 
> > > I hope that some of the information I have shared is useful to others and
> > > perhaps encourages someone else to port the software to a device of their
> > > choosing. Good luck to that person!
> > 
> > Nice work you have done there!
> 
> Thanks! There was a bit of a learning process, but the second exercise was a 
> lot easier than the first.
> 
> > > P.S. As noted before, the patches are here:
> > > 
> > > http://www.boddie.org.uk/paul/L4Re-Fiasco.OC.html
> > 
> > Maybe you would like to fork from our github releases [1] and upload your
> > patches there as well? I think this would make is more discoverable to more
> > people.
> 
> I don't have a GitHub account, but I did wonder whether the content of my 
> patches would be acceptable as currently formulated.

There is at least a path towards this. Have you had a chance to read our
contributors guide [1]? The submit and review procedures outlined there are
tailored for github, but if you like we can discuss the patches publicly on
the mailing list or privately. Just let us know.

Regarding your explanation below, I will put it on my todo list to have a look
into the Fiasco changes. But I can't promise any timeframe.

Regards,
Matthias.

[1] https://github.com/kernkonzept/fiasco/wiki/CONTRIBUTING

> To support the architecture variant, I introduce places where I test for a 
> configuration setting called CONFIG_CPU_MIPS32_R1. In some places this is to 
> disable tests that presumably acknowledge that older architecture versions 
> wouldn't work with the code as it was. For example (from src/kern/mips/cpu-
> mips.cpp):
> 
> #ifndef CONFIG_CPU_MIPS32_R1
>   require(c.r<0>().ar() > 0,  "MIPS r1 CPUs are notsupported\n");
> #endif
> 
> This is followed by tests for configuration registers that would otherwise be 
> used. Meanwhile, in other places such tests change the instructions employed. 
> For example (from src/kern/mips/alternatives.cpp):
> 
> #ifdef CONFIG_CPU_MIPS32_R1
> asm volatile ("cache 0x01, %0\n"
>   "nop\n"
>   "cache 0x08, %0"
>   : : "R"(orig_insn[i]));
> #else
> asm volatile ("synci %0" : : "R"(orig_insn[i]));
> #endif
> 
> This example being mentioned in one of my articles:
> 
> http://blogs.fsfe.org/pboddie/?p=2006
> 
> I am guessing that it is not particularly desirable to have lots of #ifdefs 
> in 
> the code because it makes things messy and harder to maintain. So I wondered 
> if better mechanisms are available for doing these kinds of things.
> 
> Another place with significant changes is the src/kern/mips/exception.S file, 
> employing macros for instructions that are not available on the earlier 
> JZ4700-series devices (and probably not in MIPS32r1). Again, it occurs to me 
> that these things might be handled in a slightly cleaner way, but it was more 
> important to get the code working. And the exception.S file is the location 
> of 
> the rdhwr changes that also apply to the CI20.
> 
> Anyway, I thought I'd get some opinions on the way I've done some of this 
> before considering submitting anything. Thanks for responding to my earlier 
> message!
> 
> Paul
> 
> > [1] https://github.com/kernkonzept
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Porting L4Re and Fiasco.OC to the Ben NanoNote and Letux 400

2018-04-23 Thread Matthias Lange
Hi Paul,

On [18-04-2018 01:34], Paul Boddie wrote:
> As promised, I wrote up my experiences porting L4Re and Fiasco.OC to the Ben 
> NanoNote:
> 
> https://blogs.fsfe.org/pboddie/?p=2147
> 
> There are, in fact, nine articles describing the process, which I accept 
> might 
> be a bit too much reading for the casual inquirer, especially as the 
> narrative 
> wanders from one problem to be solved to the next. But the summary should 
> cover the main tasks that need to be done in this kind of work.
> 
> Since getting things working on the Ben, I have also persuaded the software 
> to 
> work on the Letux 400 notebook computer, which is a variant of the Skytone 
> Alpha-400 product that did the rounds almost ten years ago (although I was 
> probably completely unaware of it at that time):
> 
> http://blogs.fsfe.org/pboddie/?p=2175
> 
> I hope that some of the information I have shared is useful to others and 
> perhaps encourages someone else to port the software to a device of their 
> choosing. Good luck to that person!

Nice work you have done there!

> Paul
> 
> P.S. As noted before, the patches are here:
> 
> http://www.boddie.org.uk/paul/L4Re-Fiasco.OC.html

Maybe you would like to fork from our github releases [1] and upload your
patches there as well? I think this would make is more discoverable to more
people.

Regards,
Matthias

[1] https://github.com/kernkonzept

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: I got an issue, when testing command like this :qemu–system–aarch64 -kernel uimage -smp 2...

2018-03-13 Thread Matthias Lange
Hi,

On [13-03-2018 11:40], Jiang qihong wrote:
> The whole command , qemu–system–aarch64 -kernel uimage -M vexpress -a15 -cpu 
> cortex-a57 -smp 2 -m256 --nographic 
> The issue is that when running into shell, i didn't find  two cpus.

In order to debug your problem further it would be nice if you could provide a
little more information about your setup.

Which version of Fiasco are you using (snapshot or public development
version)?

Is CONFIG_MP in your Fiasco configuration enabled?

Please also attach the report generated by "make report" from your L4Re build
directory.

Regards,
Matthias.

> The parameter "-smp 2",didn't work. 
> Does qemu support arch arm -v8 when using the parameter(-smp)? 
> 
> From  jqh mobile phone. 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Is the L4Linux running as a Fiasco.OC server?

2018-03-06 Thread Matthias Lange
Hi,

On [06-03-2018 09:20], Zeyu Mi wrote:
> On Tue, Mar 6, 2018 at 7:50 AM, Adam Lackorzynski <a...@os.inf.tu-dresden.de
> > wrote:
> 
> > Hi,
> >
> Hi Adam,
> 
> >
> > On Mon Mar 05, 2018 at 19:47:19 +0800, Zeyu Mi wrote:
> > > I am studying the implementation of the Fiasco.OC and the L4Linux.

[...]

> > Your obvservations are all right, however, 'lp' lists all threads in the
> > system but not tasks (aka address spaces). For listing tasks, use 's',
> > where you will see all the tasks for the Linux user processes.
> >
> I have tried 's' command, but there was alwasy a general protection fault.
> The following is the error
> message.
> 
> KERNEL: Warning: No page-fault handler for 0xf048, error 0x0,
> pc f000922b
> General Protection (eip=f0042dc3, err=) -- jdb bug?

I unsuccessfully tried to reproduce the issue. Could you please try
Fiasco.OC's development version from [1] and see whether you still get a GPF?

Thank you,
Matthias.

[1] https://github.com/kernkonzept/fiasco

> 
> There has been a change in model for L4Linux. With the vcpu model there
> > is only one thread (the vcpu) which is moving between the tasks for
> > execution. In the previous thread mode there has been a thread in each
> > user process. Both variants are still available through the L4Linux
> > config.
> >
> Could you kindly tell me how to enable the previous thread mode?
> 
> >
> >
> >
> > Adam
> >
> > ___
> > l4-hackers mailing list
> > l4-hackers@os.inf.tu-dresden.de
> > http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> >
> 
> 
> 
> -- 
> Best Regards
> 
> Zeyu Mi

> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Fiasco.OC development version available on github

2018-02-22 Thread Matthias Lange
Hi Christian,

On [22-02-2018 07:24], Christian Ludwig wrote:
> Hi,
> 
> On Wednesday, 21. February 2018, 17:11:22 Matthias Lange wrote:
> > Kernkonzept proudly announces the availability of a development version of
> > the Fiasco.OC microkernel on github [1]. It features a detailed history and
> > will be updated regularly. Those interested in exploring the latest changes
> > can amend the latest L4Re snapshot release (see [2]) with this development
> > version.
> > 
> > We plan to release development versions of the build system and selected
> > userspace components in the weeks ahead.
> > 
> > So, let us know what you think.
> 
> Great job!
> 
> Does that mean you track issues and accept pull requests on GitHub, too? What 
> are your plans in that direction?

Please see our contributors guide [1]. We will not merge pull request on github
directly to avoid the public version from diverging from our internal version.
However we will seek to discuss and help the community to improve pull requests
before the final internal review.

We don't plan to track internally discovered issues publicly on github. We deem
the overhead of maintaining two different issue trackers as too much. We will
respond to issues reported by the community. But be aware that in order to fix
certain issues we may depend on external funding to do so.

Cheers,
Matthias.

[1] https://github.com/kernkonzept/fiasco/wiki/CONTRIBUTING

> So long,
> 
> 
>  - Christian


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Fiasco.OC development version available on github

2018-02-21 Thread Matthias Lange
Hi,

Kernkonzept proudly announces the availability of a development version of the
Fiasco.OC microkernel on github [1]. It features a detailed history and will be
updated regularly. Those interested in exploring the latest changes can amend
the latest L4Re snapshot release (see [2]) with this development version.

We plan to release development versions of the build system and selected
userspace components in the weeks ahead.

So, let us know what you think.

Cheers,
Matthias.

[1] https://github.com/kernkonzept/fiasco
[2] https://l4re.org/download.html


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Microkernel and alumni meetup

2018-02-11 Thread Matthias Lange
Hi,

the next microkernel meetup will take place on Wednesday 21st at Shamrock 
Dresden, Wilsdruffer Str. 20. I have reserved a table starting from 7p.m.

I am looking forward to see you there. Best,
Matthias.

> On 15. Jan 2018, at 09:18, Matthias Lange <matthias.la...@kernkonzept.com> 
> wrote:
> 
> Dear friends of the microkernel,
> 
> it's about time for another microkernel and alumni meetup to catch up on all
> the developments of the last 6 months. Let's meet for a beer or two.
> 
> To find a date that fits the most people please visit
> 
>  https://dudle.inf.tu-dresden.de/Microkernel_Meetup/
> 
> and add your preferred day.
> 
> Regards,
>  Matthias.
> 
> 
> --
> Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614
> 
> Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
> Geschäftsführer: Dr.-Ing. Michael Hohmuth
> 



signature.asc
Description: Message signed with OpenPGP
___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Microkernel and alumni meetup

2018-01-15 Thread Matthias Lange
Dear friends of the microkernel,

it's about time for another microkernel and alumni meetup to catch up on all
the developments of the last 6 months. Let's meet for a beer or two.

To find a date that fits the most people please visit

  https://dudle.inf.tu-dresden.de/Microkernel_Meetup/

and add your preferred day.

Regards,
  Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Workaround to build l4linux for ARM Target

2018-01-10 Thread Matthias Lange
Hi Leslie,

On 2018-0110 at 12:30:49 +0800, Leslie Zhai wrote:
> Hi l4 hackers,
> 
> ../arch/l4/arm-mach-l4/l4.c:33:10: fatal error: l4/io/io.h: No such file or
> directory
>  #include 
>   ^~~~
> compilation terminated.
> 
> 
> so I just workaround to `ln -s` manually:
> 
> build-freescale-imx6/include/l4/io/
> ├── io.h -> /data/project/xiangzhai/l4re/l4/pkg/io/libio-io/include/io.h
> ├── pciids.h ->
> /data/project/xiangzhai/l4re/l4/pkg/io/io/server/libpciids/include/pciids.h
> └── types.h ->
> /data/project/xiangzhai/l4re/l4/pkg/io/libio-io/include/types.h
> 
> l4re version: svn76
> 
> l4linux version: svn57
> 
> GNU toolchain: gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)
> 
> I think it might be `Makefile` simple issue :)

Your error may come from something else. Your gcc version is known to not work
because the compilation of io will trigger an internal compiler error.
Eventually the io package may have not been built successfully and the header
files where not installed. Could you try an older gcc?

The gcc issue was presumably fixed in November 2017.

Regards,
Matthias.

> 
> -- 
> Regards,
> Leslie Zhai - https://reviews.llvm.org/p/xiangzhai/
> 
> 
> 
> 
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Question about vm memory initialization

2018-01-10 Thread Matthias Lange
Hi Nico,

On 2018-0110 at 09:11:09 +0800, nico.hacker wrote:
> Yes, that's it. Do you have any good suggestions? labeltype="reply">于  2018-01-10 06:36:25,Adam Lackorzynski tu-dresden="" de="">写道: style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px 
> solid">Hi nico,
> 
> On Tue Jan 09, 2018 at 19:18:20 +0800, nico wrote:
>  I started uvmm and found that all ram space allocated to vm are cleared.
> 
> Yes, sure. We do not want to see any other data in there, possibly
> coming from another domain and leaking some information.
> 
>  But I do not need to do that, because uboot has loaded image file to 
> ram, and vm linux would use that image file. Could you tell me where the uvmm 
> did the cleanup? Regards, Nico

I am not sure if I have understood your use-case correctly but the steps you
are performing are like this?

1. Power up your board
2. u-boot loads a Linux kernel (and possibly ramdisk and device tree) into RAM
3. u-boot loads your L4Re image
4. L4Re is started with uvmm

Is my understanding correct?

Regards,
Matthias.

> 
> Describing this in my own words, you want to load a file via u-boot and
> use that in your VM?
> 
> Adam

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


L4Re and Meltdown / Spectre attacks

2018-01-08 Thread Matthias Lange
Hi,

after the dust around the Meltdown and Spectre attacks has settled a bit, you
may wonder how Fiasco.OC / L4Re fares with regard to these attacks.

Fiasco.OC / L4Re is vulnerable to Meltdown-like attacks because the kernel is
mapped into each task. However, the kernel does not map all physical memory but
only memory it requires for its own data structures + kernel-user memory
required for e.g. UTCBs and vCPU state save areas. Depending on the amount of
physical memory and the available page sizes, Fiasco.OC may map it little bit
more than that to save TLB entries. That means there can be a slight overlap of
user memory that is visible to the kernel. But it is not possible for a thread
to read _all_ memory.

Because we think that no thread should read information from other threads
(pagetables, capability arrays, UTCBs etc.), we plan to change Fiasco.OC to
execute in its own address space on Intel CPUs.

Against Spectre we do not plan to implement anything right now. We think the
attack surface of the kernel is very little (if any) and may be even further
reduced with Intel's microcode updates and future compiler/tool mitigations.
However, we will observe future discussions and developments and may reassess
this in the future.

Thank you and regards,
Matthias.


-- 
Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4/Fiasco kernel debugger (jdb) and step over command

2017-12-27 Thread Matthias Lange
Hi Valery,

> On 26. Dec 2017, at 17:54, Valery V. Sedletski <_valer...@mail.ru> wrote:
> 
> Hi. I'm trying to debug my program with jdb. (I'm using the old L4/Fiasco / 
> L4Env, not the current Fiasco.OC / L4Re). I enabled the permanent single step 
> mode (with the S+ command) and a permanent show the Thread Control Block 
> (with the t+ command) option. So, I was able to single-step with "g" command. 
> Also, I found "jr" (go until return (ret or iret) is encountered) and "jb" 
> (go until the next branch instruction, like jmp/call/int) commands, but they 
> don't seem to work. When I enter them, I see only a single step to the next 
> instruction. Are these two commands broken? How do I step over a "call"/"int" 
> instruction?

Fiasco/L4Env has been outdated for almost 10 years now and hasn’t been 
maintained since then. Sorry, but here we are unable to help you with your 
problem.

Are there any reasons you chose Fiasco/L4Env over Fiasco.OC/L4Re?

Best,
Matthias.

> Thanks in advance,
> 
> valery
> 
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Booting L4Re with qemu-system-arm: Panic in sigma0

2017-10-31 Thread Matthias Lange
Hi,

this looks like an undefined instruction. Maybe the build and the
emulated CPU model does not match? Have you tried changing the CPU model
with the '-cpu" option?

Best,
Matthias.


On 10/31/2017 09:24 AM, Leslie Zhai wrote:
> Hi L4 hackers,
> 
> 
> $ svn info
> Path: .
> Working Copy Root Path: /data/project/l4re
> URL: https://svn.l4re.org/repos/oc/l4re/trunk
> Relative URL: ^/trunk
> Repository Root: https://svn.l4re.org/repos/oc/l4re
> Repository UUID: d050ee49-bd90-4346-b210-929a50b99cfc
> Revision: 75
> Node Kind: directory
> Schedule: normal
> Last Changed Author: l4check
> Last Changed Rev: 75
> Last Changed Date: 2017-10-15 19:49:39 +0800 (Sun, 15 Oct 2017)
> 
> 
> My Fiasco build config:
> 
> #
> # Automatically generated file; DO NOT EDIT.
> # Fiasco configuration
> #
> CONFIG_HAS_FPU_OPTION=y
> CONFIG_HAS_SERIAL_OPTION=y
> CONFIG_HAS_JDB_GZIP_OPTION=y
> 
> #
> # Target configuration
> #
> # CONFIG_IA32 is not set
> # CONFIG_AMD64 is not set
> CONFIG_ARM=y
> # CONFIG_MIPS is not set
> CONFIG_PF_INTEGRATOR=y
> # CONFIG_PF_REALVIEW is not set
> # CONFIG_PF_SUNXI is not set
> # CONFIG_PF_BCM283X is not set
> # CONFIG_PF_SA1100 is not set
> # CONFIG_PF_XSCALE is not set
> # CONFIG_PF_ARMADA38X is not set
> # CONFIG_PF_KIRKWOOD is not set
> # CONFIG_PF_TEGRA is not set
> # CONFIG_PF_LAYERSCAPE is not set
> # CONFIG_PF_IMX is not set
> # CONFIG_PF_RCAR3 is not set
> # CONFIG_PF_EXYNOS is not set
> # CONFIG_PF_S3C2410 is not set
> # CONFIG_PF_OMAP is not set
> # CONFIG_PF_ZYNQ is not set
> CONFIG_BSP_NAME="integrator"
> CONFIG_CAN_ARM_CPU_926=y
> CONFIG_CAN_ARM_CPU_1176=y
> CONFIG_ABI_VF=y
> CONFIG_ARM_926=y
> # CONFIG_ARM_1176 is not set
> CONFIG_FPU=y
> CONFIG_ARM_ALIGNMENT_CHECK=y
> CONFIG_ARM_EM_STD=y
> CONFIG_ARM_CPU_ERRATA=y
> 
> #
> # Kernel options
> #
> # CONFIG_CONTEXT_8K is not set
> CONFIG_CONTEXT_4K=y
> CONFIG_FINE_GRAINED_CPUTIME=y
> CONFIG_SCHED_FIXED_PRIO=y
> # CONFIG_SCHED_WFQ is not set
> # CONFIG_SCHED_FP_WFQ is not set
> 
> #
> # Debugging
> #
> CONFIG_INLINE=y
> # CONFIG_NDEBUG is not set
> # CONFIG_NO_FRAME_PTR is not set
> CONFIG_STACK_DEPTH=y
> CONFIG_LIST_ALLOC_SANITY=y
> CONFIG_SERIAL=y
> CONFIG_JDB=y
> CONFIG_JDB_LOGGING=y
> CONFIG_JDB_GZIP=y
> # CONFIG_JDB_ACCOUNTING is not set
> # CONFIG_WARN_NONE is not set
> # CONFIG_WARN_WARNING is not set
> CONFIG_WARN_ANY=y
> 
> #
> # ARM debugging options
> #
> CONFIG_VMEM_ALLOC_TEST=y
> CONFIG_DEBUG_KERNEL_PAGE_FAULTS=y
> 
> #
> # Compiling
> #
> CONFIG_CC="gcc"
> CONFIG_CXX="g++"
> CONFIG_HOST_CC="gcc"
> CONFIG_HOST_CXX="g++"
> CONFIG_MAINTAINER_MODE=y
> CONFIG_LABEL=""
> CONFIG_EXPERIMENTAL=y
> CONFIG_PERF_CNT=y
> CONFIG_BIT32=y
> CONFIG_WARN_LEVEL=2
> CONFIG_XARCH="arm"
> CONFIG_ABI="vf"
> 
> 
> My L4Re build config:
> 
> # Automatically generated. Don't edit
> 
> BID_COMPILER_TYPE=gcc
> BUILD_SYSTEMS=arm_armv5te arm_armv5te-l4f
> CONFIG_ARCH_ENABLE_STACK_PROTECTOR=y
> CONFIG_BID_GCC_ENABLE_STACK_PROTECTOR=y
> CONFIG_BID_GCC_STACK_PROTECTOR=y
> CONFIG_BUILD_ABI="l4f"
> CONFIG_BUILD_ABI_l4f=y
> CONFIG_BUILD_ARCH="arm"
> CONFIG_BUILD_ARCH_arm=y
> CONFIG_CPU_ARM_ARMV5TE=y
> CONFIG_CPU="armv5te"
> CONFIG_CTAGS="ctags"
> CONFIG_DROPS_INSTDIR="/path/to/l4re"
> CONFIG_DROPS_STDDIR="/path/to/l4re"
> CONFIG_ETAGS="etags"
> CONFIG_LEX="flex"
> CONFIG_MAKECONFS_ADD=""
> CONFIG_YACC="yacc"
> GCCDIR=/usr/lib/gcc/arm-linux-gnueabi/6.1.1
> GCCFORTRANAVAIL=
> GCC_HAS_ATOMICS=
> GCCINCFIXEDPATH=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/include-fixed
> GCCLIB_EH=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/libgcc_eh.a
> GCCLIB_FILE_crtbegin.o=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbegin.o
> GCCLIB_FILE_crtbeginS.o=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbeginS.o
> GCCLIB_FILE_crtbeginT.o=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtbeginT.o
> GCCLIB_FILE_crtend.o=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtend.o
> GCCLIB_FILE_crtendS.o=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/crtendS.o
> GCCLIB_HOST=/usr/lib/gcc/arm-linux-gnueabi/6.1.1/libgcc.a
> GCCLIB_S_SO=
> GCCMAJORVERSION=6
> GCCMINORVERSION=1
> GCCNOSTACKPROTOPT=-fno-stack-protector
> GCCPATCHLEVEL=1
> GCCSTACKPROTALLOPT=-fstack-protector-all
> GCCSTACKPROTOPT=-fstack-protector
> GCCSYSLIBDIRS=-L/usr/lib/gcc/arm-linux-gnueabi/6.1.1/
> -L/usr/lib/gcc/arm-linux-gnueabi/6.1.1/../../../../arm-linux-gnueabi/lib/arm-linux-gnueabi/6.1.1/
> -L/usr/lib/gcc/arm-linux-gnueabi/6.1.1/../../../../arm-linux-gnueabi/lib/ 
> -L/usr/arm-linux-gnu/sys-root/lib/arm-linux-gnueabi/6.1.1/
> -L/usr/arm-linux-gnu/sys-root/lib/
> -L/usr/arm-linux-gnu/sys-root/usr/lib/arm-linux-gnueabi/6.1.1/
> -L/usr/arm-linux-gnu/sys-root/usr/lib/
> GCCVERSION=6
> HOST_SYSTEM=linux
> INT_CPP_NAME=cc1
> INT_CXX_NAME=cc1plus
> INT_LD_NAME=arm-linux-gnu-ld
> LD_EMULATION=armelf_linux_eabi
> LD_GENDEP_PREFIX=LD_PRELOAD=libgendep.so
> LD_LIBRARY_PATH=/data/project/xiangzhai/l4re/l4/build-arm/tool/gendep/64:/data/project/xiangzhai/l4re/l4/build-arm/tool/gendep/32
> 
> LD_HAS_HASH_STYLE_OPTION=n
> LDVERSION=227-3
> include 

Re: Add network device to L4Linux

2017-09-15 Thread Matthias Lange
Hi Yang,

I have to admit that I don't know what's going wrong yet. Your
configuration looks reasonable. I need a little bit more time to
reproduce your issue and to analyze the problem.

Regards,
Matthias.

On 09/13/2017 01:56 PM, Yiyang Su wrote:
> Hi,
> 
> 
> Starting from a previous work [1], I have succeeded in booting L4Linux on
> 
> Cubietruck with the snapshot (l4re-snapshot-2016082114). Then I have
> 
> been trying to configure L4Linux to access Ethernet device. With current
> 
> configuration I cannot boot L4Llinux anymore. Following is my configuration
> 
> and boot log:
> 
> 
> l4lx-net-cubi.devs
> 
> ===
> 
> local Res = Io.Res
> local Hw = Io.Hw
> 
> Io.hw_add_devices(function()
> NIC = Hw.Device(function()
> Property.hid = "sun7ia20gmac";
> compatible = {"allwinner,sun7i-a20-gmac"};
> Resource.regs = Res.mmio(0x01c5, 0x01c5);
> --Resource.irq = Res.irq(0);
> Resource.irq = Res.irq(85);
> --Resource.irq = Res.irq(4);
> Property.flags = Io.Hw_device_DF_dma_supported;
> end);
> end)
> 
> 
> 
> l4lx-net-cubi.io
> 
> ===
> 
> local hw = Io.system_bus()
> 
> Io.add_vbus("l4linux", Io.Vi.System_bus
> {
> NIC = wrap(hw:match("allwinner,sun7i-a20-gmac"));
> })
> 
> 
> l4lx-net-cubi.cfg
> 
> ===
> 
> local L4 = require("L4");
> 
> local loader = L4.default_loader;
> 
> vbus_l4linux = loader:new_channel();
> 
> loader:start(
> {
> caps = {
> icu = L4.Env.icu,
> sigma0 = L4.cast(L4.Proto.Factory,
> L4.Env.sigma0):create(L4.Proto.Sigma0),
> l4linux = vbus_l4linux:svr(),  
> },
> log = {"IO", "y"},
> l4re_dbg = L4.Dbg.Warn,
> },
> "rom/io -vvv rom/l4lx-net-cubi.devs rom/l4lx-net-cubi.io"
> );
> 
> -- start L4Linux
> loader:start(
> {
> caps = {
> vbus = vbus_l4linux,
> },
> --log = {"l4linux", "cyan"},
> log = L4.Env.log:m("rws"),
> l4re_dbg = L4.Dbg.Warn,
> },
> "rom/vmlinuz mem=64M console=ttyLv0 earlyprintk=1
> l4x_dtb=rom/sun7i-a20-cubietruck.dtb "
> .. "l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd "
> .. "root=1:0 rw ramdisk_size=4000"
> );
> 
> 
> modules.list
> 
> entry L4Linux-net-cubi
> roottask moe rom/l4lx-net-cubi.cfg
> module l4re
> module ned
> module io
> module sun7i-a20-cubietruck.dtb
> module l4lx-net-cubi.cfg
> module l4lx-net-cubi.devs
> module l4lx-net-cubi.io
> module vmlinuz
> module[perl] "ramdisk-$ENV{ARCH}.rd"
> 
> 
> boot log
> ===
> U-Boot SPL 2017.03-rc3 (Aug 14 2017 - 13:26:17)
> DRAM: 2048 MiB
> CPU: 91200Hz, AXI/AHB/APB: 3/2/2
> Trying to boot from MMC1
> 
> 
> U-Boot 2017.03-rc3 (Aug 14 2017 - 13:26:17 +0200) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I)
> Model: Cubietech Cubietruck
> I2C:   ready
> DRAM:  2 GiB
> MMC:   SUNXI SD/MMC: 0
> *** Warning - bad CRC, using default environment
> 
> Setting up a 1024x768 vga console (overscan 0x0)
> In:serial
> Out:   vga
> Err:   vga
> SCSI:  SATA link 0 timeout.
> AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
> flags: ncq stag pm led clo only pmp pio slum part ccc apst
> Net:   eth0: ethernet@01c5
> starting USB...
> USB0:   USB EHCI 1.00
> USB1:   USB OHCI 1.0
> USB2:   USB EHCI 1.00
> USB3:   USB OHCI 1.0
> scanning bus 0 for devices... 1 USB Device(s) found
> scanning bus 2 for devices... 1 USB Device(s) found
>scanning usb for storage devices... 0 Storage Device(s) found
> Hit any key to stop autoboot:  0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> Found U-Boot script /boot/boot.scr
> reading /boot/boot.scr
> 1165 bytes read in 24 ms (46.9 KiB/s)
> ## Executing script at 4310
> Failed to mount ext2 filesystem...
> ** Unrecognized filesystem type **
> reading boot/uImage
> 10481728 bytes read in 652 ms (15.3 MiB/s)
> ## Booting kernel from Legacy Image at 4800 ...
>Image Name:   L4 Image #32
>Image Type:   ARM Linux Kernel Image (uncompressed)
>Data Size:10481664 Bytes = 10 MiB
>Load Address: 4100
>Entry Point:  4100
>Verifying Checksum ... OK
>Loading Kernel Image ... OK
> 
> Starting kernel ...
> 
> 
> L4 Bootstrapper
>   Build: #32 Mi 13. Sep 11:47:18 CEST 2017, 4.9.4
>   Scanning up to 1024 MB RAM, starting at offset 32MB
>   Memory size is 1024MB (4000 - 7fff)
>   RAM: 4000 - 7fff: 1048576kB
>   Total RAM: 1024MB
>   Scanning fiasco
>   Scanning sigma0
>   Scanning moe
>   Moving up to 12 modules behind 4110
>   moving module 02 { 419cd000-419fe49b } -> { 41abd000-41aee49b } [201884]
>   moving module 01 { 419bb000-419cc337 } -> { 41aab000-41abc337 } [70456]
>   moving module 00 { 4192d000-419ba98b } -> { 41a1d000-41aaa98b } [579980]
>   

Re: uImage Load Address Issue

2017-07-23 Thread Matthias Lange
Hi Daniel,

On 07/21/2017 08:19 PM, Daniel (Xiaolong) Wang wrote:
> Hi All,
> 
> I’m testing L4re on a customized I.MX6 Solo-X-4 board. I found that the 
> fiasco kernel (the simple hello world example built into an uimage) cannot be 
> load by the U-boot. It shows “data abort". The reason I guess it is due to 
> different loading address. The U-boot’s default $loadaddr is 0x8080, but 
> the uimage I build using the L4re buildsystem has:
> 
> Load Address: 1100
> Entry Point:  1100
>   ==> Installing bootstrap.uimage in image directory
>   Image size(s) in bytes:
> bootstrap_hello-cfg.elf:  1470844
>   bootstrap.raw:  1437696
>bootstrap.uimage:  1437760
>   Start address: 0x1100
> 
> 
> I used the RAM_BASE=0x808 option to change the starting address when I 
> made the image (as shown below), the boot did not crash but the kernel hangs 
> at “Starting kernel..."

Did you provide the correct platform type when you built the image? You
should do something like this

make PLATFORM_TYPE=imx6 RAM_SIZE_MB=1024 UART_NR=1 E=hello uimage

Change the values of RAM_SIZE_MB and UART_NR according to your platform.

Best,
Matthias.

> 
> Load Address: 0100
> Entry Point:  0100
>   ==> Installing bootstrap.uimage in image directory
>   Image size(s) in bytes:
> bootstrap_hello-cfg.elf:  1470844
>   bootstrap.raw:  1437696
>bootstrap.uimage:  1437760
>   Start address: 0x80100
> 
> I think it is still related to the different load address. But I do not know 
> how to fix it. I would really appreciate if someone can point me to a right 
> direction.
> 
> Thanks
> -Dan
> 
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Linux network and SD Access

2017-07-09 Thread Matthias Lange
  | WARNING: device 'mmc2' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc2' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc3' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc3' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc1' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc1' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc2' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc2' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc3' already assigned to another virtual bus.
>>> IO  | WARNING: device 'mmc3' already assigned to another virtual bus.
>>> IO  | WARNING: device 'i2c0' already assigned to another virtual bus.
>>> IO  | WARNING: device 'i2c0' already assigned to another virtual bus.
>>> IO  | Real Hardware ---
>>> IO  | System Bus: hid=
>>> IO  |   Resources:  start 
>>> IO  |   DMADOM  [00-00 1] non-pref
>>> (32bit) (align=0 flags=6)
>>> IO  |   Resources: = end =
>>> IO  |   mmc1: hid=MMC1
>>> IO  | Clients: = start 
>>> IO  |   mmc3[1]: [N2Vi9Proxy_devE]
>>> IO  |   mmc2[1]: [N2Vi9Proxy_devE]
>>> IO  |   mmc1[1]: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [004806-0048060fff 1000] non-pref
>>> (32bit) (align=fff flags=2)
>>> IO  | IRQ [40-40 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end =
>>> IO  |   i2c1: hid=omap4-i2c1
>>> IO  | Clients: = start 
>>> IO  |   i2c1[1]: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [004802a000-004802afff 1000] non-pref
>>> (32bit) (align=fff flags=2)
>>> IO  | IRQ [47-47 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end =
>>> IO  |   mmc2: hid=MMC2
>>> IO  | Clients: = start 
>>> IO  |   mmc3[2]: [N2Vi9Proxy_devE]
>>> IO  |   mmc2[2]: [N2Vi9Proxy_devE]
>>> IO  |   mmc1[2]: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [00481d8000-00481d8fff 1000] non-pref
>>> (32bit) (align=fff flags=2)
>>> IO  | IRQ [1c-1c 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end =
>>> IO  |   mmc3: hid=MMC3
>>> IO  | Clients: = start 
>>> IO  |   mmc3[3]: [N2Vi9Proxy_devE]
>>> IO  |   mmc2[3]: [N2Vi9Proxy_devE]
>>> IO  |   mmc1[3]: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [004781-0047810fff 1000] non-pref
>>> (32bit) (align=fff flags=2)
>>> IO  | IRQ [1d-1d 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end =
>>> IO  |   edma: hid=EDMA
>>> IO  | Clients: = start 
>>> IO  |   edma: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [0044e10f90-0044e10fcf 40] non-pref
>>> (32bit) (align=3f flags=2)
>>> IO  | IRQ [0e-0e 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end =
>>> IO  |   i2c0: hid=omap4-i2c0
>>> IO  | Clients: = start 
>>> IO  |   i2c1[2]: [N2Vi9Proxy_devE]
>>> IO  |   i2c0: [N2Vi9Proxy_devE]
>>> IO  | Clients: = end 
>>> IO  | Resources:  start 
>>> IO  | IOMEM   [0044e0b000-0044e0bfff 1000] non-pref
>>> (32bit) (align=fff flags=2)
>>> IO  | IRQ [46-46 1] none (32bit)
>>> (align=0 flags=1)
>>> IO  | Resources: = end 

Re: L4Re IPC share memory that share file in one Linux filesystem and be visible to other Linuxes

2017-07-07 Thread Matthias Lange
Hi,

On 07/06/2017 02:14 PM, Joyce Peng(彭美僑) wrote:
> Yes, I know this easiest way that mount filesystem via NFS, NBD or
> SMB. But I have a mission to evaluate the IPC performance between two
> Linuxes that run on top of Fiasco.OC. So our evaluated environment is
> run a media player in one Linux and this player will access media
> data in other Linux. And we use uvmm to run two vms that run Linux
> respectively.

Sorry, I'am a bit confused here. What do you mean if you say you want to
measure IPC performance between two Linuxes? What does IPC in this
context mean?

If you measure the communication performance between two Linux VMs
running with uvmm you have no direct (L4) IPC between Linux processes in
both VMs. You will (not only) add a lot of overhead because of VM exits
and resumes.

If you are interested in raw IPC performance, why don't you just use
pingpong?

Best,
Matthias.


> 
> Regards, Joyce.Peng(彭美僑)
> 
> -----Original Message- From: Matthias Lange
> [mailto:matthias.la...@kernkonzept.com] Sent: Thursday, July 06, 2017
> 4:58 AM To: l4-hackers@os.inf.tu-dresden.de Cc: Joyce Peng(彭美僑) 
> Subject: Re: L4Re IPC share memory that share file in one Linux
> filesystem and be visible to other Linuxes
> 
> Hi,
> 
> On 07/05/2017 05:47 AM, Joyce Peng(彭美僑) wrote:
>> Hi L4,
>> 
>> I want to share a file in one Linux filesystem and be visible to 
>> other Linuxes that all run on top Fiasco.OC. It seems an IPC 
>> communication between L4re vm tasks. And access a file in Linux 
>> filesystem is a mechanism of kernel block device driver. But I only
>>  notice two char device drivers that use L4re library l4shmc in 
>> L4linux. It is l4ser_shm and l4shmnet. May you give some
>> information about this work how to work. Thanks.
> 
> Have you thought about how to syncronize access to the filesystem
> between the two VMs?
> 
> The easiest approach would be to setup a (virtual) network connection
> between the two VMs and let one VM provide the filesystem via NFS,
> NBD or SMB.
> 
> Regards, Matthias.
> 
>> 
>> Joyce.peng(彭美僑

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Linux network and SD Access

2017-07-07 Thread Matthias Lange
Hi,

On 07/06/2017 11:45 PM, Daniel (Xiaolong) Wang wrote:
> Thank you Adam! I’m struggling on how to write the IO configure file and
> cfg file for Ned. I’m wondering is there any references of the function
> definition that I can learn from? For example I’m trying to write an IO
> configure for BeagleBone Black. I found one for Beagleboard under
> io/config/plat-beagleboard/hw_device.io. I’m trying to mimic the same
> way but I’m not exactly sure what’s the Hw.Scm_omap() means and what
> does its sub-field Resource.regs mean.

The Beagleboard hardware configuration is a good starting point. The SCM
is a special IP core in OMAP SoCs that is needed for the pad control
logic. For your current use case you most likely don't need it.

Io's hardware configurations are written in Lua. Each hardware device
contains a table named 'Resource'. Resource.regs = FOO adds an entry
named 'regs' with the value FOO into the table.

Best,
Matthias.

> 
> Thanks
> -Dan
> 
>   
>> On Jul 5, 2017, at 4:53 PM, Adam Lackorzynski
>> <a...@os.inf.tu-dresden.de <mailto:a...@os.inf.tu-dresden.de>> wrote:
>>
>> Hi
>>
>> On Mon Jul 03, 2017 at 16:40:11 -0500, Daniel (Xiaolong) Wang wrote:
>>> The board I have in hand is a Beaglebone Black. This board is a TI
>>> OMAP architecture. I’m trying to enable the MMC driver for the
>>> onboard TI by enabling the L4Linux kernel config option.
>>>
>>> * device driver => MMC => TI OMAP High Speed Multimedia Card
>>> Interface support
>>>
>>> This driver is hidden, in order to enable it I have to select the
>>> system architecture to be TI OMAP. However, the L4Linux would allow
>>> me to build it, because seems like in order to run on top of L4re the
>>> system type has to be L4Linux:
>>>
>>> *- ARM system type => L4Linux 
>>>
>>> If I try to use “allow multiple platform to be selected” the “patch
>>> physical to virtual translations at runtime”
>>> (CONFIG_ARM_PATCH_PHYS_VIRT) will have to be enabled which cause errors…
>>>
>>> Is that means there is no way I can use the MMC driver (I want to use
>>> the MMC driver to host real file system)? Also I need to use the
>>> onboard Ethernet PHY and Linux network drivers for network access.
>>>
>>> Is there any way to allow it? Any help would be appreciated.
>>
>> Just add "|| L4" on the "depends on" line in drivers/mmc/host/Kconfig so
>> that it becomes available for our platform.
>>
>> Adam
>>
>>>
>>> Thanks
>>> -Dan  
>>>> On Jun 29, 2017, at 3:39 PM, Matthias Lange
>>>> <matthias.la...@kernkonzept.com
>>>> <mailto:matthias.la...@kernkonzept.com>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> On 06/29/2017 10:11 PM, Daniel (Xiaolong) Wang wrote:
>>>>> Hi all,
>>>>>
>>>>> I want to give L4Linux access to SD card, and ethernet driver.
>>>>> Initially I thought by run L4Linux kernel on top of L4re, drivers
>>>>> built with L4Linux kernel can just work. After trying and reading the
>>>>> email archive, seems like I need to configure the corresponding
>>>>> capability in cfg. I’m very new to L4re environment is there any
>>>>> tutorials or references that can help me understand it better? (I’m
>>>>> currently reading the manual, my development board is a beagle bone
>>>>> black)
>>>>
>>>> In case of ARM platforms this is (still) not an easy undertaking. What
>>>> you have to do is basically this:
>>>>
>>>> 1. Enable the desired device drivers in your kernel configuration.
>>>> 2. Make L4Linux compile.
>>>> 3. Create a device tree which contains the device nodes of the desired
>>>> devices.
>>>> 4. Create an io configuration for L4Re with the devices and their
>>>> resources and assign the desired devices to a vbus which is eventually
>>>> given to L4Linux. You can read about io and its configuration here [1].
>>>> 5. Boot your setup on the target. At this stage, you usually you have to
>>>> instrument the device driver to debug the reasons why it is failing.
>>>>
>>>> Best,
>>>> Matthias.
>>>>
>>>> [1] http://l4re.org/doc/io.html <http://l4re.org/doc/io.html>
>>>>
>>>>>
>>>>> Also I’m trying to build a L4Linux with MMC driver. My configuration
>>>>> is based on default arm_def

Re: L4Linux network and SD Access

2017-07-07 Thread Matthias Lange
Hi,

On 07/07/2017 07:02 PM, Daniel (Xiaolong) Wang wrote:
> Thank you so much CHristian. Sorry to bother you again. One more thing
> that is not clear to me hope you can give me some advice. For the the
> BeagleBone Black board I’m using now it seems the eMMC is connected
> through GPIO pins. I’m not sure how to map the MMIO regions and
> interrupts
> (https://github.com/derekmolloy/boneDeviceTree/blob/master/DTSource3.8.12/am33xx.dtsi)
> 
> For example this is the MMC1 and MMC2 I saw on the device tree:

You should have a look into the AM33xx TRM to determine the properties
of the MMC controller.

> 
> */mmc1: mmc@4806 { compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc1";
> ti,dual-volt; ti,needs-special-reset; ti,needs-special-hs-handling; dmas
> = < 24  25>; dma-names = "tx", "rx"; status = "disabled"; };
> /*
> 
> /*mmc2: mmc@481d8000 { compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc2";
> ti,needs-special-reset; ti,needs-special-hs-handling; dmas = < 2
>  3>; dma-names = "tx", "rx"; status = "disabled"; }; mmc3:
> mmc@4781 { compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc3";
> ti,needs-special-reset; ti,needs-special-hs-handling; status =
> "disabled"; };* /
> 
> Is 4806 the beginning of MMIO region? How about the size?

The kernel you are looking at is probably to old. A more recent version
of the device tree looks like this:

mmc1: mmc@4806 {
compatible = "ti,omap4-hsmmc";
ti,hwmods = "mmc1";
ti,dual-volt;
ti,needs-special-reset;
ti,needs-special-hs-handling;
dmas = <_xbar 24 0 0
_xbar 25 0 0>;
dma-names = "tx", "rx";
interrupts = <64>;
interrupt-parent = <>;
reg = <0x4806 0x1000>;
status = "disabled";
}

Here you can determine the MMIO region from the 'reg' property. For the
IRQ number you need to work your way up through the interrupt parent
node to get the correct number. You can also see that you need to pass
in the DMA engine device.

> Second for the I2C I saw this:
> 
> */i2c0: i2c@44e0b000 { compatible = "ti,omap4-i2c"; #address-cells = <1>;
> #size-cells = <0>; ti,hwmods = "i2c1"; /* TODO: Fix hwmod */ reg =
> <0x44e0b000 0x1000>; interrupts = <70>; status = "disabled"; };/*
> 
> Does it mean the MMIO region is [0x44e0b000, 0x44e0c000]?

The end of the MMIO region is 0x44e0bfff.

Regards,
Matthias.

> 
> I’m sorry for asking so dumb many questions.
> 
> Thanks
> -Dan
>   
>> On Jul 7, 2017, at 7:24 AM, Christian Ludwig
>> <christian_lud...@genua.de <mailto:christian_lud...@genua.de>> wrote:
>>
>> Hi,
>>
>> On Friday, 7. July 2017, 02:19:34 Daniel  Wang wrote:
>>> I have a question. I just saw in the io/server/src/drivers/gpio
>>> directory.There are only two cc files. One is for bcm2835.c another
>>> one is
>>> for omap.cc <http://omap.cc>. Does that mean if I want to make MMC
>>> and Ethernet drivers
>>> works in guest Linux on platform other than bcm2835, OMAP3 or OMAP4 I
>>> have
>>> to modify the driver file and provide support functions for that
>>> platform?
>>
>> Therse GPIO drivers in io provide a means to pass different GPIO pins to
>> different clients, e.g. Linuxes. It's a way to moderate access to a GPIO
>> controller from multiple clients.
>>
>> As far as I understand, you want to drive MMC and ethernet in one
>> L4Linux. So
>> you just have to pass the proper devices (MMIO regions and interrupts) to
>> Linux. As Adam pointed out, you need to tweak Kconfig files to allow
>> you to
>> select the proper drivers. Note however that your device's drivers are
>> most
>> likely not sufficient to finally get the devices going. These drivers
>> most
>> likely need other infrastructure like clock devices and some power
>> management.
>> You need to find a way to either also pass these to Linux, or build a
>> separate
>> clock/pm server that only passes the necessary clock gates and power
>> lines to
>> Linux. Which also means you need to create a set of new drivers in Linux.
>>
>> If you are really lucky you might be able to patch out the clock/pm
>> calls in
>> the Linux drivers and get a first working version. But no guaran

Re: Unit testing guidelines or resource

2017-07-05 Thread Matthias Lange
Hi,

On 06/30/2017 04:34 AM, jrodrig...@uns.edu.ar wrote:
> 
> Hi L4 team,
> 
> I'm looking forward for information about existent or recommended
> methodology to perform systematic test on single fiasco component or
> L4Re service.

Well, that depends on what you want to test and what your approach to
testing is. Is it (code) coverage testing? Unit tests? API tests?

> From what I see, there is not other option than running on qemu or
> target host. What I would really like is to get sort of fiasco mock
> to be able to run systematic unit test on user level app but on my PC
> (avoiding the emulator).

It is not clear to me what you mean with "target host". How is it
different to running it on your PC?

> Any recommendation on this regard?
> Thought about fiasco UX, but not sure if that feature is still maintained.
> 
> And if I jump into the complex task of designing this mock, any
> recommendation about l4re service which is more "isolated" from
> microkernel to take it as initial use case for such development?

I am not sure what you mean by a "more isolated" l4re service. Could you
give an example?

Regards,
Matthias.

> 
> Well that's all by now.
> 
> Thanks in advance for any feedback
> Best
> Agustin

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Obtaining and accessing device abstractions in L4Re

2017-07-05 Thread Matthias Lange
Hi Paul,

On 07/04/2017 11:11 PM, Paul Boddie wrote:
> Hello,
> 
> I've been trying to write some drivers in L4Re, starting out with a GPIO 
> driver for a currently-unsupported board, and I think I have mostly 
> understood 
> the concepts involved. Fortunately, there are already a couple of drivers to 
> borrow ideas from...
> 
> pkg/io/io/server/src/drivers/gpio/bcm2835.cc
> pkg/io/io/server/src/drivers/gpio/omap.cc
> 
> And if I am not mistaken, such drivers can be accessed from other components 
> by just doing something like this (testing for validity as we go):
> 
> vbus = l4re_env_get_cap("vbus");
> l4vbus_get_device_by_hid(vbus, 0, _handle, gpio_hid, 0, 0);
> l4vbus_gpio_set(vbus, gpio_handle, gpio_reg, value);
> 
> It appears that if I just declare the device appropriately in my board's 
> hw_devices.io file, I should be able to get a handle for it using code like 
> the above. And all access can apparently be done via the l4vbus_gpio 
> functions 
> with this handle.

That's not the whole story. Devices declared in e.g. hw_devices.io
describe physical (real) devices and their resources. The device handle
that you obtain via the Vbus API points to a virtual device and only
virtual devices can be assigned to a client's virtual bus. A virtual
device can wrap a physical one but e.g. in the case of GPIOs it can be
composed of individual (or ranges) of physical GPIO resources (= pins).

> (I was also wondering if it was possible to actually instantiate or obtain a 
> device directly instead of obtaining a handle, for code written in C++, but 
> the above is easily good enough at the moment.)
> 
> But now I want to make another, non-GPIO, driver abstraction, instead of 
> directly accessing the mapped memory regions concerned (which I see that some 
> of the drivers do). It seems like I should be able to...

The first question that should be answered is, whether the driver
(abstraction) has to be implemented inside io. Maybe a standalone driver
with an appropriate API is better suited for your use case, because the
Vbus API has its limitations and most likely you need to extend it
anyways. Also from a security standpoint it is maybe worthwile to
implement the driver in its own component.

Currently L4Re is lacking a proper device driver framework and we are
still learning and exploring different directions. Maybe you would like
to discuss your use case further so that we can guide you through that
process?

Regards,
Matthias.

>  * define a class for the abstraction inheriting from Hw::Device
>  * declare the device in hw_devices.io using this class
>  * provide various properties in the hw_devices.io declaration
>(for configuration purposes)
>  * read the properties in the actual class implementation
>  * access registers in memory just as the GPIO drivers do
> 
> I think I can muddle through all this. But how should another component 
> access 
> methods provided by this driver? Do I have to implement functionality like 
> that provided by the following files...?
> 
> pkg/io/libvbus/lib/src/vbus_gpio.cc
> pkg/io/libvbus/include/vbus_gpio-ops.h
> pkg/io/io/server/src/virt/gpio/vgpio.cc
> 
> Does any of this make any sense? :-)
> 
> I'm just getting started here, but thanks are due in advance for any advice 
> anyone may have!
> 
> Paul

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Linux network and SD Access

2017-06-29 Thread Matthias Lange
Hi,

On 06/29/2017 10:11 PM, Daniel (Xiaolong) Wang wrote:
> Hi all,
> 
> I want to give L4Linux access to SD card, and ethernet driver.
> Initially I thought by run L4Linux kernel on top of L4re, drivers
> built with L4Linux kernel can just work. After trying and reading the
> email archive, seems like I need to configure the corresponding
> capability in cfg. I’m very new to L4re environment is there any
> tutorials or references that can help me understand it better? (I’m
> currently reading the manual, my development board is a beagle bone
> black)

In case of ARM platforms this is (still) not an easy undertaking. What
you have to do is basically this:

1. Enable the desired device drivers in your kernel configuration.
2. Make L4Linux compile.
3. Create a device tree which contains the device nodes of the desired
devices.
4. Create an io configuration for L4Re with the devices and their
resources and assign the desired devices to a vbus which is eventually
given to L4Linux. You can read about io and its configuration here [1].
5. Boot your setup on the target. At this stage, you usually you have to
instrument the device driver to debug the reasons why it is failing.

Best,
Matthias.

[1] http://l4re.org/doc/io.html

> 
> Also I’m trying to build a L4Linux with MMC driver. My configuration
> is based on default arm_defconfig. I enabled
> 
> * Make Linux be a Server * Bus driver for L4vbus * L4shm based
> network driver * MMC/SD/SDIO card support -> HW reset support for
> eMMC, MMC block device driver, Use bounce buffer for simple hosts,
> SDIO UART/GPS class support, Secure Digital Host Controller Interface
> Support, SDHCI platform and OF driver helper, MediaTek SD/MMC Card
> Interface support * DOS/FAT/NT Filesystem -> MSDOS fs support, VFAT
> fs support
> 
> however, when it build the following errors show did I do something
> wrong?
> 
> LD  drivers/i2c/busses/built-in.o LD
> drivers/i2c/muxes/built-in.o LD  drivers/i2c/built-in.o LD
> drivers/idle/built-in.o CC  drivers/input/input.o CC
> drivers/input/input-compat.o CC  drivers/input/input-mt.o CC
> drivers/input/ff-core.o LD  drivers/input/input-core.o CC
> drivers/input/mousedev.o CC  drivers/input/evdev.o LD
> drivers/input/built-in.o LD  drivers/iommu/built-in.o CC
> drivers/irqchip/irqchip.o LD  drivers/irqchip/built-in.o LD
> drivers/leds/built-in.o LD  drivers/lguest/built-in.o LD
> drivers/macintosh/built-in.o LD
> drivers/media/common/b2c2/built-in.o LD
> drivers/media/common/saa7146/built-in.o LD
> drivers/media/common/siano/built-in.o LD
> drivers/media/common/v4l2-tpg/built-in.o LD
> drivers/media/common/built-in.o LD
> drivers/media/firewire/built-in.o LD
> drivers/media/i2c/soc_camera/built-in.o LD
> drivers/media/i2c/built-in.o LD
> drivers/media/mmc/siano/built-in.o LD
> drivers/media/mmc/built-in.o LD
> drivers/media/pci/b2c2/built-in.o LD
> drivers/media/pci/ddbridge/built-in.o LD
> drivers/media/pci/dm1105/built-in.o LD
> drivers/media/pci/mantis/built-in.o LD
> drivers/media/pci/netup_unidvb/built-in.o LD
> drivers/media/pci/ngene/built-in.o LD
> drivers/media/pci/pluto2/built-in.o LD
> drivers/media/pci/pt1/built-in.o LD
> drivers/media/pci/pt3/built-in.o LD
> drivers/media/pci/saa7146/built-in.o LD
> drivers/media/pci/smipcie/built-in.o LD
> drivers/media/pci/ttpci/built-in.o LD
> drivers/media/pci/built-in.o LD
> drivers/media/platform/omap/built-in.o LD
> drivers/media/platform/built-in.o LD
> drivers/media/rc/keymaps/built-in.o LD
> drivers/media/rc/built-in.o LD  drivers/media/tuners/built-in.o 
> LD  drivers/media/usb/b2c2/built-in.o LD
> drivers/media/usb/dvb-usb/built-in.o LD
> drivers/media/usb/dvb-usb-v2/built-in.o LD
> drivers/media/usb/s2255/built-in.o LD
> drivers/media/usb/siano/built-in.o LD
> drivers/media/usb/stkwebcam/built-in.o LD
> drivers/media/usb/ttusb-budget/built-in.o LD
> drivers/media/usb/ttusb-dec/built-in.o LD
> drivers/media/usb/zr364xx/built-in.o LD
> drivers/media/usb/built-in.o LD  drivers/media/built-in.o LD
> drivers/mfd/built-in.o LD  drivers/misc/cb710/built-in.o LD
> drivers/misc/eeprom/built-in.o LD
> drivers/misc/lis3lv02d/built-in.o LD
> drivers/misc/mic/bus/built-in.o LD  drivers/misc/mic/built-in.o 
> LD  drivers/misc/ti-st/built-in.o LD
> drivers/misc/built-in.o CC  drivers/mmc/card/block.o CC
> drivers/mmc/card/queue.o LD  drivers/mmc/card/mmc_block.o CC
> drivers/mmc/card/sdio_uart.o LD  drivers/mmc/card/built-in.o CC
> drivers/mmc/core/core.o CC  drivers/mmc/core/bus.o CC
> drivers/mmc/core/host.o CC  drivers/mmc/core/mmc.o CC
> drivers/mmc/core/mmc_ops.o CC  drivers/mmc/core/sd.o CC
> drivers/mmc/core/sd_ops.o CC  drivers/mmc/core/sdio.o CC
> drivers/mmc/core/sdio_ops.o CC  drivers/mmc/core/sdio_bus.o CC
> drivers/mmc/core/sdio_cis.o CC  drivers/mmc/core/sdio_io.o CC
> drivers/mmc/core/sdio_irq.o CC  drivers/mmc/core/quirks.o CC
> drivers/mmc/core/slot-gpio.o CC  

Re: Fiasco.OC: null-pointer dereference?

2017-05-08 Thread Matthias Lange
Hi Stefan,

On 05/08/2017 03:36 PM, Matthias Lange wrote:
> Hi Stefan,
> 
> On 05/08/2017 09:09 AM, Stefan Kalkowski wrote:
>> Dear L4-Hackers,
>>
>> recently, I started to upgrade the Fiasco.OC kernel version that is used
>> by the Genode OS framework to the lastly released version (r72). I took
>> the opportunity to upgrade, because the upcoming Genode release uses a
>> fresh compiler toolchain that refused to build the very old Fiasco.OC
>> kernel version that was used until now (r56).
>> Everything went quite smoothly, and I'm glad to see how the kernel
>> develops further. Thanks to all developers at this point!
>>
>> Unfortunately, I stumbled across an issue when it comes to thread
>> destruction. In our system all threads are constructed and destructed by
>> the roottask that is called 'core'. In some cases, not always but quite
>> often, the Ram_quota pointer of the thread object is zero during the
>> call of the Thread_oject's delete operator, which leads to a page-fault
>> within the kernel-code. A simple check[1] before dereferencing the
>> pointer solves the problem, but I wonder whether we will leak quota or
>> memory then, or in general cover some more serious problem.
> 
> Thank you for reporting this issue. I will forward this to our kernel
> maintainer.
> 
> Could you elaborate a little bit more on the circumstances leading to
> this issue? I wonder whether we can come up with a simple test case
> triggering the page fault.

No need to come up with a test case. It turns out that your problem
originates in an unfortunate combination of "old" sources and new
toolchain. C++ allows the compiler to elide writes to objects that are
later intialized by a constructor which leads to the _quota member not
being initialized correctly under all circumstances.

That also answers your inital question that, yes, your check covers a
more serious problem :).

Could you please try the attached patch? It should fix the problem.

Best,
Matthias.

> 
> Best,
> Matthias.
> 
>> Obviously, we have different usage patterns of syscalls, e.g.: the order
>> of destructing IPC-gates, threads, IRQs, and tasks. Moreover, we still
>> have some very few patches[2] so that the kernel meets our requirements.
>> But none of them explains the thread's Ram_quota pointer getting zero.
>> The page-fault triggers across all x86 and arm platforms that we use.
>>
>> Any hint would be very much appreciated, all the best!
>> Stefan
>>
>> [1]
>> https://github.com/skalk/foc/commit/2b01c9d16fd8e29e6af18fe750be2c8a312b4762
>> [2] https://github.com/skalk/foc/commits/r72
From d8daf7077abb9290cf1603fc73e12db618f92b12 Mon Sep 17 00:00:00 2001
From: Alexander Warg <alexander.w...@kernkonzept.com>
Date: Wed, 5 Oct 2016 15:20:59 +0200
Subject: [PATCH] Fix invalid initialization in 'new'

C++ allows the compiler to elide write to objects that are later
initialized with a constructor. This may lead to the situation that the
`_quota` member of a thread is not correctly initialized. To fix this we
need to pass the correct quota object to each Thread constructor
instead.

Change-Id: Iac0ad2963b86f8393df6ad0c18adde386d9b1179
---
 src/kern/app_cpu_thread.cpp   |  7 ++-
 src/kern/arm/main.cpp |  2 +-
 src/kern/arm/thread-arm.cpp   | 11 ++-
 src/kern/ia32/32/main-ia32-32.cpp |  2 +-
 src/kern/ia32/64/main-ia32-64.cpp |  2 +-
 src/kern/ia32/thread-ia32.cpp |  3 ++-
 src/kern/kernel_thread-std.cpp|  4 ++--
 src/kern/kernel_thread.cpp|  5 +++--
 src/kern/mips/main.cpp|  2 +-
 src/kern/mips/thread-mips.cpp |  5 +++--
 src/kern/ppc32/main.cpp   |  2 +-
 src/kern/ppc32/thread-ppc32.cpp   | 11 ++-
 src/kern/sparc/main.cpp   |  2 +-
 src/kern/sparc/thread-sparc.cpp   |  5 +++--
 src/kern/thread.cpp   | 14 ++
 src/kern/thread_object.cpp| 11 ++-
 16 files changed, 49 insertions(+), 39 deletions(-)

diff --git a/src/kern/app_cpu_thread.cpp b/src/kern/app_cpu_thread.cpp
index 8717355..57d2d9d 100644
--- a/src/kern/app_cpu_thread.cpp
+++ b/src/kern/app_cpu_thread.cpp
@@ -28,6 +28,11 @@ IMPLEMENTATION [mp]:
 #include "timer_tick.h"
 #include "spin_lock.h"
 
+PUBLIC explicit inline
+App_cpu_thread::App_cpu_thread(Ram_quota *q)
+: Kernel_thread(q)
+{}
+
 PUBLIC static
 Kernel_thread *
 App_cpu_thread::may_be_create(Cpu_number cpu, bool cpu_never_seen_before)
@@ -38,7 +43,7 @@ App_cpu_thread::may_be_create(Cpu_number cpu, bool cpu_never_seen_before)
   return static_cast(kernel_context(cpu));
 }
 
-  Kernel_thread *t = new (Ram_quota::root) App_cpu_thread;
+  Kernel_thread *t = new (Ram_quota::root) App_cpu_thread(Ram_quota::root);
   assert (t);
 
   t->set_home_cpu(cpu);
di

Re: Fiasco.OC: null-pointer dereference?

2017-05-08 Thread Matthias Lange
Hi Stefan,

On 05/08/2017 09:09 AM, Stefan Kalkowski wrote:
> Dear L4-Hackers,
> 
> recently, I started to upgrade the Fiasco.OC kernel version that is used
> by the Genode OS framework to the lastly released version (r72). I took
> the opportunity to upgrade, because the upcoming Genode release uses a
> fresh compiler toolchain that refused to build the very old Fiasco.OC
> kernel version that was used until now (r56).
> Everything went quite smoothly, and I'm glad to see how the kernel
> develops further. Thanks to all developers at this point!
> 
> Unfortunately, I stumbled across an issue when it comes to thread
> destruction. In our system all threads are constructed and destructed by
> the roottask that is called 'core'. In some cases, not always but quite
> often, the Ram_quota pointer of the thread object is zero during the
> call of the Thread_oject's delete operator, which leads to a page-fault
> within the kernel-code. A simple check[1] before dereferencing the
> pointer solves the problem, but I wonder whether we will leak quota or
> memory then, or in general cover some more serious problem.

Thank you for reporting this issue. I will forward this to our kernel
maintainer.

Could you elaborate a little bit more on the circumstances leading to
this issue? I wonder whether we can come up with a simple test case
triggering the page fault.

Best,
Matthias.

> Obviously, we have different usage patterns of syscalls, e.g.: the order
> of destructing IPC-gates, threads, IRQs, and tasks. Moreover, we still
> have some very few patches[2] so that the kernel meets our requirements.
> But none of them explains the thread's Ram_quota pointer getting zero.
> The page-fault triggers across all x86 and arm platforms that we use.
> 
> Any hint would be very much appreciated, all the best!
> Stefan
> 
> [1]
> https://github.com/skalk/foc/commit/2b01c9d16fd8e29e6af18fe750be2c8a312b4762
> [2] https://github.com/skalk/foc/commits/r72

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Questions about Fiasco.OC scheduler and L4Linux

2017-03-27 Thread Matthias Lange
Hi,

On 03/27/2017 03:12 PM, Marc CHALAND wrote:
> Hi
> 
> Le mer. 22 mars 2017 à 00:59, Adam Lackorzynski
> > a écrit :
> 
> 
> With a i.MX7d you have hardware support for virtualization, so what
> about using that, i.e. running normal Linux in a VM? Getting an L4Linux
> for an older version is of course possible but a bit of work.
> 
> 
> Do you have any sample lua script to help me to set a linux vm up ?

Please have a look at conf/examples/l4lx.cfg in your l4 source
directory. This starts the L4Linux kernel and passes a couple of
arguments to the kernel such as memory size and the ramdisk name.

Best,
Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Can't find device node in /dev/ directory!

2016-10-27 Thread Matthias Lange
On 10/27/2016 04:29 PM, li94575 wrote:
> Hi, 
>I added some drivers in l4linux, of course, I assigned the
> corresponding peripheral resources (iomem, irq) to these drivers.
> From the driver's output log, it seems that they all work well, but when
> entering the command line, I could not find any relevant
> device node in /dev/ directory. To my confusion, I can see these devices
> info in /sys/ directory. 
>   The command line args is showing below:
>   mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd
> ramdisk_size=4000
>   Any idea?

Do you have devtmpfs configured in your L4Linux kernel? Did you ran udev
or mdev to populate /dev?

Best,
Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Is L4Linux can use its existed Linux driver to access hardware device?

2016-09-14 Thread Matthias Lange
Hi,

On 09/09/2016 11:49 AM, Zhe Zhao wrote:
> Hi,
> 
> Majorly I'd like to run a Android M with L4Linux on my ODROID-XU4,
> board, but I'm not sure is that possible, seems there is a L4Android
> already, but it is running
> on a qemu with strange two androids run together.
> 
> Is there similiar project in your side, and is that a good idea to run
> Android on L4Linux, if I understand it correct, I just need to port
> needed linux driver to L4Linux, and
> build a native google android, then it should work?

Running Android in a virtualized environment is a tough task.
Unfortunately it is not "just" about porting drivers to L4Linux. Device
pass-through is a tricky thing. If you still want to pursue this
endeavour a good start is to build a generic ARM version of Android from
the AOSP. Then take the disk images, create a L4Re configuration and try
to boot the system.

Matthias.

> 
> I want to achieve Android together with a subsystem can achieve hard
> real time, instead of using weird VM solutions.
> 
> 
> Thanks
> Br
> Alex
> 
> 
> 2016-09-09 14:27 GMT+08:00 Matthias Lange
> <matthias.la...@kernkonzept.com <mailto:matthias.la...@kernkonzept.com>>:
> 
> Hi,
> 
> On 09/07/2016 09:00 AM, Zhe Zhao wrote:
> > Hi,
> >
> > Thanks for you answers.
> >
> > Does Fiasco use the scheduler that follow the priority? I mean like if
> > there is high priority task, it will always have CPU?
> 
> I would like to point you to this recent thread on the mailing list
> which discusses details about L4Re's scheduling [1].
> 
> > Does Fiasco already support tickless kernel? or it will use a fixed 1000
> > HZ as the tick?
> 
> There is some support for tickless/oneshot mode in the L4Re microkernel
> but it is not tested.
> 
> > I'd like to run L4Linux on a Droid-xu4 or raspberry is there any easy
> > start guide for it?
> 
> Unfortunately no. But it is not complicated either. You can take the
> L4Linux basic example as a starting point. You need to build the L4Re
> microkernel for the right platform. The userland needs to be compiled
> for the right ARM architecture (Rasperry Pi is ARM6k whereas the Droid
> is ARMv7). Then you create an uImage which you can e.g. boot via tftp.
> 
> > When I tried the L4Linux with ramdisk which in the L4Re snapshot, it
> > seems the it just like running a Linux. I don't know if below
> > understanding is correct, if not please correct me
> >
> > The syscall fork "int 80" will be redirect to L4Linux from Fiasco by IPC
> > (how Fiasco knows to redirect int 80 through IPC to L4Linux?), and fork
> > will be executed inside L4Linux, then L4Linux will create Fiasco task?
> >  (so here we have two task proc combined to identify one linux process),
> > and L4Linux will create vmspace for the process ? then how the memory
> > space be handled to Fiasco?
> 
> L4-like systems have the concept of an exception handler per thread. For
> L4Linux this means that all exceptions triggered by a Linux user process
> are send to the L4Linux kernel.
> 
> In the case of fork() the L4Linux kernel eventually creates a new L4
> task (l4_factory_create_task). Memory gets mapped from the L4Linux task
> into the new task e.g. upon pagefaults.
> 
> > From the above assumption, it means I can just build a rootfs with
> > native Linux apps, and use IO manager to pass the harddisk/emmc to
> > L4Linux, then I can run whatever apps I like?
> 
> Basically yes. On ARM platforms there are some stumbling blocks for sure
> as device pass-through can be tricky at times.
> 
> > I'd like to start read codes related to Fiasco, L4Re, any suggestions
> > about the start point?
> 
> That's a very generic question and the generic answer for the L4Re
> microkernel is: fiasco/src/kern. Do you have any specific mechanisms in
> mind you want to understand?
> 
> Matthias.
> 
> 
> [1]
> http://os.inf.tu-dresden.de/pipermail/l4-hackers/2016/007907.html
> <http://os.inf.tu-dresden.de/pipermail/l4-hackers/2016/007907.html>
> 
> >
> > Br
> > Alex
> >
> >
> > 2016-09-06 23:37 GMT+08:00 Matthias Lange
> > <matthias.la...@kernkonzept.com
> <mailto:matthias.la...@kernkonzept.com>
> <mailto:matthias.la...@kernkonzept.com
> <mailto:matthias.la...@kernkonzept.com>>>:
> >
> > Hi,
> >
> > On 09/05/2016 11:36 AM, Zhe Zh

Re: Is L4Linux can use its existed Linux driver to access hardware device?

2016-09-09 Thread Matthias Lange
Hi,

On 09/07/2016 09:00 AM, Zhe Zhao wrote:
> Hi,
> 
> Thanks for you answers.
> 
> Does Fiasco use the scheduler that follow the priority? I mean like if
> there is high priority task, it will always have CPU?

I would like to point you to this recent thread on the mailing list
which discusses details about L4Re's scheduling [1].

> Does Fiasco already support tickless kernel? or it will use a fixed 1000
> HZ as the tick?

There is some support for tickless/oneshot mode in the L4Re microkernel
but it is not tested.

> I'd like to run L4Linux on a Droid-xu4 or raspberry is there any easy
> start guide for it?

Unfortunately no. But it is not complicated either. You can take the
L4Linux basic example as a starting point. You need to build the L4Re
microkernel for the right platform. The userland needs to be compiled
for the right ARM architecture (Rasperry Pi is ARM6k whereas the Droid
is ARMv7). Then you create an uImage which you can e.g. boot via tftp.

> When I tried the L4Linux with ramdisk which in the L4Re snapshot, it
> seems the it just like running a Linux. I don't know if below
> understanding is correct, if not please correct me
> 
> The syscall fork "int 80" will be redirect to L4Linux from Fiasco by IPC
> (how Fiasco knows to redirect int 80 through IPC to L4Linux?), and fork
> will be executed inside L4Linux, then L4Linux will create Fiasco task?
>  (so here we have two task proc combined to identify one linux process),
> and L4Linux will create vmspace for the process ? then how the memory
> space be handled to Fiasco?

L4-like systems have the concept of an exception handler per thread. For
L4Linux this means that all exceptions triggered by a Linux user process
are send to the L4Linux kernel.

In the case of fork() the L4Linux kernel eventually creates a new L4
task (l4_factory_create_task). Memory gets mapped from the L4Linux task
into the new task e.g. upon pagefaults.

> From the above assumption, it means I can just build a rootfs with
> native Linux apps, and use IO manager to pass the harddisk/emmc to
> L4Linux, then I can run whatever apps I like?

Basically yes. On ARM platforms there are some stumbling blocks for sure
as device pass-through can be tricky at times.

> I'd like to start read codes related to Fiasco, L4Re, any suggestions
> about the start point?

That's a very generic question and the generic answer for the L4Re
microkernel is: fiasco/src/kern. Do you have any specific mechanisms in
mind you want to understand?

Matthias.


[1] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2016/007907.html

> 
> Br
> Alex
> 
> 
> 2016-09-06 23:37 GMT+08:00 Matthias Lange
> <matthias.la...@kernkonzept.com <mailto:matthias.la...@kernkonzept.com>>:
> 
> Hi,
> 
> On 09/05/2016 11:36 AM, Zhe Zhao wrote:
> > Hi,
> >
> > Thanks for your answers, I really appreciate it.
> >
> > I tried to run L4Linux and L4Re in a qemu environment, is it support SMP
> > already? I found I only have a single core L4Linux running. and Fiasco
> > report only one scheduler instance.
> 
> Yes, SMP is supported. Have you configured the L4Re microkernel with
> multiprocessing support? Did you start qemu with multiple CPUs? To
> enable more CPUs in L4Linux you need to pass the 'l4x_cpus='
> parameter on the cmdline.
> 
> > And is it possible to direct reuse the L4Linux's driver instead of
> > rewrite them in L4Re? is that IO manager used to mapping all needed
> > device physical address to L4Linux's memory space? Is that mean I can 
> map
> > all device direct to L4Linux through IO manager?
> 
> Yes, but there might be work involved. First you should make yourself
> familiar with the concepts of Io [0].
> 
> > Is there any work ongoing to support ARM64 on L4Re and L4Linux? It will
> > be quite interesting consider most of the ARM device are moving to be 64
> > bit arch.
> 
> We are looking at it but there is nothing to announce publicly right now
> 
> > Do you have some recommend documents for the newbie like me to get a
> > quick start up?
> 
> The L4Re documentation [1].
> 
> 
> Matthias.
> 
> [0] http://l4re.org/doc/io.html
> [1] http://l4re.org/doc/
> 
> > Br
> > Alex
> >
> > 2016-09-02 14:24 GMT+08:00 Matthias Lange
> > <matthias.la...@kernkonzept.com
> <mailto:matthias.la...@kernkonzept.com>
> <mailto:matthias.la...@kernkonzept.com
> <mailto:matthias.la...@kernkonzept.com>>>:
> >
> > Hi,
> >
> > On 08/31/2016 02:35 PM, Zhe Zhao wrote:
> > > 

Re: Is L4Linux can use its existed Linux driver to access hardware device?

2016-09-06 Thread Matthias Lange
Hi,

On 09/05/2016 11:36 AM, Zhe Zhao wrote:
> Hi,
> 
> Thanks for your answers, I really appreciate it.
> 
> I tried to run L4Linux and L4Re in a qemu environment, is it support SMP
> already? I found I only have a single core L4Linux running. and Fiasco
> report only one scheduler instance.

Yes, SMP is supported. Have you configured the L4Re microkernel with
multiprocessing support? Did you start qemu with multiple CPUs? To
enable more CPUs in L4Linux you need to pass the 'l4x_cpus='
parameter on the cmdline.

> And is it possible to direct reuse the L4Linux's driver instead of
> rewrite them in L4Re? is that IO manager used to mapping all needed
> device physical address to L4Linux's memory space? Is that mean I can map
> all device direct to L4Linux through IO manager?

Yes, but there might be work involved. First you should make yourself
familiar with the concepts of Io [0].

> Is there any work ongoing to support ARM64 on L4Re and L4Linux? It will
> be quite interesting consider most of the ARM device are moving to be 64
> bit arch.

We are looking at it but there is nothing to announce publicly right now

> Do you have some recommend documents for the newbie like me to get a
> quick start up?

The L4Re documentation [1].


Matthias.

[0] http://l4re.org/doc/io.html
[1] http://l4re.org/doc/

> Br
> Alex
> 
> 2016-09-02 14:24 GMT+08:00 Matthias Lange
> <matthias.la...@kernkonzept.com <mailto:matthias.la...@kernkonzept.com>>:
> 
> Hi,
> 
> On 08/31/2016 02:35 PM, Zhe Zhao wrote:
> > Hi,
> >
> > After read the basic ideas of L4Linux I have some questions related to 
> it.
> >
> > Is L4Linux run as a paravirtualization VM on L4Re? Then the traditional
> > Linux Process just still compiled against Linux system and put them
> > together with L4Linux disk image?
> > so it means L4Re works like qemu and Linuxl?
> 
> No, L4Re does not work like qemu.
> 
> > or L4Re works as a micro kernel operating system, and L4Linux run as a
> > process on it, all devices handled to L4Linux to reuse the drivers of
> > L4Linux? and the previous Linux process
> > compiled with Linux, but run direct on L4Re as L4 processes which
> > communicate with L4Linux through IPC?
> 
> L4Linux is a modified version of the Linux kernel with the hardware
> abstraction layer (HAL) implemented using L4Re primitives. Technically
> L4Re appears to be "just" another hardware architecture for the Linux
> kernel, just like ARM or MIPS.
> 
> L4Linux runs as a user space task on top of the L4Re microkernel and at
> the (Linux) kernel ABI is unmodified which allows to run existing Linux
> programs. That means, you can compile "normal" Linux programs with your
> standard tool chain, put the binary onto a ramdisk or disk image and run
> it with L4Linux.
> 
> > it is quite confused after read a little of the codes, in L4Linux, seems
> > there is some injection of L4 task stuffs inside thread_struct of Linux,
> > but also have some vCPU related stuffs,
> > can you help me about what is the real behavior of L4Linux?
> 
> Each (Linux) process is actually an L4Re task with the exception and
> page fault handler set to the L4Linux task. That's why some L4-specific
> additions are required to Linux kernel data structures.
> 
> Matthias.
> 
> > I'm sorry to ask this basic questions, but after some digging I feel
> > quite confused about how it works.
> >
> > Thanks
> > Br
> > Alex


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Is L4Linux can use its existed Linux driver to access hardware device?

2016-09-02 Thread Matthias Lange
Hi,

On 08/31/2016 02:35 PM, Zhe Zhao wrote:
> Hi,
> 
> After read the basic ideas of L4Linux I have some questions related to it.
> 
> Is L4Linux run as a paravirtualization VM on L4Re? Then the traditional
> Linux Process just still compiled against Linux system and put them
> together with L4Linux disk image?
> so it means L4Re works like qemu and Linuxl?

No, L4Re does not work like qemu.

> or L4Re works as a micro kernel operating system, and L4Linux run as a
> process on it, all devices handled to L4Linux to reuse the drivers of
> L4Linux? and the previous Linux process
> compiled with Linux, but run direct on L4Re as L4 processes which
> communicate with L4Linux through IPC?

L4Linux is a modified version of the Linux kernel with the hardware
abstraction layer (HAL) implemented using L4Re primitives. Technically
L4Re appears to be "just" another hardware architecture for the Linux
kernel, just like ARM or MIPS.

L4Linux runs as a user space task on top of the L4Re microkernel and at
the (Linux) kernel ABI is unmodified which allows to run existing Linux
programs. That means, you can compile "normal" Linux programs with your
standard tool chain, put the binary onto a ramdisk or disk image and run
it with L4Linux.

> it is quite confused after read a little of the codes, in L4Linux, seems
> there is some injection of L4 task stuffs inside thread_struct of Linux,
> but also have some vCPU related stuffs,
> can you help me about what is the real behavior of L4Linux?

Each (Linux) process is actually an L4Re task with the exception and
page fault handler set to the L4Linux task. That's why some L4-specific
additions are required to Linux kernel data structures.

Matthias.

> I'm sorry to ask this basic questions, but after some digging I feel
> quite confused about how it works.
> 
> Thanks
> Br
> Alex

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: dynamic reconfiguration

2016-08-16 Thread Matthias Lange
Hi,

On 08/15/2016 12:47 PM, ba_f wrote:
> Am 2016-08-11 09:07, schrieb Matthias Lange:
>>> If I got it right, any Task can create an IPC-Gate at run-time and
>>> thus create child tasks with ipc-server or ipc-client capabilities,
>>> don't they?
>>
>> That depends on the task's factory but the general answer is yes.
>>
>> Matthias.
> 
> 
> Hello,
> 
> 
> do you have a reference design for this?
> So maybe one 'parent' Task creating two 'childs' and establishes an IPC
> between them.

I am afraid that there is no such reference example. I would recommend
looking into ned's implementation (look for __alloc(lua_State *l) in
lua_factory.cc and exec(lua_State *l) in lua_exec.cc as starting points).

Basically, here is what you have to do (I leave the loading and setup of
the child program out):

- create new task
- create new thread
- create new IPC gate (needs to be done only once)
- map thread capability into new task
- map initial caps and IPC gate cap into new task
- setup pager and exception handler of the new task
- start the new thread

For some inspiration you can look at
libloader/include/remote_app_model::start_prog(). For ELF loading and
setup of the l4re kernel you should also consider using libloader's
infrastructure.

Matthias.

> 
> 
> 
> Have a nice day,
> 
> ba_f

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: dynamic reconfiguration

2016-08-11 Thread Matthias Lange
On 08/10/2016 04:31 PM, ba_f wrote:
> Am 2016-08-08 23:51, schrieb Adam Lackorzynski:
>> On Mon Aug 08, 2016 at 12:32:02 +0200, ba_f wrote:
>>> Am 2016-08-05 15:08, schrieb Matthias Lange:
>>>> Hi,
>>>> 
>>>> On 08/04/2016 03:05 PM, ba_f wrote:
>>>>> But, is it also possible to do some configuration during 
>>>>> run-time
[...]

> Ok, I see it's not possible. But, maybe I can take the chance for a 
> deeper understanding.
> 
> This is how I understand things, now. Please, correct me if I'm 
> wrong:
> 
> 1.) Moe starts first, followed by Ned.

Ned is started by moe.

> 2.) Ned parses lua.cfg and, on 'new_channel()' it creates a new
> IPC-Gate with l4_msgtag_t l4_factory_create_gate( l4_cap_idx_t
> factory, l4_cap_idx_t target_cap, l4_cap_idx_t thread_cap,
> l4_umword_t label).

Yes, this is done via the Lua bindings (see ned.lua).

> 3.) The IPC-Gate is a Kernel-Object and thus stored into the Kernel.
> (Does Moe help here?)

No, moe is not involved here.

> 'thread_cap' is stored/pushed into the servers
> capability table and 'target_cap' is for the client task, aren't 
> they?

'target_cap' is mapped with the appropriate rights into the new task's
capability table. That means it can be mapped with server rights into
the server task and with read/write rights into the client task.
'thread_cap' is not used.

> 4.) With l4re_env_get_cap() client & server look for a matching
> capability in their own cap-tables.

Yes. Client and server use their local name to lookup the capability.

> If I got it right, any Task can create an IPC-Gate at run-time and 
> thus create child tasks with ipc-server or ipc-client capabilities, 
> don't they?

That depends on the task's factory but the general answer is yes.

Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: HW access

2016-08-09 Thread Matthias Lange
On 08/09/2016 04:44 PM, ba_f wrote:
> Am 2016-08-09 15:19, schrieb Matthias Lange:
>> Hi,
>>
>> On 08/09/2016 02:35 PM, ba_f wrote:
>>> Hello,
>>>
>>>
>>> due to sloppy documentation I need help from mailing-list, again.
>>
>> We are constantly seeking to improve our documentation. What exactly did
>> you find sloppy or misleading?
>>
>>
>>> Well, mine looks like this:
>>>
>>> -- vim:ft=lua:
>>> Io.Dt.add_children(Io.system_bus(), function()
>>>   RNG = Io.Hw.Device(function()
>>> compatible = {"dev-rng,mmio", "dev-rng"};
>>> Property.hid  = "dev-rng, RNG_0";
>>> Resource.regs = Io.Res.mmio(0x43c0, 0x43c0);
>>>   end);
>>> end);
>>>
>>> Io.add_vbusses
>>> {
>>> rng_server = Io.Vi.System_bus(function ()
>>> dev = wrap(Io.system_bus():match("RNG"));
>>
>> The match() function takes a string as an argument and compares it with
>> the list of CIDs. As your device tree does not contain a device with a
>> HID or CID matching "RNG", no device is added to the 'rng_server' vbus.
>>
>> The solution is to supply a string from either the compatible table or
>> the hid property of the device(s) you want to match.
>>
>> Btw, by adding a few '-v' options to io's cmdline you can make io more
>> verbose to e.g. print the whole device tree or vbus trees.
>>
>> Matthias.
>>
>  
> Great, all L4Re-Apps boot now.
> 
> But, there's still something wrong.
> Here's my code to access HW:
> 
> 
>   printf("io_request...");
>   long ret = l4io_request_iomem( 0x43c0, 4, L4IO_MEM_NONCACHED,
> baseaddr);

Did you initialize 'baseaddr' to NULL?

A few more recommendations. It is usually bad practice to use hard-coded
device addresses. If you like the convinience of libio-io you can use
l4io_lookup_device() to get a device handle which you can use to iterate
the device resources with l4vbus_get_resource().

Matthias.

>   printf("done!\n");
> 
>   if (ret != 0){
> return -1;
>   }
> 
>   l4_uint32_t rng = *baseaddr; // ERR comes here
> 
> 
> When accessing *baseaddr, there's an Error.
> This code used to work with an older snapshot...
> 
> RNG| Hi, this is RNG server.
> RNG| io_request...done!
> RNG| L4Re[rm]: mapping for page fault failed with error -34 at
> 0x9000 pc=0x1000280
> RNG| L4Re: unhandled exception: pc=0x1000280 (pfa=9000)
> RNG| L4Re: Global::l4re_aux->ldr_flags=0
> 
> 
> So, is this the correct way to access a certain HW-Address?
> 
> 
> 
> Thanks,
> 
> ba_f
> 
> 
>>> (Not sure if I really need 'compatible and 'Property.hid', here..?)
>>>
>>> Anyway, all I see is output from IO but, no other L4Re-App seems to
>>> start.
>>> IO  | Io service
>>> IO  | Ready. Waiting for request.
>>>
>>> Anybody already spot the fault?
>>>
>>> May I still use l4io_request_iomem() to access the HW or, did things
>>> change here, too?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> ba_f
>>>
>>> ___
>>> l4-hackers mailing list
>>> l4-hackers@os.inf.tu-dresden.de
>>> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: HW access

2016-08-09 Thread Matthias Lange
Hi,

On 08/09/2016 02:35 PM, ba_f wrote:
> Hello,
> 
> 
> due to sloppy documentation I need help from mailing-list, again.

We are constantly seeking to improve our documentation. What exactly did
you find sloppy or misleading?

> I want to access Hardware (HW) from a L4re-App.
> 
> Actually, I already did this with the old IO-config style.
> I described the HW in *.devs and *.io file and then I was accessing the
> HW, directly with l4io_request_iomem(ADDR, 4, L4IO_MEM_NONCACHED,
> );
> 
> With the new functions() style IO-config anything is described in a
> single *.io, right?

That is possible but not neccessary. You can still split io's
configuration into multiple files.

> Well, mine looks like this:
> 
> -- vim:ft=lua:
> Io.Dt.add_children(Io.system_bus(), function()
>   RNG = Io.Hw.Device(function()
> compatible = {"dev-rng,mmio", "dev-rng"};
> Property.hid  = "dev-rng, RNG_0";
> Resource.regs = Io.Res.mmio(0x43c0, 0x43c0);
>   end);
> end);
> 
> Io.add_vbusses
> {
> rng_server = Io.Vi.System_bus(function ()
> dev = wrap(Io.system_bus():match("RNG"));

The match() function takes a string as an argument and compares it with
the list of CIDs. As your device tree does not contain a device with a
HID or CID matching "RNG", no device is added to the 'rng_server' vbus.

The solution is to supply a string from either the compatible table or
the hid property of the device(s) you want to match.

Btw, by adding a few '-v' options to io's cmdline you can make io more
verbose to e.g. print the whole device tree or vbus trees.

Matthias.

>   end);
> }
> 
> (Not sure if I really need 'compatible and 'Property.hid', here..?)
> 
> Anyway, all I see is output from IO but, no other L4Re-App seems to start.
> IO  | Io service
> IO  | Ready. Waiting for request.
> 
> Anybody already spot the fault?
> 
> May I still use l4io_request_iomem() to access the HW or, did things
> change here, too?
> 
> 
> 
> Thanks,
> 
> ba_f
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49-351-41 888 614

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: dynamic reconfiguration

2016-08-05 Thread Matthias Lange
Hi,

On 08/04/2016 03:05 PM, ba_f wrote:
> Hello L4-Hackers,
> 
> 
> can you tell me, what are the capabilities of Fiasco.OC when it comes to
> 'dynamic reconfiguration'?
> 
> As far as I know, (almost) all the configurations is made in conf.cfg
> and hw.io, right?
> 
> But, is it also possible to do some configuration during run-time i.e.
> dynamic reconfiguration?
> Here are two examples I can think of:

Well, it depends ...

> - IPC-Channels: Instead of defining Server and its Clients in conf.cfg
> statically, is it possible to create IPC-Channel during run-time? Let's
> say, I have a L4re-App in conf.cfg defined as IPC-Server but, no
> Clients, yet. Now, may any L4re-App create a IPC-Channel by itself and
> such link to that IPC-Server?

The answer is 'Yes.' and 'No'. The answer to the first question is that
this is exactly what ned is doing. Ned creates an IPC gate object and
maps it into the tasks as specified in the provided Lua configuration.

The second is not possible for multiple reasons. The first one is, that
the server side already needs the IPC gate object to bind its server
loop to. Another task has no means to "lookup" the existing IPC gate
object. In fact that's the idea behind a capability system.

> - New Tasks: Is a L4re-App able to create a new task? I.e. push a thread
> into its own address-space? The new task would require some access
> rights, too.

Yes. Ned and L4Linux are just two examples doing this.

Best,
Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4linux IPC communication with L4re application

2016-03-15 Thread Matthias Lange
Hi,

On 03/15/2016 05:20 PM, ba_f wrote:
> Am 2016-03-10 00:36, schrieb Adam Lackorzynski:
>> On Tue Mar 08, 2016 at 17:05:05 +0100, Ahmed Makkawi wrote:
>>> I think the solution to the communication of an application on
>>> l4linux with
>>> an application on l4re would be to implement an ipc stream in the
>>> character
>>> device module in the l4linux kernel to communicate with the IPC
>>> stream on
>>> l4re application.
>>> the Problem now is l4linux modules are in C and the l4re application
>>> is in
>>> C++, is this a good idea to start searching in it or its a dead end and
>>> maybe someone would have a better idea to work on ?
>>
>> That's one way of doing it, and yes, one needs to bridge from the Linux
>> driver to the L4Re world. There are several examples in L4Linux where
>> Linux drivers use L4 IPC to communicate with L4Re services. Most L4Re
>> services also have a C interface, exactly for the reason that they can
>> be used by C code. Doing such a C variant is reasonably easy, look for
>> example in pkg/l4re-core/l4re_c for how it is done. For Linux drivers,
>> any under drivers/ directory with 'l4' in the file name should provide
>> insights how it is used.
>>
>>
>>
>> Adam
> 
> 
> Hi Adam,
> 
> 
> i struggling on the same problem.
> And i guess we'd prefer a clean C solution instead of mixing C++ in the
> Linux driver.
> 
> As mentioned in an earlier post [1] i looked at several IPC examples in
> src/l4/pkg/examples written in C.
> I tried to adopt this, but failed (see earlier post).
> 
> Is it even possible to use that L4re-App IPC C-Code in a L4Linux driver?

Yes. See for example drivers/tty/serial/l4ser.c and the usage of
l4_vcon_write

> You also mentioned L4XV_FN* wrappers.
> What are they for and when to use them?

This macro wraps a semaphore around the IPC call. Otherwise multiple
concurrent function calls may mess up the UTCB.

> Anyway, i've looked up all l4linux/drivers with 'l4' in its name but,
> haven't found a proper example.
> Can you please point a concrete example, where an L4Linux-Driver acts as
> a Client to an L4re-Server?

l4ser.c and l4fb.c. Both drivers use L4Re APIs to communicate with L4Re
services.

Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Running the Bro IDS on an ARMv7 board.

2016-03-02 Thread Matthias Lange
Hi,

On 03/02/2016 03:09 PM, Mahdi Aichouch wrote:
> Hello Adam,
> 
> Thank very much for your answer.
> 

[snip]

> However, I remarked that the syntax in the Lua configuration files for
> Input-Output devices have been
> changed in the last L4Re version.
> 
> Could you please help me to adapt my old configurations files to the new
> L4Re Lua syntax.
> Below are my configurations files:

Have you had a look into io's documentation [1]? There you can find a
description of how to define devices and how to assign them to virtual
busses.

Best,
Matthias.

[1] http://l4re.org/doc/io.html

> 
> Thank you very much in advance.
> 
> Best regards,
> Mahdi
> 
> 
> ===
> l4lx.cfg
> ===
> 
> -- vim:set ft=lua:
> 
> local lxname = "vmlinuz";
> if L4.Info.arch() == "arm" then
>   lxname = "vmlinuz.arm";
> end
> 
> loader   = L4.default_loader;
> vbus_l4linux = loader:new_channel();
> 
> local shmns  = L4.default_loader:create_namespace({ shm = "something" });
> local cons   = L4.default_loader:new_channel();
> 
> 
> L4.default_loader:start(
>   {
> caps = { cons = cons:svr() }, log = L4.Env.log,
>   },
>   "rom/cons -k -a");
> 
> L4.default_loader.log_fab = cons;
> 
> 
> loader:start(
> {
>   ldr_flags = L4.Ldr_flags.pinned_segs+L4.Ldr_flags.eager_map,
>   caps = {
>sigma0  = L4.cast(L4.Proto.Factory,
> L4.Env.sigma0):create(L4.Proto.Sigma0);
>icu = L4.Env.icu;
>l4linux = vbus_l4linux:svr();
>  },
> 
>   log = { "IO", "y" },
>   l4re_dbg = L4.Dbg.Warn,
> }, "rom/io -vvv rom/arm-imx6.io ");
> 
> 
> L4.default_loader:start(
> {
>   ldr_flags = L4.Ldr_flags.pinned_segs+L4.Ldr_flags.eager_map,
>   caps = {
> vbus = vbus_l4linux;
> --  log  = L4.Env.log:m("rws"),
> shmns = shmns:mode("rw")
>   },
> 
>   l4re_dbg = L4.Dbg.Warn,
>   log = { "l4linux", "yellow", "key=1" },
> }, "rom/" .. lxname .. " mem=512M l4memtype=pinned,continuous
> console=ttyLv0 l4x_rd=rom/ramdisk-4-" .. L4.Info.arch() .. ".rd root=1:0
> ramdisk_size=200704 rw init=/bin/sh earlyprintk=1 showpfexc=1 showghos\
> t=1 print-fatal-signals=1 l4shmnet.add=shmns,macpart=1");
> 
> 
> =
> arm-imx6.io 
> =
> 
> hw-root
> {
>   NIC => new Device()
>   {
> .hid = "imx6q-fec.0";
> new-res Mmio(0x02188000 .. 0x0218BFFF);
> new-res Irq(150);
> new-res Irq(151);
>   }
> 
>   DMAMEM => new Device()
>   {
>.hid = "dmamem";
>new-res Mmio_ram(0x8, 0);
>   }
> }
> 
> l4linux => new System_bus()
> {
> #NIC => wrap(hw-root.NIC);
>   "imx6q-fec.dev" => wrap(hw-root.NIC);
>   "dmamem" => wrap(hw-root.DMAMEM);
> }
> 
> 
> 
> 
> 
> On Mon, Feb 29, 2016 at 1:34 PM, Mahdi Aichouch  > wrote:
> 
> Hello,
> 
> I tried to run the Bro IDS on top of L4Linux and L4 Fiasco, on a
> Freescale i.MX6 ARM cortex A9.
> 
> Starting the Bro program produces an unrecoverable error and make
> the L4 Fiasco enter an endless loop as shown below : 
> 
> Does anyone was able to run the Bro IDS on top of L4Linux on a ARMv7
> board.
> 
> Does someone has idea of how to track down the problem.
> 
> Thank you very much in advance.
> 
> Best regards,
> Mahdi
> 
> 
> /home # ./bro
> warning in /home/scripts/base/init-bare.bro, line 1: problem
> initializing NB-DNS: connect(0.0.0.0): Invalid argument
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> /src/kernel/fiasco/src/kern/arm/thread-arm.cpp:56:
> ASSERTION FAILED (r->check_valid_user_psr())
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> /src/kernel/fiasco/src/kern/arm/thread-arm.cpp:56:
> ASSERTION FAILED (r->check_valid_user_psr())
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> /src/kernel/fiasco/src/kern/arm/thread-arm.cpp:56:
> ASSERTION FAILED (r->check_valid_user_psr())
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> /src/kernel/fiasco/src/kern/arm/thread-arm.cpp:56:
> ASSERTION FAILED (r->check_valid_user_psr())
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> /src/kernel/fiasco/src/kern/arm/thread-arm.cpp:56:
> ASSERTION FAILED (r->check_valid_user_psr())
> 
> KERNEL: Warning: No page-fault handler for 0xffdc, error
> 0x9400084f, pc 0200ac80
> /home/aichouch/dev/secure-hyp/l4re-snapshot-2014092821
> 

Re: Compiling GPIO drivers for L4Linux

2016-02-23 Thread Matthias Lange
Hi,

On 02/23/2016 04:45 PM, Nourhan Mohamed wrote:
> Dear all,
> Unlike the normal Linux (version 4.3.0) kernel configuration, when
> compiling the L4Linux (same version) kernel I couldn't find an option to
> enable GPIO or choose a driver for the architecture I am building upon
> (Since I am compiling for ARM, Versatile Express Cortex-A15 board over
> qemu). Is there an option to enable gpio for l4linux? I even tried
> modifying something in the gpio driver src in l4linux and when I
> re-compiled, it never detected any changes.

I suppose you plan to directly pass-through the GPIO device to L4Linux?
In that case you have to grant L4Linux access to the MMIO regions
related to the GPIO device. This has to be done in io's configuration
file. The second step is to pass L4Linux a matching device tree where
the resources of the GPIO device are declared.

Best,
Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Running L4linux as a server

2016-02-05 Thread Matthias Lange
Hi,

On 02/04/2016 04:03 PM, Ahmed Makkawi wrote:
> Hi all,
> 
> in the L4Linux menuconfig, there is an option saying :
> 
> [ ] make linux be a server
> 
> Could someone explain to me what this feature does exactly ?

This means that L4Linux offers an L4Re interface to provide services to
other L4Re clients. One example is the input server where L4Linux drives
USB input devices and sends the input events to an L4Re event server,
e.g. mag.

Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Device drivers and board support files

2016-01-27 Thread Matthias Lange
Hi,

On 01/26/2016 02:34 PM, Paul Boddie wrote:
> Hello again,
> 
> Emboldened by my recent modest success, and taking a look at the previously-
> mentioned MIP32 port of Fiasco.OC and L4Re [*], which doesn't really seem to 
> have any community involved with it, I wondered whether there might be some 
> general documentation about adding board support files to Fiasco.OC as well 
> as 
> writing drivers for L4Re.
> 
> [*] https://github.com/MIPS/fiasco-l4re
> 
> I've browsed around the L4Re site and have even looked at the TU Dresden 
> teaching resources, but there appears to be a lot of slideshows and not so 
> much in the way of concise guidance on such topics. Are there any documents 
> out there that cover writing the actual code involved?

If you are thinking of something like the "Linux Device Drivers" book
there is no such document. Have you had a look into the L4Re
documentation [1], specifically into io's overview? Maybe this clarifies
some of the concepts involved.

[1] http://l4re.org/doc/io.html

> With regard to board support, I get the feeling that I could possibly get 
> away 
> with something rather similar to other MIPS-based boards, and if I'm 
> launching 
> Fiasco.OC from U-Boot, I might not even need to do the basic board setup 
> tasks 
> (which include things like setting up the DRAM on the SoC concerned). 
> However, 
> I suspect that I would have to look into things like interrupt controllers 
> for 
> the various timers that I suppose must be needed by the kernel.
> 
> As for driver support, I noticed a previous message that gives an outline of 
> what should be done:
> 
> http://os.inf.tu-dresden.de/pipermail/l4-hackers/2015/007475.html
> 
> Here, to be more specific, I imagine that the following things would be 
> affected:
> 
> 1. src/l4/pkg/io/config/.devs would need populating with Device 
> definitions employing those Mmio declarations

The device definition doesn't necessarily has to live there. You can
spread device definitions into multiple files and pass the files via
io's cmdline to io.

> 2. src/l4/pkg/io/config/vbus-config.vbus might need changing, perhaps to 
> allow 
> devices to match some bus identifier or other, although I don't completely 
> follow this (I'm guessing that my driver should obtain a device reference via 
> the vbus mechanism)

Please refer to [1] to understand the concepts of a vbus.

> 3. looking at the src/l4/pkg/drivers/lcd/src/lcd-omap3.c driver, which 
> probably references devices in src/l4/pkg/io/io/config/plat-
> beagleboard/hw_devices.io, I see that the driver actually obtains a reference 
> to the "dss" device using l4io_lookup_device, whereas the GPIO and I2C 
> devices 
> are obtained using l4vbus_get_device_by_hid, but I'm guessing that there is a 
> distinction between specific and generic devices here

The code isn't as clean as it should be. The problem is, that you have
to match a device with a device driver. So the driver probes certain
properties of the device i.e. the HID. The HID is a very specific
property and as a rule of thumb a device driver should start probing
from generic to more specific properties. In the device definition you
can add multiple compatible ids and by using l4vbus_is_compatible() you
can check whether your device driver matches a particular device.

> 4. in src/l4/pkg/drivers/.../.c the l4io_request_iomem call would 
> employ the same physical addresses as those mentioned in (1) to access the 
> device memory regions

Yes, it maps the MMIO region into the device drivers address space. You
access the MMIO registers via the mapped (virtual) address in your driver.

> I did start looking at the existing LCD drivers, this being something that 
> I've managed to get to work with bare-metal code on the board concerned, and 
> I 
> noticed that drivers/lcd seems to mention "arm" a lot, but would I be right 
> in 
> assuming that none of that code is actually ARM-specific?

That's because of historical reasons. You know, names are just ... names.

Best,
Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Setting up network in L4Linux

2016-01-22 Thread Matthias Lange
Hi,

On 01/21/2016 03:02 PM, Nourhan Mohamed wrote:
> Dear Mattias,
> 
> Thanks for helping out. But I still don't get where should I add the
> .dtb compiled file? and how would I manage to access it through L4Linux?

You need to add the  file to your entry in the modules.list.
In your Lua configuration where you start L4Linux you need to add
another Linux kernel cmdline parameter like

  l4x_dtb=rom/

Then L4Linux should find and use the device tree.

Matthias.

> 
> BR,
> Nourhan
> 
> On Wed, Jan 20, 2016 at 6:48 PM, Matthias Lange
> <matthias.la...@kernkonzept.com <mailto:matthias.la...@kernkonzept.com>>
> wrote:
> 
> Hi,
> 
> are you using a device tree yet? In order for the driver matching to
> work in (L4)Linux somebody must tell Linux about the available devices.
> On ARM this can be done by either declaring a platform device statically
> or by using a device tree. So you have to enable "Flattened device tree
> support" in L4Linux and provide a simple device tree. See
> arch/l4/boot/dts/simple.dts for an example. And do not forget to compile
> the *.dts into a *.dtb file using 'dtc'. The name of the device tree
> file is provided on L4Linux' cmdline using "l4x_dtb=".
> 
> Matthias.
> 
> On 01/20/2016 06:22 PM, Nourhan Mohamed wrote:
> > I have been trying to configure *L4Linux *to connect to the internet
> > through *L4Re/Fiasco.OC*. I am using *qemu *on a *Versatile Express*
> > Machine with *Cortex-A15* cpu. Below is my current configuration:
> >
> > *L4re-snapsot:* l4re-snapshot-2015123115
> >
> > *obj/l4/arm-ca/conf/Makeconf.boot:*
> > 
> MODULE_SEARCH_PATH=/home/nour/l4re/obj/fiasco/arm-mp-rv-a9-vexpress:/home/nour/l4re/obj/l4linux/arm-mp:/home/nour/l4re/files:/home/nour/l4re/files/cfg:/home/nour/l4re/src/l4/conf:/home/nour/l4re/src/l4/conf/examples
> > QEMU_OPTIONS += -M vexpress-a15 -cpu cortex-a15 -smp 4
> > QEMU_OPTIONS += -m 256 -serial stdio
> > QEMU_OPTIONS += -net nic,model=lan9118 -net user
> > PLATFORM_TYPE := rv_vexpress
> >
> > *l4re/files/cfg/arm-rv.devs:*
> > -- vim:set ft=lua:
> >
> > local Res = Io.Res
> > local Hw = Io.Hw
> >
> > Io.hw_add_devices(function()
> >   NIC = Hw.Device(function()
> > Property.hid = "smc91x";
> > compatible = {"smsc,lan9118"};
> > Resource.regs = Res.mmio(0x1003, 0x10030fff);
> > Resource.irq = Res.irq(60);
> >   end);
> >
> >   virtio_mmio3 = Hw.Device(function()
> > compatible = {"virtio,mmio"};
> > Resource.mem = Res.mmio(0x10013600, 0x100137ff);
> > Resource.irq = Res.irq(75);
> >   end);
> >
> >   CTRL = Hw.Device(function()
> > Property.hid = "System Control";
> > Resource.regs = Res.mmio(0x1000, 0x1fff);
> >   end);
> >
> >   clcd = Hw.Device(function()
> > Property.hid = "AMBA PL110";
> > compatible = {"arm,pl111","arm,primecell"};
> > Resource.regs = Res.mmio(0x1002, 0x10020fff);
> >   end);
> >
> >   kmi0 = Hw.Device(function()
> > compatible = {"arm,pl050","arm,primecell"};
> > Resource.regs = Res.mmio(0x10006000, 0x10006fff);
> > Resource.irq = Res.irq(44);
> >   end);
> >
> >   kmi1 = Hw.Device(function()
> > compatible = {"arm,pl050","arm,primecell"};
> > Resource.regs = Res.mmio(0x10007000, 0x10007fff);
> > Resource.irq = Res.irq(45);
> >   end);
> > end)
> >
> > *src/l4/conf/examples/l4lx-vbus.io <http://l4lx-vbus.io>
> <http://l4lx-vbus.io>:*
> > local hw = Io.system_bus();
> >
> > Io.add_vbus("l4linux", Io.Vi.System_bus
> > {
> >   NIC = wrap(hw:match("smsc,lan9118"));
> > })
> >
> > src/l4/conf/examples/l4lx-net.cfg:
> > -- vim:set ft=lua:
> >
> > local L4 = require("L4");
> > local lxname = "vmlinuz";
> >
> > loader = L4.default_loader;
> >
> > vbus_l4linux = loader:new_channel();
> > local shmns = loader:create_namespace({shm = "ipctest"});
> >
> > local cons = L4.default_loader:new_channel();
> > L4.default_loader:start(
> >   { caps

Re: Setting up network in L4Linux

2016-01-20 Thread Matthias Lange
Hi,

are you using a device tree yet? In order for the driver matching to
work in (L4)Linux somebody must tell Linux about the available devices.
On ARM this can be done by either declaring a platform device statically
or by using a device tree. So you have to enable "Flattened device tree
support" in L4Linux and provide a simple device tree. See
arch/l4/boot/dts/simple.dts for an example. And do not forget to compile
the *.dts into a *.dtb file using 'dtc'. The name of the device tree
file is provided on L4Linux' cmdline using "l4x_dtb=".

Matthias.

On 01/20/2016 06:22 PM, Nourhan Mohamed wrote:
> I have been trying to configure *L4Linux *to connect to the internet
> through *L4Re/Fiasco.OC*. I am using *qemu *on a *Versatile Express*
> Machine with *Cortex-A15* cpu. Below is my current configuration:
> 
> *L4re-snapsot:* l4re-snapshot-2015123115
> 
> *obj/l4/arm-ca/conf/Makeconf.boot:*
> MODULE_SEARCH_PATH=/home/nour/l4re/obj/fiasco/arm-mp-rv-a9-vexpress:/home/nour/l4re/obj/l4linux/arm-mp:/home/nour/l4re/files:/home/nour/l4re/files/cfg:/home/nour/l4re/src/l4/conf:/home/nour/l4re/src/l4/conf/examples
> QEMU_OPTIONS += -M vexpress-a15 -cpu cortex-a15 -smp 4
> QEMU_OPTIONS += -m 256 -serial stdio
> QEMU_OPTIONS += -net nic,model=lan9118 -net user
> PLATFORM_TYPE := rv_vexpress
> 
> *l4re/files/cfg/arm-rv.devs:*
> -- vim:set ft=lua:
> 
> local Res = Io.Res
> local Hw = Io.Hw
> 
> Io.hw_add_devices(function()
>   NIC = Hw.Device(function()
> Property.hid = "smc91x";
> compatible = {"smsc,lan9118"};
> Resource.regs = Res.mmio(0x1003, 0x10030fff);
> Resource.irq = Res.irq(60);
>   end);
> 
>   virtio_mmio3 = Hw.Device(function()
> compatible = {"virtio,mmio"};
> Resource.mem = Res.mmio(0x10013600, 0x100137ff);
> Resource.irq = Res.irq(75);
>   end);
> 
>   CTRL = Hw.Device(function()
> Property.hid = "System Control";
> Resource.regs = Res.mmio(0x1000, 0x1fff);
>   end);
> 
>   clcd = Hw.Device(function()
> Property.hid = "AMBA PL110";
> compatible = {"arm,pl111","arm,primecell"};
> Resource.regs = Res.mmio(0x1002, 0x10020fff);
>   end);
> 
>   kmi0 = Hw.Device(function()
> compatible = {"arm,pl050","arm,primecell"};
> Resource.regs = Res.mmio(0x10006000, 0x10006fff);
> Resource.irq = Res.irq(44);
>   end);
> 
>   kmi1 = Hw.Device(function()
> compatible = {"arm,pl050","arm,primecell"};
> Resource.regs = Res.mmio(0x10007000, 0x10007fff);
> Resource.irq = Res.irq(45);
>   end);
> end)
> 
> *src/l4/conf/examples/l4lx-vbus.io :*
> local hw = Io.system_bus();
> 
> Io.add_vbus("l4linux", Io.Vi.System_bus
> {
>   NIC = wrap(hw:match("smsc,lan9118"));
> })
> 
> src/l4/conf/examples/l4lx-net.cfg:
> -- vim:set ft=lua:
> 
> local L4 = require("L4");
> local lxname = "vmlinuz";
> 
> loader = L4.default_loader;
> 
> vbus_l4linux = loader:new_channel();
> local shmns = loader:create_namespace({shm = "ipctest"});
> 
> local cons = L4.default_loader:new_channel();
> L4.default_loader:start(
>   { caps = { cons = cons:svr() },
>   log = L4.Env.log, },
>   "rom/cons -k -a"
>   );
> 
> L4.default_loader.log_fab = cons;
> 
> loader:start(
>   { caps = {
>   sigma0  =
> L4.cast(L4.Proto.Factory,L4.Env.sigma0):create(L4.Proto.Sigma0);
>   icu = L4.Env.icu;
>   l4linux = vbus_l4linux:svr();
>  },
>  log = {"IO", "magenta"},
>   }, "rom/io -vvv rom/arm-ve.devs rom/l4lx-vbus.io ");
> 
> loader:start(
>   { caps = {
>   shmns = shmns:mode("rw"),
>   vbus = vbus_l4linux;
> },
> l4re_dbg = L4.Dbg.Warn,
> log = {"l4linux", "cyan", "key=1"},
>   },
> "rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" .. 
> L4.Info.arch() .. ".rd root=1:0 rw ramdisk_size=4000
> l4shmnet.add=shmns,macpart=1");
> 
> *src/l4/conf/modules.list:*
> entry L4Linux-net
> roottask moe rom/l4lx-net.cfg
> module l4lx-net.cfg
> module l4re
> module ned
> module io
> module cons
> module l4lx-vbus.io 
> module arm-ve.devs
> module vmlinuz
> module[perl] "ramdisk-$ENV{ARCH}.rd"
> 
> *Run:*
> L4 Bootstrapper
>   Build: #4 Mi 20. Jan 18:13:56 CET 2016, 4.7.3
>   Scanning up to 256 MB RAM, starting at offset 32MB
>   Memory size is 256MB (8000 - 8fff)
>   RAM: 8000 - 8fff: 262144kB
>   Total RAM: 256MB
>   Scanning fiasco
>   Scanning sigma0
>   Scanning moe
>   Moving up to 13 modules behind 8110
>   moving module 02 { 81a7c000-81aad49f } -> { 81b6c000-81b9d49f } [201888]
>   moving module 01 { 81a6a000-81a7b33b } -> { 81b5a000-81b6b33b } [70460]
>   moving module 00 { 819d8000-81a69ebb } -> { 81ac8000-81b59ebb } [597692]
>   moving module 12 { 816d8000-819d7fff } -> { 817c8000-81ac7fff } [3145728]
>   moving module 11 { 81256000-816d747b } -> { 81346000-817c747b } [4723836]
>   moving module 10 { 81255000-81255446 } -> { 81345000-81345446 } [1095]
>   moving module 09 { 81254000-8125415d } -> { 81344000-8134415d } [350]
>   

Re: How can I get L4linux 3.10 code?

2016-01-19 Thread Matthias Lange
Hi,

On 01/19/2016 05:07 AM, liu.xiaodo...@zte.com.cn wrote:
> Hi,
> 
> I want to use L4linux 3.10. I see that L4linux 3.10 is available
> now from https://l4linux.org/, but I can't find any other
> download-website except L4linux 4.3.
> Is there some place I can get the older version(3.10) of the
> L4linux?

It's revision r39 in the L4Linux repository. See [1] on how to download
the repository. Be beware of, that you also need the corresponding
Fiasco and L4Re revisions (from August 2013). L4Linux 3.10 will not work
with the current snapshot versions.

Matthias.

[1] https://l4linux.org/download.shtml

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Application on top of L4re

2015-10-27 Thread Matthias Lange
On 10/26/2015 03:43 PM, Yuxin Ren wrote:
> Thank you for your reply.
> 
> L4Linux is a good example. But it is more system than application.
> In addition to L4Linux, is there any other application? network
> application, multi media, real-time or embedded application?.

What do you mean by "more system than application"? I think L4Linux is
actually a quite good example as it covers and exercises most of L4Re's
functionality.

If you mind to share what you consider a "real" application and what you
are trying to accomplish, maybe we can steer you towards a more fitting
example.

Matthias.

> 
> Thank you.
> Yuxin
> 
> On Mon, Oct 26, 2015 at 3:04 AM, Matthias Lange
> <matthias.la...@kernkonzept.com> wrote:
>> Hi,
>>
>> On 10/26/2015 01:55 AM, Yuxin Ren wrote:
>>> Hi,
>>>
>>> Are there any relative complex and non-trivial applications on top of
>>> Fiasco and l4Re?
>>> If so, where can I get the source code?
>>
>> The question is, what do you mean with "application"? L4Linux is a
>> non-trivial application on top of L4Re. You can find it here [1].
>>
>> Matthias
>>
>> [1] http://l4linux.org/download.shtml
>>
>>> Thanks a lot.
>>> Yuxin

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Sharing one ethernet network device between two L4Linux instances

2015-10-22 Thread Matthias Lange
Hi,

On 10/21/2015 02:34 PM, Mahdi Aichouch wrote:
> Hello,
> 
> I was able to run two L4linux instances on top of L4 Fiasco OC using a
> Qemu emulator of a versatile express-a9 board .
> 
> I would like to make these two instances share one ethernet network device.

To share a device you need a multiplexer which has access to the
physical device (and drives it) and provide a virtual device for each of
the clients. One possible solution would be to grant one L4Linux
instance access to the physical device and setup a virtual network
connection between the two instances. Then you can e.g. use iptables to
setup forwarding and NAT to route traffic from the second instance.

> I would like also to switch between the two L4Linux shell, because in
> Qemu only one shell is accessible.

For that you can use 'cons' our console multiplexer.

> I followed this guide[1] to connect two L4Linux instances using
> "l4shmnet", and this thread [2]
> to get access to the shell when testing on Qemu.
> 
> However, the "l4shmnet" is not working correctly, both L4Linux display
> this message:

Maybe this is a memory issue? You assign 1GB to the machine but only
hand 64M to L4Linux (of which 32M are taken by the ramdisk).

Matthias

> shmns: Requesting, Shmsize 1024 Kbytes
> shmns: Failed to establish communication
>  
> Could someone help me building such a working configuration.
> 
> Is it possible to share a working Qemu command with the right option for
> the network?
> This is my Qemu command
> 
> $> qemu-system-arm -cpu cortex-a9 -M vexpress-a9 -smp 1 -no-reboot -m
> 1024M -kernel bin/arm_armv7a/bootstrap_L4Linux_ARM.elf -nographic -net
> nic,model=lan9118 -net user
> 
> Is it also possible to share a working lua configuration file?
> 
> This is my lua l4lx.cfg file:
> 
> -- vim:set ft=lua:
> 
> local lxname = "vmlinuz";
> if L4.Info.arch() == "arm" then
>   lxname = "vmlinuz.arm";
> end
> 
> local shmns = L4.default_loader:create_namespace({ shm = "placeholder" });
> 
> L4.default_loader:start(
>   {
> { ldr_flags = L4.Ldr_flags.eager_map },
> caps = {
>   log = L4.Env.log:m("rws"),
> },
> l4re_dbg = L4.Dbg.Warn,
> log = { "l4linux", "yellow" },
> 
> shmns = shmns:mode("rw"),
>   },
>   "rom/" .. lxname .. " earlyprintk=1 showpfexc=1 showghost=1 mem=64M
> l4shmnet.add=shmns,macpart=1,create console=ttyLv0 l4x_rd=rom/ramdisk-"
> ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=32768 init=/li\
> nuxrc print-fatal-signals=1");
> 
> L4.default_loader:start(
>   {
> { ldr_flags = L4.Ldr_flags.eager_map },
> caps = {
>   log = L4.Env.log:m("rws"),
> },
> l4re_dbg = L4.Dbg.Warn,
> log = { "l4linux2", "green" },
> 
> shmns = shmns:mode("rw"),
>   },
>   "rom/" .. lxname .. " earlyprintk=1 showpfexc=1 showghost=1 mem=64M
> l4shmnet.add=shmns,macpart=2 console=ttyLv0 l4x_rd=rom/ramdisk-" .. 
> L4.Info.arch() .. ".rd root=1:0 ramdisk_size=32768 init=/linuxrc p\
> rint-fatal-signals=1");
> 
> 
> Thank you very much in advance.
> Best regards,
> 
> Mahdi
> 
> 
> [1] http://wiki.tudos.org/L4Linux/shmnet
> [2] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2013/005775.html

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: U-Boot version issue

2015-10-07 Thread Matthias Lange
Hi,

sorry, wrong mailing list. Try

  http://lists.denx.de/mailman/listinfo/u-boot

Matthias.

On 10/07/2015 06:59 PM, ba_f wrote:
> 
> Hello again,
> 
> 
> i have an issue with different U-Boot versions, and i have no clue
> what's the problem.
> Maybe someone's got an idea?
> 
> Working on Xilinx' ARM Platform i use U-Boot version
> u-boot-xlnx-xilinx-v14.6.01, and it's all good with that one and lower
> versions.
> But, using u-boot-xlnx-xilinx-v14.7 or higher results in serious CPU
> errors:
> 
> uboot> fatload mmc 0 0x00c0 bootstrap.uimage
> reading bootstrap.uimage
> 6139968 bytes read in 528 ms (11.1 MiB/s)
> uboot> go 0x0100
> ## Starting application at 0x0100 ...
> undefined instruction
> pc : [<0104>]   lr : [<3ff74bc0>]
> sp : 3fb51e08  ip : 2802 fp : 
> r10: 3fb572d8  r9 : 0002 r8 : 3fb51f40
> r7 : 3ffaff50  r6 : 0100 r5 : 3fb572dc  r4 : 0002
> r3 : 0100  r2 : 3fb572dc r1 : 3fb572dc  r0 : 0001
> Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
> Resetting CPU ...
> 
> 
> Unfortunately, the DIFF between v14.6 and v14.7 is 60'000 lines...
> 
> Is there any chance to fix that?
> 
> 
> 
> 
> Have nice day,
> 
> ba_f
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: make uimage error

2015-10-05 Thread Matthias Lange
On 10/02/2015 05:52 PM, Shabnam Engineer wrote:
> Hi Matthias
> thank you for your response to my question.
> That problem has been solved but I have a new problem :
> ***
> my command : 
> make uimage E="L4Linux ARM" 
> MODULE_SEARCH_PATH=/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/kernel/fiasco/mybuild/
> O=/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/
> 
> the massege :
> make[1]: Entering directory
> `/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4'
> Could not find 'l4lx.cfg' with path
> '/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/kernel/fiasco/mybuild/:/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/bin/arm_armv7a:/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/bin/arm_armv7a/l4f:/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/lib/arm_armv7a:/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/lib/arm_armv7a/l4f'
> 
>   Processing of
> /home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/conf/modules.list
> failed!
> 
> make[3]: *** No rule to make target `mod.make.inc', needed by
> `bootstrap.ld'.  Stop.
> make[2]: ***
> [/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/pkg/bootstrap/server/src/OBJ-arm_armv7a]
> Error 2
> make[1]: *** [uimage] Error 2
> make[1]: Leaving directory
> `/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4'
> make: *** [uimage] Error 2
>  
> ***
> 
> the l4lc.cfg file exists in this route :
> /home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/conf/examples

You have to add this path to MODULE_SEARCH_PATH. For your convenience
you can consider modifying your Makeconf.boot in

  ~/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/conf

and add your common directories there.

Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: make uimage error

2015-09-28 Thread Matthias Lange
Hi,

On 09/26/2015 10:28 PM, Shabnam Engineer wrote:
> Hi Adam,
> I built l4linux successfully and again I got this error :
> 
> **
> --->  my command :
> make uimage E="L4Linux ARM" 
> MODULE_SEARCH_PATH=/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/kernel/fiasco/mybuild/
> O=/home/shabnam/Desktop/snapshot/l4re-snapshot-2014092821/src/l4/builddir/

Where did you build L4Linux and where is 'vmlinuz.arm'? Add that path to
MODULE_SEARCH_PATH. Be aware that in your example above you actually
reset MODULE_SEARCH_PATH instead of extending it.

Matthias.

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: make error

2015-08-31 Thread Matthias Lange
Hi,

On 08/31/2015 09:10 AM, Shabnam Engineer wrote:
>  Hi l4-hackers,
> I want to build fiasco.OC for my rpi , but in "make" command I have
> faced this error :
> 
> **
> make: arm-linux-g++: Command not found

It looks like arm-linux-g++ is not in you $PATH. Add the path to your
arm-linux-* binaries to $PATH and you should be good to go.

Matthias.

> /bin/sh: 1: arm-linux-g++: not found
> /bin/sh: 1: arm-linux-g++: not found
> make: arm-linux-g++: Command not found
> make
> srcdir=/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/src
> objbase=/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild
> -f
> /home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/src/Makefile.sub1
> 
> make[1]: arm-linux-g++: Command not found
> make[1]: Entering directory
> `/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild'
> /bin/sh: 1: arm-linux-g++: not found
> /bin/sh: 1: arm-linux-g++: not found
> make[1]: arm-linux-g++: Command not found
> Checking compiler config... unchanged.
> /bin/sh: 1: arm-linux-ld: not found
> No known ld emulation found
> make[1]: *** [.Host-config] Error 1
> make[1]: Leaving directory
> `/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild'
> make: *** [create-sources] Error 2
> **
> and also in /bin/sh route we have the arm-linux-g++ file , and I attach
> the screenshots of this route .
> I don't know what to do .
> thank you for considering my question .
> regards,
> shabnam
> 
> 
> ___
> l4-hackers mailing list
> l4-hackers@os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: make error

2015-08-31 Thread Matthias Lange
On 08/31/2015 10:41 AM, Shabnam Engineer wrote:
> Hi matthias ,
> thanks for your answer .
> arm-linux-g++ is in the package of fiasco that I downloaded in the route
> of /bin/sh, now i must added it to my $path? how can add this to my $path ?

arm-linux-* from the snapshot is just a set of sym links pointing to
.arm-linux-SCRIPT. You have to adapt DEFAULT_GCC_PATH_PREFIX in that
script and point it to your locally installed cross compiler.

Matthias.

> Regards,
> Shabnam
> 
> 
> 
> On Monday, August 31, 2015 12:03 PM, Matthias Lange
> <matthias.la...@kernkonzept.com> wrote:
> 
> 
> Hi,
> 
> On 08/31/2015 09:10 AM, Shabnam Engineer wrote:
>>  Hi l4-hackers,
>> I want to build fiasco.OC for my rpi , but in "make" command I have
>> faced this error :
>>
>> **
>> make: arm-linux-g++: Command not found
> 
> It looks like arm-linux-g++ is not in you $PATH. Add the path to your
> arm-linux-* binaries to $PATH and you should be good to go.
> 
> Matthias.
> 
> 
>> /bin/sh: 1: arm-linux-g++: not found
>> /bin/sh: 1: arm-linux-g++: not found
>> make: arm-linux-g++: Command not found
>> make
>>
> srcdir=/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/src
>>
> objbase=/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild
>> -f
>>
> /home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/src/Makefile.sub1
>>
>> make[1]: arm-linux-g++: Command not found
>> make[1]: Entering directory
>>
> `/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild'
>> /bin/sh: 1: arm-linux-g++: not found
>> /bin/sh: 1: arm-linux-g++: not found
>> make[1]: arm-linux-g++: Command not found
>> Checking compiler config... unchanged.
>> /bin/sh: 1: arm-linux-ld: not found
>> No known ld emulation found
>> make[1]: *** [.Host-config] Error 1
>> make[1]: Leaving directory
>>
> `/home/shabnam/Desktop/fiasco1/l4re-core-2014092821/src/kernel/fiasco/mybuild'
>> make: *** [create-sources] Error 2
>>
> **
>> and also in /bin/sh route we have the arm-linux-g++ file , and I attach
>> the screenshots of this route .
>> I don't know what to do .
>> thank you for considering my question .
>> regards,
>> shabnam

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: porting linux driver in Fiasco.OC

2015-07-30 Thread Matthias Lange
Hi,

On 07/29/2015 12:29 PM, Shabnam Engineer wrote:
 hi 
 I have a question about porting linux drivers in Fiasco.OC.
 Can I port linux drivers into Fiasco.OC ?

In a microkernel system device drivers are implemented as isolated user
space components. No devices drivers, except from selected very low
level devices like timer and interrupt controller, are implemented in
the kernel.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Fwd: Running L4Linux + Fiasco on Freescale i.MX 6 Sabre SD

2015-06-03 Thread Matthias Lange
 bytes)
 TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 TCP: Hash tables configured (established 1024 bind 1024)
 TCP: reno registered
 UDP hash table entries: 256 (order: 0, 4096 bytes)
 UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 NET: Registered protocol family 1
 Trying to unpack rootfs image as initramfs...
 rootfs image is not initramfs (junk in compressed archive); looks like
 an initrd
 INITRD: Freeing memory.
 l4x: Checks passed.
 NetWinder Floating Point Emulator V0.97 (double precision)
 futex hash table entries: 256 (order: -1, 3072 bytes)
 msgmni has been set to 126
 io scheduler noop registered
 io scheduler deadline registered
 io scheduler cfq registered (default)
 L4 serial driver
 ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4
 l4ser_shm: L4 shared mem serial driver
 l4cdds: No name given, not starting.
 brd: module loaded
 l4bdds: No name given, not starting.
 mousedev: PS/2 mouse device common for all mice
 TCP: cubic registered
 NET: Registered protocol family 17
 RAMDISK: ext2 filesystem found at block 0
 RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
 EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
 EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
 EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
 VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
 devtmpfs: mounted
 Freeing unused kernel memory: 116K (02313000 - 0233)
 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0004
 
 CPU: 0 PID: 1 Comm: init Not tainted 3.16.0-l4 #4
 [0200cdd0] (unwind_backtrace) from [02005864] (show_stack+0x10/0x14)
 [02005864] (show_stack) from [02248c90] (panic+0x8c/0x1dc)
 [02248c90] (panic) from [0201df3c] (complete_and_exit+0x0/0x1c)
 [0201df3c] (complete_and_exit) from [0001] (0x1)
 ---[ end Kernel panic - not syncing: Attempted to kill init!
 exitcode=0x0004
 
 panic: going to sleep forever, bye
 l4linux | panic: going to sleep forever, bye
 
 
 On Fri, May 29, 2015 at 8:57 AM, Matthias Lange
 matthias.la...@kernkonzept.com mailto:matthias.la...@kernkonzept.com
 wrote:
 
 Hi,
 
 its just an educated guess, but I suspect that /bin/init tries to access
 some devices in /dev. Have you enabled devtmpfs and the devtmps
 automount option in L4Linux?
 
 Matthias.
 
 On 05/28/2015 12:49 PM, Mahdi Aichouch wrote:
  Hello,
 
  Thank you very much Mattias for you help.
 
  Now L4Linux goes further but it stops after mounting the root
 filesystem.
  Do you have an idea of what might be wrong.
 
  Thank you in advance.
 
  Best regards,
  Mahdi
 
  L4 Bootstrapper
Build: #81 Thu May 28 10:36:41 CEST 2015, 4.8.3 20140320
 (prerelease)
Scanning up to 256 MB RAM, starting at offset 32MB
Memory size is 256MB (1000 - 1fff)
RAM: 1000 - 1fff: 262144kB
Total RAM: 256MB
Scanning fiasco
Scanning sigma0
Scanning moe
Moving up to 10 modules behind 1110
moving module 02 { 118aa000-118e363f } - { 1199a000-119d363f }
 [235072]
moving module 01 { 118a-118a938b } - { 1199-1199938b }
 [37772]
moving module 00 { 11848000-1189fb17 } - { 11938000-1198fb17 }
 [359192]
moving module 09 { 11548000-11847fff } - { 11638000-11937fff }
 [3145728]
moving module 08 { 111d6000-11547497 } - { 112c6000-11637497 }
 [3609752]
moving module 07 { 111d5000-111d50bc } - { 112c5000-112c50bc }
 [189]
moving module 06 { 1107e000-111d446f } - { 1116e000-112c446f }
 [1401968]
moving module 05 { 1107d000-1107d17b } - { 1116d000-1116d17b }
 [380]
moving module 04 { 1102a000-1107cc1f } - { a000-1116cc1f }
 [338976]
moving module 03 { 1101-11029473 } - { 1110-9473 }
 [103540]
Loading fiasco
Loading sigma0
Loading moe
find kernel info page...
found kernel info page at 0x10002000
  Regions of list 'regions'
  [ 1000,  115f] {  160} Root   mbi_rt
  [ 10001000,  10001aff] {  b00} Kern   fiasco
  [ 10002000,  10066fff] {65000} Kern   fiasco
  [ 1009,  10096edf] { 6ee0} Sigma0 sigma0
  [ 10098000,  1009e177] { 6178} Sigma0 sigma0
  [ 1014,  10171d77] {31d78} Root   moe
  [ 10178000,  101934ab] {1b4ac} Root   moe
  [ 1100,  1100f58f] { f590} Boot   bootstrap
  [ 1110,  11937fff] {   838000} Root   Module
API Version: (87) experimental
Sigma0 configip:10090100 sp:
Roottask config  ip:10140260 sp:
Starting kernel fiasco at 100012c8
  Number of IRQs available at this GIC: 160
  FPU0: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p:
  dbl/sngl
  L2: ID

Re: Using a second Ethernet connector in L4Linux

2015-06-03 Thread Matthias Lange
Hi,

On 05/28/2015 12:42 PM, Mahdi Aichouch wrote:
 Hello,
 
 I have a Freescale i.MX 6 Sabre SD board.
 It is equipped with one Ethernet RJ45 connector.
 I need to add a second Ethernet RJ45 connector to the board.
 
 The board has a micro-USB OTG port that allow to connect
 a plugable USB OTG Micro-B to Ethernet adapter like for instance
 this one: http://plugable.com/products/usb2-otge100
 
 I would like to know if L4Linux might access such a second 
 Ethernet device connected through micro-USB.

Yes, this is possible. But it might not be easy.

 Does anyone has tried this before.
 
 Could someone points me to a tutorial or a guide that shows what
 are the configurations steps that I should follow to build up a working
 test case.

Unfortunately there is no step 1-2-3 tutorial. What you have to do, is
get the USB controller on your board working from L4Linux. You have to
pass-through the respective device resources the Linux driver requires
and most likely other devices (clocks, GPIO pins) as well. Most likely
you have to modify/adapt the driver in Linux.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Cann't access git://git.l4android.org/build_script.git

2015-06-02 Thread Matthias Lange
Hi,

On 06/02/2015 04:23 AM, 刘海剑 wrote:
 When I run this command, git clone
 git://git.l4android.org/build_script.git,  
 I got some error info:
 fatal: unable to connect to l4android.org:
 l4android.org[0: 141.76.48.99]: errno=Connection refused

This repository no longer exists. You have to build from source manually.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Increase IPC-Stream size

2015-06-02 Thread Matthias Lange
Hi,

On 05/28/2015 06:24 PM, ba_f wrote:
 Am 2015-05-28 08:43, schrieb Matthias Lange:
 Hi,

 On 05/27/2015 10:35 PM, ba_f wrote:
 Am 2015-05-27 00:11, schrieb Adam Lackorzynski:
 Hi ba_f,

 On Wed May 20, 2015 at 11:40:27 +0200, ba_f wrote:
 i decided not to use libshmc and do it manually with Dataspace and
 IRQ,
 because i think this comes closest to the communication between
 TrustZone
 worlds.
 It's the best starting point before pushing the project to TrustZone
 (ie.
 Normal world Client and Secure Server), isn't it?

 Indeed, that really comes closer to that.


 Anyway, i still have some question about that IRQ, and i would be
 grateful if u could answer them, too.

 I found two examples with IRQ: 'l4/pkg/examples/sys/map_irq' and
 'l4/pkg/examples/libs/l4re/c++/shared_ds'.
 I guess i could easily adapt them.

 What makes we wonder, is that both examples make use of
 'L4::Ipc::Iostream'. Actually, i dont see any difference between IRQ 
 IPC, since both are registered servers using
 L4.default_loader:new_channel().

 I think here is a little bit of misconception.
 L4.default_loader:new_channel() creates a new IPC gate (from Lua) which
 can be used by threads to send IPC messages. (Virtual) IRQs are a
 different type of kernel object but the trigger() function eventually
 maps to IPC. You can read about the different kernel objects here [1].
 You should also make yourself familiar with the Factory API which is
 used to create new kernel objects.

 I guess, IPC is build upon IRQ?

 However, you said that IPC is not possible between TrustZone worlds,
 because each world has a separate microkernel instance. I reason there
 is no L4.default_loader:new_channel() possible between worlds?
 Do u have an example design for TZ communication?

 Your observation is right. Essentially you have to use the 'smc'
 instruction (secure monitor call) to initiate a mode switch. The
 exception handler on the secure side then can evaluate the SMC value to
 determine the service requested.

 Matthias.

 [1]
 https://os.inf.tu-dresden.de/L4Re/doc/index.html#l4re_concepts_fiasco_kobjects

 
 
 
 Ok,
 
 i found the following thread, making things clearer.
 http://os.inf.tu-dresden.de/pipermail/l4-hackers/2014/006521.html
 
 In the examples mentioned, IPC is used to transfer the IRQ and DS
 capabilities from the client to the server, aye?

Correct.

 As i want to go for TrustZone, i dont wanna use IPC.
 Hence, i have to create a virtual IRQ in Ned's script, so that both
 Tasks know the IRQ namespace?

No, this is not possible. You run an independent kernel and user land on
both the secure and non-secure side. The communication between both
worlds is more like a system call interface where the non-secure side
prepares a request and then issues the 'smc' instruction. This results
in a context switch to the secure side where the kernel sees the smc
instruction in form of an IRQ.

Matthias.

 If this is any correct, then i miss the right syntax.
 I tried the following, but failed:
 
 
 
 local virtual_smc = L4.Env.Irq:create();
 
 ld:start({ caps = { irq = virtual_smc:svr()},},
  rom/server);
 
 ld:start({ caps = { irq = virtual_smc },},
  rom/client);
 
 
 
 Thanks to all of u,
 ba_f
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Booting error of L4Linux enabled SMP surpport

2015-05-29 Thread Matthias Lange
Hi,

On 05/28/2015 11:36 AM, Xiefeng (Stephen) wrote:
 Hi Adam,
 
 Thank you for your prompt. I have found the panic reason.

Would you mind sharing the reason and of course the solution with the
community?

Thanks,
Matthias.

 
 Stephen 
 
 -Original Message-
 From: l4-hackers [mailto:l4-hackers-boun...@os.inf.tu-dresden.de] On Behalf 
 Of Adam Lackorzynski
 Sent: 2015年5月27日 6:35
 To: l4-hackers@os.inf.tu-dresden.de
 Subject: Re: Booting error of L4Linux enabled SMP surpport
 
 On Fri May 22, 2015 at 07:49:14 +, Xiefeng (Stephen) wrote:
 Hi all,

 I use entry L4Linux-mag-x86 in modules.list to start a L4Linux on L4Re 
 successfully. The codes is l4re-snapshot-2014092821.
 L4Linux use x86-native_deconfig complie, use l4lx-gfx.cfg to start L4Linux. 
 This config is just set one cpu for L4Linux.

 If I set l4x_cpus=2 in l4lx-gfx.cfg, use x86-mp_vPCI_defconfig and set 
 CONFIG_NR_CPUS=2 to compile the L4Linux, when I start L4Linux, a kernel 
 panic happened:

 l4linux | Loading: rom/ramdisk-x86.rd
 l4linux | INITRD: Size of RAMdisk is 3072KiB l4linux | RAMdisk from 
 88d7 to 8907 [3072KiB] l4linux | rtc not found l4linux | 
 l4lx_thread_create: Created thread 41f (timer0) (u:b3000a00, 
 v:, sp:008e1fa8) l4linux | WARNING: Unknown wrmsr: 008b at 
 0x414bad l4linux | WARNING: Unknown rdmsr: 0186 at 0x85e1d6 
 l4linux | WARNING: Unknown rdmsr: 0187 at 0x85e1d6 l4linux | 
 WARNING: Unknown wrmsr: 00c1 at 0x85e2a7 l4linux | Launching cpu1 
 on pcpu 1 at 0x4024e0 l4linux | l4lx_thread_create: Created thread 420 
 (cpu1) (u:b3000800, v:b3000600, sp:008c7fa8) l4linux | WARNING: 
 Unknown wrmsr: 008b at 0x414bad l4linux | l4lx_thread_create: 
 Created thread 424 (timer1) (u:b3000400, v:, sp:008e3fa8) 
 l4linux | Spurious IPI on CPU0: 4 l4linux | panic: going to sleep 
 forever, bye
 
 Is there any output in the framebuffer window?
 Anyway, change the  console=tty0 parameter in l4lx-gfx.cfg to
 console=ttyLv0 and also add earlyprintk=1 (plus make sure that 
 CONFIG_EARLY_PRINTK is enabled). Then run again.
 
 
 
 Adam
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Fwd: Running L4Linux + Fiasco on Freescale i.MX 6 Sabre SD

2015-05-29 Thread Matthias Lange
 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4
 l4ser_shm: L4 shared mem serial driver
 l4cdds: No name given, not starting.
 brd: module loaded
 l4bdds: No name given, not starting.
 mousedev: PS/2 mouse device common for all mice
 TCP: cubic registered
 NET: Registered protocol family 17
 RAMDISK: ext2 filesystem found at block 0
 RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
 EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
 EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
 EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
 VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
 Freeing unused kernel memory: 116K (02314000 - 02331000)
 Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b
 
 CPU: 0 PID: 1 Comm: init Not tainted 3.16.0-l4 #1
 [0200cc68] (unwind_backtrace) from [020057e4] (show_stack+0x10/0x14)
 [020057e4] (show_stack) from [0224ad50] (panic+0x7c/0x1d0)
 [0224ad50] (panic) from [0201dcdc] (do_exit+0x7b8/0x7f0)
 [0201dcdc] (do_exit) from [0201e858] (do_group_exit+0x40/0xa0)
 [0201e858] (do_group_exit) from [02028700]
 (get_signal_to_deliver+0x148/0x4b4)
 [02028700] (get_signal_to_deliver) from [02006e1c]
 (do_signal+0x118/0x454)
 [02006e1c] (do_signal) from [0200a4d4] (l4x_vcpu_entry_c+0xa74/0x1dd4)
 [0200a4d4] (l4x_vcpu_entry_c) from [c548] (0xc548)
 ---[ end Kernel panic - not syncing: Attempted to kill init!
 exitcode=0x000b
 
 panic: going to sleep forever, bye
 l4linux | panic: going to sleep forever, bye
 
 
 On Thu, May 28, 2015 at 8:23 AM, Matthias Lange
 matthias.la...@kernkonzept.com mailto:matthias.la...@kernkonzept.com
 wrote:
 
 Hi,
 
 On 05/27/2015 06:43 PM, Mahdi Aichouch wrote:
  Hello,
 
  I tried to run L4Linux + Fiasco on a Freescale i.mx http://i.mx
 http://i.mx 6
  Sabre SD board.
 
  The L4Linux is started but it stops at loading the ramdisk, as shown in
  the debug messages below.
 
  Does someone has an idea of what might be wrong.
 
  Thank you very much in advance.
 
  Best regards,
 
  Mahdi
 
 
 [...]
 
  l4linux | l4x_register_pointer_section: addr = 0200 size = 4059136
  l4linux |text: Virt: 0x200 to 0x23defa7 [3963 KiB]
  l4linux |text: Phys: 0x1025a000 to 0x10638fa7, [3963 KiB]
  l4linux | Loading: rom/ramdisk-arm.rd
  l4linux | INITRD: Size of RAMdisk is 3072KiB
  l4linux | RAMdisk from 2000 to 00302000 [3072KiB]
  l4linux | 'swp(b)' instruction at 0224f728 and faulting.
 
 Have you enabled CONFIG_ARM_ENABLE_SWP in your Fiasco config?
 
 Matthias.
 
 
 --
 Matthias Lange, matthias.la...@kernkonzept.com
 mailto:matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14
 tel:%2B49%20-%20351%20-%2041%2088%2086%2014
 
 Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
 Geschäftsführer: Dr.-Ing. Michael Hohmuth
 
 
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Running L4Linux + Fiasco on Freescale i.MX 6 Sabre SD

2015-05-28 Thread Matthias Lange
Hi,

On 05/27/2015 06:43 PM, Mahdi Aichouch wrote:
 Hello,
 
 I tried to run L4Linux + Fiasco on a Freescale i.mx http://i.mx 6
 Sabre SD board.
 
 The L4Linux is started but it stops at loading the ramdisk, as shown in
 the debug messages below.
 
 Does someone has an idea of what might be wrong.
 
 Thank you very much in advance.
 
 Best regards,
 
 Mahdi
 

[...]

 l4linux | l4x_register_pointer_section: addr = 0200 size = 4059136
 l4linux |text: Virt: 0x200 to 0x23defa7 [3963 KiB]
 l4linux |text: Phys: 0x1025a000 to 0x10638fa7, [3963 KiB]
 l4linux | Loading: rom/ramdisk-arm.rd
 l4linux | INITRD: Size of RAMdisk is 3072KiB
 l4linux | RAMdisk from 2000 to 00302000 [3072KiB]
 l4linux | 'swp(b)' instruction at 0224f728 and faulting.

Have you enabled CONFIG_ARM_ENABLE_SWP in your Fiasco config?

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Boot L4Linux Error

2015-05-28 Thread Matthias Lange
 | section-with-init: Phys: 0x0090f000 to 0x00a0afff, [1008 KiB]
 l4linux | Main thread running, waiting...
 l4linux | WARNING: Unknown wrmsr: 008b at 0x411f0d
 l4linux | L4x: Memory size: 64MB
 l4linux | L4x: Setting superpages for main memory
 l4linux | L4x: Adjusted memory start: 0040
 l4linux | Main memory: Virt: 0x80 to 0x47f [65536 KiB]
 l4linux | Main memory: Phys: 0x0340 to 0x073f, [65536 KiB]
 l4linux | l4x: vmalloc area: 0480 - 0c80
 l4linux | Filling lower ptabs...
 l4linux | Done (1062 entries).
 l4linux | l4x_register_pointer_section: addr = 0040 size = 2998272
 l4linux |text: Virt: 0x40 to 0x6dbfff [2928 KiB]
 l4linux |text: Phys: 0x00614000 to 0x008e, [2928 KiB]
 l4linux | Loading: rom/ramdisk-x86.rd
 l4linux | INITRD: Size of RAMdisk is 3072KiB
 l4linux | RAMdisk from 0c91b000 to 0cc1b000 [3072KiB]
 l4linux | rtc not found
 l4linux | l4lx_thread_create: Created thread 41f (timer0) (u:b3000a00,
 v:, sp:0075bfa8)
 l4linux | WARNING: Unknown wrmsr: 008b at 0x411f0d
 l4linux | WARNING: Unknown rdmsr: 0186 at 0x710579
 l4linux | WARNING: Unknown rdmsr: 0187 at 0x710579
 l4linux | WARNING: Unknown wrmsr: 00c1 at 0x71064a
 mag | Input: new pointer device (src='Input_source userdata:
 1D80C' stream='userdata: 0x3abb4')
 mag |bus='i8042' vendor=0x2 product=0x6
 version=0
 mag | Input: new keyboard device (src='Input_source userdata:
 1D80C' stream='userdata: 0x3b358')
 mag |bus='i8042' vendor=0x1 product=0x1
 version=43841
 
 And I printed my screen. See attached png-file.
 
 Thanks for any reply!
 
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: How to write a driver for ARM platform

2015-05-20 Thread Matthias Lange
Hi,

On 05/19/2015 09:00 PM, qxjsjjjz wrote:
 Hi,
 
 I have designed a device in FPGA. This device has only one register
 and this register is mapped to physical address 0x4120. I can
 operate this address in kernel level. And now I want to write a driver
 to operate this device. Because the driver runs at application level
 and I can just operate virtual address. I want to know how to map
 this physical address 0x4120 to driver virtual address so I can
 operate this device in the application driver. Thanks a lot.

You have to take the following steps.

1. Add a new hardware device to your device tree and add a Mmio resource
to it.
2. Create a vbus for your user level driver and assign the hardware
device to it.
3. In your user level driver, query the vbus for devices and their
associated resources using the vbus API.
4. Map the Mmio resource from your hardware device into the address
space of your user level driver.

Now you can access the registers a the mapped (=virtual) address.

Best,
Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: where is the call_bootstrap?

2015-04-24 Thread Matthias Lange
Hi

On 04/24/2015 03:17 AM, 水镜 wrote:
 Hi, in the file main-ia32-32.cpp, there's a line(line 60):
 call call_bootstrap
 
 where could i find the implemention of the call_bootstrap?

You find it in src/kern/kernel_thread.cpp. The function is called
bootstrap()

  void bootstrap() asm (call_bootstrap) FIASCO_FASTCALL;

Best,
Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: mmu in bootstrap

2015-04-16 Thread Matthias Lange
Hi,

On 04/16/2015 04:14 AM, 水镜 wrote:
 hi,
 i want to know, whether the bootstrap in l4re(x86) will initialize the
 MMU, setup pagetable?

Yes and no. On i386 bootstrap will only move the modules to their
respective locations and then it starts the kernel. Fiasco takes care of
setting up an initial pagetable before switching paging on.

On x86_64 the picture is a little bit different as bootstrap already
switches the CPU into long mode. Switching into long mode requires
paging to be setup up and switched on. That's why bootstrap creates a
simple identity mapped pagetable which is handed over to the kernel.
Fiasco uses that pagetable intially before creating its own one.

Best,
Matthias.

 i am trying to debug the fiasco with gdb and qemu.
 
 when i attach to the qemu before system startup, i can check memory like
 0x110.after the system startup, the gdb tell me can not access
 memory if i check 0x110 again.

-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4 and Lua interaction

2015-03-30 Thread Matthias Lange
Hi,

On 03/27/2015 04:17 PM, daniel krefft wrote:
 Hi there,
 
 please can you give us a short overview about the L4 and Lua
 interaction/integration?

Lua is used for configuration of initial capabilities and application
startup. This is done by ned which has the Lua interpreter integrated.
Ned provides Lua bindings to do its task. Look out for the lua*.cc files.

 The most important aspect is to understand how Lua-Scripts are used to
 create/manage the VBus. In particular from which module/component are
 the Lua-Scripts read/processed (NED, SIGMA0)?

Lua scripts to create and manage vbusses are interpreted by the io
component. Here Lua is used to create objects in io.

 We found an example about Ankh (ankh.vbus, aw.lua, lwip.lua). Maybe it
 is possible to exemplify it via Ankh.

The first one actually is not a Lua script. The public version of io
supports Lua as well as the custom configuration syntax used in
ankh.vbus. However this syntax is deprecated. What happens here is, that
a new vbus ankh is created and virtual PCI devices that match physical
PCI network cards are assigned to this vbus.

lwip.lua is a script interpreted by ned to configure a setup with lwip.

Best,
Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Support for Raspberry Pi 2 B and/or Odroid C1

2015-03-24 Thread Matthias Lange
Hi,

On 03/23/2015 11:43 AM, daniel krefft wrote:
 Hi there,
 
 we're are interested in running Fiasco.OC on the Raspberry Pi 2
 (Broadcom BCM2836 ARM Cortex-A7) or Odroid C1 (Amlogic S805 Cortex
 A5). Is there any support for the boards yet?

No, there is no support (yet) for the aforementioned boards. We had a
look at the BCM2836, but it instead of a GIC it features a custom
interrupt controller. The C1 also looks interesting, but we had no time
yet to have a look at it. So unfortunately I can give you no ETA for
these boards.

Best,
Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth




signature.asc
Description: OpenPGP digital signature
___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: L4Re Hello World Qemu vs Hardware

2015-03-17 Thread Matthias Lange
Hi,

On 03/16/2015 12:38 PM, André Bispo wrote:
 Hello guys,
 I was trying to run Fiasco and L4 and i successfully created the ISO
 image and ran it on QEMU.
 How can i run it on my pc hardware? Can you guys provide me some steps
 on how to do it?

Just some pointers from the top of my head:

1. You need to have a working grub on your hard disk
2. Add an entry to your menu.lst or grub.cfg and include all modules.
You can take the grub.cfg from the ISO as an example.
3. Copy all modules onto your boot hard disk
4. Restart and select your new entry from grub's menu

Good look,
Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Disable log color

2015-03-10 Thread Matthias Lange
Hi,

 On 10.03.2015, at 02:12, teclis High Elf teclis.high@gmail.com wrote:
 
 Is there a way to disable the log color so that the logger doesn't insert 
 control codes for color into the output stream.

Just remove the color argument from the log statement of the desired client.

Matthias.

 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: how to get the log from serial

2015-03-04 Thread Matthias Lange
On 03/05/2015 04:42 AM, 水镜 wrote:
 hi, how to get all the output log when startup helloworld example?
 i have build the iso file use command :make grub2iso.then boot this iso
 using vmware.‍
 i can get the output log from serial when startup linux.

I recommend using Qemu. By giving '-serial stdio' on the cmdline you
will get all the serial output.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: no such object found: rom/l4re backtrace

2015-03-03 Thread Matthias Lange
Hi,

On 03/03/2015 08:52 AM, 水镜 wrote:
 Hi, i have build the l4re,l4linux,fiasco for x86 successfully. when i
 boot try to boot l4linux, an error came out:
 FATAL exception in MOE:
 Exception: No such object found: rom/l4re: backtrace ...

Looks like moe cannot find the l4re binary. Bootstrap prints a memory
map of all modules upon start. Can you provide this map?

Matthias.

 
 i use the vmware and ubuntu 14.04 to test the l4linux, here is the steps
 how i do my job:
 1.create a directory 'l4linux' in /boot.
 2.copy the bootstrap to '/boot/l4linux' from 'l4re_build/bin/x86_586'
 3.copy all the file to '/boot/l4linux' in 'l4re_build/bin/x86_586/l4f'
 4.copy the fiasco to '/boot/l4linux'  from 'fiasco_build/bin'
 5.copy the vmlinuz to '/boot/l4linux' form 'l4linux_build'
 6.download the drops-rd.rd to '/boot/l4linux'
 7.create the l4linux.cfg in '/boot/l4linux'
 8.create the modules.list in '/boot/l4linux'
 
 the 'modules.list' is like this:
 entry L4Linux
 kernel fiasco -serial_esc
 roottask moe rom/l4linux.cfg
 module l4linux.cfg
 module l4re
 module ned
 module vmlinuz
 module drops-rd.rd
 
 the 'l4linux.cfg' is like this:
 L4.default_loader:start({}, rom/vmlinuz mem=64M console=ttyLv0
 l4x_rd=rom/drops-rd.rd root=1:0 ramdisk_size=4000 init=/bin/sh);
 
 9.modify the grub.cfg, add the following lines:
 menuentry 'L4Linux' {
 multiboot /boot/l4linux/bootstrap -modaddr 0x0200
 module /boot/l4linux/fiasco -serial_esc
 module /boot/l4linux/sigma0
 module /boot/l4linux/moe rom/l4linux.cfg
 module /boot/l4linux/l4linux.cfg
 module /boot/l4linux/l4re
 module /boot/l4linux/ned
 module /boot/l4linux/vmlinuz
 }
 
 after this job is done. i reboot the system. the error came out.
 
 please give me some help to sovle the problem. thanks.
 
 
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Troubles testing UART3 on Exynos5

2015-02-27 Thread Matthias Lange
: request uart-irq from l4io failed\n);
   return false;
 }
 
  /* setting IRQ type to L4_IRQ_F_POS_EDGE seems to be wrong place */
   if
 (l4_error(_uart_irq-attach((l4_umword_t)static_castL4::Server_object
 *(this),
 L4Re::Env::env()-main_thread(
 {
   printf(gps-drv: attach to uart-irq failed.\n);
   return false;
 }
 
   if ((l4_ipc_error(_uart_irq-unmask(), l4_utcb(
 {
   printf(gps-drv: unmask uart-irq failed.\n);
   return false;
 }
   _uart-enable_rx_irq(true);
 
srv_rcv_cap = L4Re::Util::cap_alloc.allocvoid();
   if (!srv_rcv_cap.is_valid())
 {
   printf(serial-drv: Alloc capability for rcv-cap failed.\\n);
   return false;
 }
  
   return true;
 }
 
 int
 GPS_server::dispatch(l4_umword_t obj, L4::Ipc::Iostream ios)
 {
   l4_msgtag_t tag;
   ios  tag;
   switch (tag.label())
 {
 case L4_PROTO_IRQ:
   if (!L4Re::Util::Icu_svrGPS_server::dispatch(obj, ios))
 return handle_irq();
 case L4_PROTO_LOG:
   return L4Re::Util::Vcon_svrGPS_server::dispatch(obj, ios);
 default:
   return -L4_EBADPROTO;
 }
 }
 
 int main()
 {
   char buffer[100];
   int tmp;
   static GPS_server gps_srv;
 
   // Register calculation server
   if (!server.registry()-register_obj(gps_srv, gps_srv).is_valid())
   {
 printf(Could not register GPS service, is there a 'gps_srv' in
 the caps table?\n);
 return 1;
   }
 
   if (!gps_srv.running())
   {
   printf(Failed to initialize serial driver; Aborting.\n);
   return 1;
   }
 
   gps_srv.vcon_write(Hola Mundo\n,11);
 while(1){
   tmp = gps_srv.vcon_read(buffer,11);
   if(tmp0)
   printf(Readed data: %s\n,buffer);
 }
   // Wait for client requests
   server.loop();
   return 0;
 }
 
 I have created my run config file
 gps-drv.cfg
 
 require(L4);
 -- Shortcuts
 local ld = L4.default_loader;
 local vbus_uart03 = ld:new_channel();
 local platform_ctl = ld:new_channel();
 local gps_srv = ld:new_channel();
 -- Start the IO Server
 ld:start(
 {
 caps = {
 sigma0   = L4.cast(L4.Proto.Factory,
 L4.Env.sigma0):create(L4.Proto.Sigma0);
 icu  = L4.Env.icu;
 platform_ctl = platform_ctl:svr();
 uart03= vbus_uart03:svr();
 },
 log = { IO Server, green },
 l4re_dbg = L4.Dbg.Warn,
 }, rom/io rom/yse5250.devs rom/yse5250.io);
 
 -- Start the GPS Driver Server conected to UART3
 ld:start(
 {
 caps = {
 gps_srv = gps_srv:svr();
 vbus =  vbus_uart03;
 },
 log = {GPS Driver,blue}
 }, rom/gps_drv);
 
 And have created the yse5250.devs and yse5250.io to put the UART3 on a
 virtual BUS
 yse5250.devs
 
 local Hw = Io.Hw
 local Res = Io.Res
 Io.hw_add_devices
 {
 UART3 = Hw.Device
 {
 hid = UART3;
 Res.irq(86);
 Res.mmio(0x12C3, 0x12C3);
 }
 }
 
 yse5250.io
 
 Io.add_vbusses
 {
 -- Create a virtual bus for a client and give access to UART3
 uart03 = Io.Vi.System_bus(function ()
 dev = wrap(Io.system_bus():match(UART3));
 end);
 }
 
 On modules.list have added an entry for my example
 
 entry GPS-Driver
 kernel fiasco -serial_esc
 roottask moe rom/gps-drv.cfg
 module l4re
 module ned
 module gps-drv.cfg
 module gps_drv
 module io
 module yse5250.devs
 module yse5250.io
 
 After that i have compiled and uploaded the example to the board. At
 runtime, i got the Hola Mundo over UART3 but when I write in the UART3
 I never read the written information.
 Something is wrong with my code?
 
 -- 
 Lic. Reinier Millo Sánchez
 Centro de Estudios de Informática
 Universidad Central Marta Abreu de Las Villas
 
 antes de discutir ... respira;
   antes de hablar ... escucha;
  antes de escribir ... piensa;
   antes de herir ... siente;
  antes de rendirte ... intenta;
   antes de morir ... vive
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Ethernet on l4linux

2015-02-20 Thread Matthias Lange
Hi,

On 02/18/2015 10:49 AM, Gayathri Nagarajan wrote:
 I am getting an ERROR : NETWORK IS UNREACHABLE, when i run socket
 program in l4linux. 
 
 I am using 64-bit host, upon that - virtual machine which is 32-bit,
 upon that - ubuntu, upon that - fiasco+l4re+l4re+l4linux

I assume that your L4Re setup is targeting i386?

 *//l4linux_socket.io http://l4linux_socket.io file*
 
 l4linux = new System_bus()
 {
 NIC = wrap(hw-root.NIC);
 }

Where does the 'NIC' hardware device comes from?

 *//l4linux_socket.cfg*
 
 -- vim:set ft=lua:
 
 local lxname = vmlinuz;
 if L4.Info.arch() == arm then
   lxname = vmlinuz.arm;
 end
 
 loader = L4.default_loader;
 vbus_l4linux = loader:new_channel();
 
 loader:start(
 {
 caps={ 
 sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0);
 icu = L4.Env.icu;
 l4linux = vbus_l4linux:svr();
 },
 },rom/io -vv  rom/l4linux_socket.io http://l4linux_socket.io);

You can make io more verbose by adding more 'v' options. Then io also
prints the hardware device tree.

Matthias.

 loader:start(
   { caps = {
   log = L4.Env.log:m(rws),
   vbus = vbus_l4linux;
 },
 l4re_dbg = L4.Dbg.Warn,
 log = { l4linux, yellow },
   },
   rom/ .. lxname ..  mem=64M console=ttyLv0 l4x_rd=rom/new_ramdisk
 root=0:0 ramdisk_size=8400 init=/bin/sh);
 
 *//l4linux_socket.list*
 
 modaddr 0x0110
 
 entry l4linux_socket
 
 kernel fiasco -serial_esc
 roottask moe rom/l4linux_socket.cfg
 module l4re
 module ned
 module l4linux_socket.cfg
 module io
 module l4linux_socket.io http://l4linux_socket.io
 module vmlinuz
 module new_ramdisk
 
 Please help us in resolving the error
 
 Thank you
 
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Problem with socket program on l4linux

2015-02-13 Thread Matthias Lange
Hi,

On 13.02.2015, at 12:22, Gayathri Nagarajan gayathrinagaraja...@gmail.com 
wrote:

 I have copied my binaries compiled statically to ramdisk for executing on 
 l4linux.
 When I execute,
 
 //server side
 /tmp # ./server1
 Socket created 
 bind done
 Waiting for incoming connections
 
 //client side
 /tmp # ./client1
 connect failed. Error: Network is unreachable
 
 But I have enabled the network support and drivers in L4Linux configuartion.
 Where will the .config file be located, so as to reconfirm if I have enabled 
 correctly? I couldn't find it in l4linux build directory.
 
 Also, I executed packet sniffer on l4linux, which showed
 
 /tmp # ./simplesniffer eth0
 Opening device eth0
 ERROR: eth0: No such device exists (SIOCGIFHWADDR:No such device)

This error is exactly telling you what is wrong. There is no eth0 device. Just 
compiling drivers into L4Linux doesn’t magically gives you an ethernet device 
(like it is the case for native Linux). You will need to give L4Linux access to 
a corresponding hardware device.

I recommend trying your application with the local loopback device first. You 
can even do that on your host Linux first before moving on to L4Linux.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Ram size of the arm images

2015-02-13 Thread Matthias Lange
Hi,

please respect the netiquette and avoid cross-posting the same question on 
multiple mailing lists.

On 13.02.2015, at 12:08, cem akpolat akpolat...@gmail.com wrote:

 Hi,
 
 As you know there are many configuration file for arm boards under 
 l4re/mk/platforms folder. When we open one of them, vexpress, it contains the 
 following information:
 
 PLATFORM_NAME= ARM Versatile Express
 PLATFORM_ARCH= arm
 PLATFORM_RAM_BASE= 0x6000
 PLATFORM_RAM_SIZE_MB = 256
 The interesting part here is the size of the RAM, because you cannot give 
 same size of the RAM when you compile the l4 lua configuration. In case you 
 give l4linux raises memory cannot reach out of the ... error. what is the 
 exact reason of that? is there any specific point where the ram size of arm 
 boards are static defined?

Usually ARM platforms only have a fixed amount of RAM installed and no (real) 
dynamic way of determining the amount during startup. In case of the mentioned 
board and Qemu you can increase the amount of RAM “seen” by l4re by overriding 
the RAM_SIZE_MB variable. Then you can start Qemu with ‘-m SIZE’ to have more 
RAM available.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: How to Install L4Re

2015-02-10 Thread Matthias Lange
Hi,

On 02/05/2015 07:37 PM, Jerry L wrote:
 Hi all,
 
 I want to install L4Re in my zedboard. Who can give me some information
 about how to do it. I searched online and did not find any useful
 information about it. Thank you very much.

I am not sure what you want to accomplish but if I assume that you boot
from SD card you need to configure the bootloader (u-boot?) to
automatically boot your L4Re image.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Running l4android on cubieboard2

2015-02-09 Thread Matthias Lange
Hi,

On 02/09/2015 10:48 AM, cem akpolat wrote:
 Hi, 
 
 I tried also with the working ramdisk and unfortunately I received the
 same output. I believe lua configuration file is correctly written,
 nevertheless you can see below its content.
 I couln't really figure out what it is the exact issue there. The
 general idea is the corruption of the ramdisk, but after trying the new
 ramdisk, it is seen that this is not directly related to the rootfs.

Can you try your setup on Qemu using e.g. the rv_vexpress platform?

Matthias.

 
 Thanks for your comments.
 =
 
 -- vim:set ft=lua:
 
 local lxname = vmlinuz;
 if L4.Info.arch() == arm then
 lxname = vmlinuz.arm;
 end
 
 loader = L4.default_loader;
 vbus_l4linux = loader:new_channel();
 
 loader:start(
 { caps = {
 sigma0 =L4.cast(L4.Proto.Factory,L4.Env.sigma0):create(L4.Proto.Sigma0);
 icu= L4.Env.icu;
 l4linux = vbus_l4linux:svr();
 },
 }, rom/io -vv rom/arm-rv-eb-mc.devs rom/l4lx-vbus.io
 http://l4lx-vbus.io);
 
 L4.default_loader:start(
 { caps = {
 log = L4.Env.log:m(rws),
 vbus = vbus_l4linux;
 },
 l4re_dbg = L4.Dbg.Warn,log = { l4linux, yellow },
 },
 rom/ .. lxname ..  mem=256M console=ttyLv0 l4x_rd=rom/ramdisk- .. 
 L4.Info.arch() .. .rd root=1:0 ramdisk_size=4000 init=/bin/sh);
 
 
 
 Cem Akpolat
 
 On Thu, Jan 22, 2015 at 3:38 PM, Matthias Lange
 matthias.la...@kernkonzept.com mailto:matthias.la...@kernkonzept.com
 wrote:
 
 On 01/20/2015 12:29 PM, cem akpolat wrote:
  As you mentioned I enabled FPU in Fiasco kernel and re-compiled, again I
  have the same issue. I couldn't solve the previous issue. The issue that
  you mentioned, I disabled FPU in the l4linux configuration, that's why
  this wasn't a solution. So now, as FPU is in Fiasco enabled, I don't
  receive anymore this failure message, however, the following issue is
  still available sh not tainted. I am not sure but It can be an issue
  in the file system (ramdisk-arm.rd). Do you have a stable ramdisk file
  system for arm, otherwise I will compile new file system.
 
 A working ramdisk is contained in the latest snapshot [1]
 
 Matthias.
 
 [1] http://os.inf.tu-dresden.de/download/snapshots-oc/
 
 
  =
  RAMDISK: ext2 filesystem found at block 0
  RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
  EXT4-fs (ram0): couldn't mount as ext3 due to feature
 incompatibilities
  EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
  EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
  VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
  Freeing unused kernel memory: 116K (02307000 - 02324000)
  Kernel panic - not syncing: Attempted to kill init!
 exitcode=0x000b
 
  CPU: 0 PID: 1 Comm: sh Not tainted 3.16.0-l4-g5d0896b #8
  [0200c9c8] (unwind_backtrace) from [020055e8]
 (show_stack+0x10/0x14)
  [020055e8] (show_stack) from [0223f704] (panic+0x7c/0x1e0)
  [0223f704] (panic) from [0201e6a8] (do_exit+0x708/0x7a0)
  [0201e6a8] (do_exit) from [0201e80c] (do_group_exit+0x3c/0x9c)
  [0201e80c] (do_group_exit) from [02028390]
  (get_signal_to_deliver+0x148/0x490)
  [02028390] (get_signal_to_deliver) from [02006be8]
  (do_signal+0x114/0x448)
  [02006be8] (do_signal) from [0200a210]
 (l4x_vcpu_entry_c+0xa94/0x1da8)
  [0200a210] (l4x_vcpu_entry_c) from [001074f0] (0x1074f0)
  ---[ end Kernel panic - not syncing: Attempted to kill init!
  exitcode=0x000b
 
  panic: going to sleep forever, bye
  l4linux | panic: going to sleep forever, bye
  ===
 
  Cheers,
  Cem
 
  Cem Akpolat
 
  On Mon, Jan 19, 2015 at 11:14 PM, Adam Lackorzynski
  a...@os.inf.tu-dresden.de mailto:a...@os.inf.tu-dresden.de
 mailto:a...@os.inf.tu-dresden.de
 mailto:a...@os.inf.tu-dresden.de wrote:
 
  On Mon Jan 19, 2015 at 18:56:59 +0100, cem akpolat wrote:
   I encountered new failure, by the way I tested with hello
 word application.
   It works fine. I couldn't fine an explanation related  sh
 Not tainted.
   There are of course some general definitions, but with them
 I cannot find
   the missing part here.
 
  My first guess here is missing FPU support in Fiasco. How did
 you fix
  the previous issue you had while booting Linux?
 
   Additionally I want to ask, the booting parameters
   in uboot and the parameters in l4lx.cfg are evaluated
 together or l4lx.cfg
   booting parameters ignores the uboot booting parameters.
 
  The arguments given in uboot are not getting through to
 L4Linux, i.e. it
  does not see them.
 
   Freeing unused kernel memory: 116K (02306000 - 02323000)
   Kernel panic - not syncing: Attempted to kill init

Re: How to run an application on l4linux

2015-02-09 Thread Matthias Lange
Hi,

On 02/07/2015 05:59 AM, Gayathri Nagarajan wrote:
 Many thanks for the l4 team in helping me resolve my errors.
 I have succesfully built fiasco.oc,l4re,l4linux
 
 I want to execute a  socket program(linux application) on l4linux or
 using l4linux.
 Hence, I am in need of step by step procedure for executing it. 
   
 Also, is there any links or reference pages regarding how to  use
 l4linux and how to run linux applications on l4linux?

There is nothing special or different compared to running applications
on native Linux. Write your application, compile it and copy it to your
ramdisk (or whatever filesystem your L4Linux has access to).

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Mounting l4linux ramdisk

2015-02-09 Thread Matthias Lange
Hi,

On 02/09/2015 06:35 AM, Harini Balachandran wrote:
 I am trying to execute a hello world application on l4 linux.I generated
 hello.ko file.What is the procedure to mount the l4linux ramdisk and how
 to copy my .ko file to it.

Are you sure that a kernel module is the right thing as a hello world
application?

 I gave the following command on the l4linux command prompt.
 
 [root]# mkdir /mnt/rd
 [root]# mount /dev/ram0 /mnt/rd
 
 mount:mounting /dev/ram0 on /mnt/rd failed:no such file or directory.

Instead of /dev/ram0 you need to specify the file name of your ramdisk.
You also need to mount the ramdisk via a loopback device using '-o loop'.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: Linux boot problem

2015-02-05 Thread Matthias Lange
On 02/05/2015 05:57 AM, Gayathri Nagarajan wrote:
 Upon the boot of l4linux iso image using QEMU, I got the following:
 vmlinuz | RAMDISK: ext2 filesystem found at block 0
 vmlinuz | RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
 vmlinuz | EXT4-fs (ram0): couldn't mount as ext3 due to feature
 incompatibilities
 vmlinuz | EXT4-fs (ram0): mounting ext2 file system using the ext4
 subsystem
 vmlinuz | EXT4-fs (ram0): mounted filesystem without journal. Opts:
 (null)
 vmlinuz | VFS: Mounted root (ext2 filesystem) on device 1:0.
 vmlinuz | Freeing unused kernel memory: 144K (00709000 - 0072d000)
 vmlinuz | Clocksource tsc unstable (delta = 3346692958 ns)
 vmlinuz | /bin/sh: can't access tty; job control turned off 
 
 I disabled ACPI and power management options also.
 I have included init=/bin/sh in l4linux.cfg script. Still the linux
 command prompt doesn't appear via l4linux launch.
 
 The script is below:
 //l4linux.cfg:
 
 L4.default_loader:start({}, rom/vmlinuz mem=64M console=ttyLv0
 l4x_rd=rom/ramdisk-x86.rd root=1:0 ramdisk_size=4000 init=/bin/sh);

You need to give L4Linux the log capability

caps = {
  log = L4.Env.log:m(rws),
},

Also see the examples in l4/conf/examples.

Matthias.


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


Re: [Out-Of-Topic]How to Access Input GPIO of OMAP4460 without L4Re (direct access)

2015-01-28 Thread Matthias Lange
Hi,

On 01/27/2015 04:19 PM, Erry Pradana Darajati wrote:
 Hi L4 Hackers,
 My subject seems out of topic, but i don't know where i can ask this
 kind of thing, and i think there are many people have a knowledge about
 this subject.
 I have a problem. I want to directly access GPIO140 (in GPIO5 ball) as
 input.
 I have a function to print the value of GPIO5_DATAIN (0x4805 B138). But
 when i print that out, the value of it still not changed (zero value). I
 Conclude, the pin still not accepting the input. I have already done
 these things :
 
 1. Set GPIO5_OE to 0x1
 2. See the value of MCSPI1_CS3 Pad Configuration (0x4A10 013C) and it
 give me value like this (0x011B 001B) which is for GPIO_140 -
 MUX_MODE=gpio_140. PULLUDENABLE=0x1(enable). PULLTYPESELECT=0x1(enable).

This looks ok.

Do you have your input already connected to the pin? How does your input
works?

Maybe I can try your setup later today (no promise).

Matthias.

 Which is in my current knowledge, is a right setting for accepting
 input. But still, it's still not successful
 So where or what did i miss ? is it still any configuration / address to
 set ?
 
 I appologize for the Out-of-Topic Subject .Thank you for any answer and
 suggestion and help.
 
 -- 
 /Regards,/
 /Erry Pradana Darajati | *Student of Computer Engineering*/
 /*Politeknik Elektronika Negeri Surabaya / EEPIS, Indonesia*/
 
 
 ___
 l4-hackers mailing list
 l4-hackers@os.inf.tu-dresden.de
 http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
 


-- 
Matthias Lange, matthias.la...@kernkonzept.com, +49 - 351 - 41 88 86 14

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth


___
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


  1   2   >