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 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? Generally this warning is printed when trying to pass a capability (or memory) around but the source is empty. This is typically a programming error. Secondly I think the warning does not come from the get_cap call. That call just gets the cap from the environment where the program startup has already stored it. "shmds" must be a cap that has been specified in the "caps" table of your program in the lua script. > Second, my C++ skills are a bit moderate, unfortunately. > So, is this right? > >L4Re::Env::env()->rm()->attach( &startAddr, 4096, flags, ds, 0, > >L4_PAGESHIFT) > Or how to call L4Re::Rm::attach()? With flags == L4Re::Rm::Search_addr it should be fine (plus: you can omit the last two parameters). Don't use the In_area, you need to alloc such an area beforehand! Further, you need to add L4Re::Rm::Search_addr, otherwise attach will try to put that memory at 0 (startAddr == 0) which is not good to do. Adam -- Adam a...@os.inf.tu-dresden.de Lackorzynski http://os.inf.tu-dresden.de/~adam/ _______________________________________________ l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers