Dataspaces and sub-region mapping

Norman Feske norman.feske at ...1...
Wed Jul 3 12:01:24 CEST 2013

Hi Daniel,

> If I create a class which inherits from Dataspace_capability I assume
> the RPC marshalling/unmarshalling can't deal with it properly?
> struct X : Genode::Dataspace_capability
> {
>   addr_t phys;
> };
> So I can avoid adding extra parameters.

I am afraid that this approach won't work. The delegation of
capabilities is handled by the insertion/extraction operator overloads
that take a 'Capability<T>' as argument. I am not 100% sure whether or
not the operator matches for your type but in any case, it won't work.
If the object is regarded as a capability, the capability will be
delegated but the 'phys' member won't be transferred. On the other hand,
if the object is regarded as a plain data type, the 'phys' value will be
transferred, but the capability won't be delegated.

I suggest to add a separate RPC interface function (to the session
interface of your service) that takes a 'Dataspace_capability' as
argument and returns the physical address as return value).

Maybe there is another solution for the high-level problem you try to
solve using the managed dataspace? But given the scarce information I
have for now, I am unable to see the big picture, which makes it somehow
difficult to assist you.


Dr.-Ing. Norman Feske
Genode Labs ·

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list