Increase IPC-Stream size

ba_f ba_f at
Wed May 20 11:40:27 CEST 2015

Am 2015-05-10 23:07, schrieb Adam Lackorzynski:
>> I need to transmit a 4kB buffer and 4kB as response.
>> What is L4's most elegant way to do so?
> Elegant depends probably :) One way without much bells and whistles is
> creating a dataspace in the config script and attaching it on each 
> side:
>  local ds = L4.Env.mem_alloc:create(L4.Proto.Dataspace, 4096);
>  L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/one");
>  L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/two");
> Then attach it via L4Re::Rm::attach(). I guess you also want some kind
> of notification. You could use standard IPC for that, or, better, use
> Irqs, i.e. two, one for each side. libshmc wraps this, esp. settings
> this up incl. the notification via Irqs.
> Adam

Hi Adam,

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?

Anyway, i need some more help.

i tried this:

> L4::Cap<L4Re::Dataspace> ds = 
> L4Re::Env::env()->get_cap<L4Re::Dataspace>("shmds");
> l4_addr_t startAddr = 0;
> if ( L4Re::Env::env()->rm()->attach( &startAddr, 4096, 
> L4Re::Rm::In_area | L4Re::Rm::Eager_map, ds, 0, L4_PAGESHIFT) )
>   printf("Error");

First, get_cap<L4Re::Dataspace>("shmds") leads to a kernel warning.
> KERNEL: Warning: nothing mapped: (Obj_space)
i guess, i dont understand that capability stuff entirely. What causes 
this warning?

Second, my C++ skills are a bit moderate, unfortunately.
So, is this right?
> L4Re::Env::env()->rm()->attach( &startAddr, 4096, flags, ds, 0, 
Or how to call L4Re::Rm::attach()?

Thanks again,

More information about the l4-hackers mailing list