RPC( dataspace)

ba_f ba_f at rbg.informatik.tu-darmstadt.de
Mon May 2 16:39:21 CEST 2016


Hello,

I wanna use the new RPC with a L4Re::Dataspace as parameter.
Unfortunately, I get an Error=0xfffff828=8_dec.

What's my Error?



/* shared.h */
#include <l4/sys/capability>
#include <l4/sys/cxx/ipc_iface>
#include <l4/re/dataspace>

struct SERV : L4::Kobject_t<SERV, L4::Kobject, 0x44>
{
   L4_INLINE_RPC(int, transmit, (int32_t size, 
L4::Ipc::Cap<L4Re::Dataspace> command));
   typedef L4::Typeid::Rpcs<transmit_t> Rpcs;
};




/* server.cc */
class Server : public L4::Epiface_t<Server, SERV>
{
public:
     int op_transmit(SERV::Rights, int32_t size, L4::Ipc::Snd_fpage 
command)
     {
      return 0;
     }
};




/* client.cc */
   L4::Cap<L4Re::Dataspace> dataspace = 
L4Re::Util::cap_alloc.alloc<L4Re::Dataspace>();
   if (!(dataspace).is_valid()){
     return -1;
   }
   int r =  L4Re::Env::env()->mem_alloc()->alloc( size, dataspace, 0);
   if (r < 0){
     return -1;
   }
   l4_addr_t ds_startAddr = 0;
   r =  L4Re::Env::env()->rm()->attach( &ds_startAddr, dataspace->size(), 
L4Re::Rm::Search_addr, L4::Ipc::make_cap_rw(dataspace));
   if (r < 0){
     return -1;
   }

   r = serverCap->transmit( size, dataspace);
   if (r){
     printf("Error=0x%x=%d_dec talking to server\n",r);
     return -1;
   }




BTW: What's that 0x44 in the struct?
Where do i find valid flags for this parameter?



Thanks again,

ba_f




More information about the l4-hackers mailing list