Re: Linking genode processes at different address space

2016-10-24 Thread Parfait Tokponnon
2016-10-18 16:31 GMT+01:00 Alexander Boettcher <
alexander.boettc...@genode-labs.com>:

> On 18.10.2016 11:16, Parfait Tokponnon wrote:
> > My real problem is this :
> > When an EC (Execution Context) traps into the kernel, how the kernel can
> > know which component it belongs to or which component originates this
> trap,
> > and when the kernel, returning to userspace, elects an EC, which
> component
> > this EC belongs to. I would like to get from the kernel at runtime the
> > component an Ec belongs to. Is it Possible?
>
> You will need to add your own support code in the kernel and Genode/NOVA
> to correlate things.
>
> If you haven't yet a fully high dynamic setup, I would advise to enable
> in the kernel the debug output in the beginning of
>
> sys_create_ec
> sys_create_pd
>
> and accordingly in Genode add debug output of the names of the process
> and thread before all occurrences of
>
> create_ec
> create_pd
>
> in repos/base-nova.
>
> With the information you are able to correlate EC and PD pointers in the
> kernel with Genode names for the process and threads.
>
> It works fine,
Thanks


> Hope it helps,
>
> Alex.
> --
> Alexander Boettcher
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> genode-main mailing list
> genode-main@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>



-- 
Parfait T.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Linking genode processes at different address space

2016-10-18 Thread Alexander Boettcher
On 18.10.2016 11:16, Parfait Tokponnon wrote:
> My real problem is this :
> When an EC (Execution Context) traps into the kernel, how the kernel can
> know which component it belongs to or which component originates this trap,
> and when the kernel, returning to userspace, elects an EC, which component
> this EC belongs to. I would like to get from the kernel at runtime the
> component an Ec belongs to. Is it Possible?

You will need to add your own support code in the kernel and Genode/NOVA
to correlate things.

If you haven't yet a fully high dynamic setup, I would advise to enable
in the kernel the debug output in the beginning of

sys_create_ec
sys_create_pd

and accordingly in Genode add debug output of the names of the process
and thread before all occurrences of

create_ec
create_pd

in repos/base-nova.

With the information you are able to correlate EC and PD pointers in the
kernel with Genode names for the process and threads.

Hope it helps,

Alex.
-- 
Alexander Boettcher
Genode Labs

http://www.genode-labs.com · http://genode.org

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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Linking genode processes at different address space

2016-10-18 Thread Parfait Tokponnon
Hello Martin,

2016-10-17 9:57 GMT+01:00 Martin Stein :

> Hello Parfait,
>
> Am 15.10.2016 um 14:34 schrieb Parfait Tokponnon:
> > Dear Genode community,
> > I would like to know if there is a way to link Genode process (or
> > components) at different address spaces especially when building
> > Heeselicht scenario.
> > When playing with the kernel (Nova), I encounter some weird values from
> > a userland process, but which component exactly it is, i don't really
> > know since almost all of them are linked to the same virtual adress.
> > According to me, one way to deal with it would be to name each PD
> > (protection domain) in the kernel according to the Genode component they
> > belong to, but I think this would be a bit tedious.
> > So what I am projecting to do is to guess the component name from the
> > adress space they are executing in  (if they have different address
> > space, right?).
> > Any other idea is welcome.
>
> Yes, the components are all in different virtual address spaces.
> Anyway, I assume that changing the linking in such a way to get a
> components name would be like taking a sledgehammer to crack a nut. I
> wonder what exactly you mean with weird values (IP, stack pointer,
> pagefaults, ...?) and at where you are when observing them (Core,
> Kernel, debugger, ...?).


I am in the kernel.
My real problem is this :
When an EC (Execution Context) traps into the kernel, how the kernel can
know which component it belongs to or which component originates this trap,
and when the kernel, returning to userspace, elects an EC, which component
this EC belongs to. I would like to get from the kernel at runtime the
component an Ec belongs to. Is it Possible?


> I ask because, for example, the
> Region-Management code in Core actually knows which Address Space is
> used by which component. If your component causes a pagefault, Core not
> only prints the name of the component but also name and IP of the thread
> that caused it.
>
> Because I am in the kernel, I assume i have no idea of what is going on in
core and other components.

> Cheers,
> Martin
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> genode-main mailing list
> genode-main@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>

Thank you a lot!

-- 
Parfait T.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Linking genode processes at different address space

2016-10-17 Thread Martin Stein
Hello Parfait,

Am 15.10.2016 um 14:34 schrieb Parfait Tokponnon:
> Dear Genode community,
> I would like to know if there is a way to link Genode process (or
> components) at different address spaces especially when building
> Heeselicht scenario.
> When playing with the kernel (Nova), I encounter some weird values from
> a userland process, but which component exactly it is, i don't really
> know since almost all of them are linked to the same virtual adress.
> According to me, one way to deal with it would be to name each PD
> (protection domain) in the kernel according to the Genode component they
> belong to, but I think this would be a bit tedious.
> So what I am projecting to do is to guess the component name from the
> adress space they are executing in  (if they have different address
> space, right?).
> Any other idea is welcome.

Yes, the components are all in different virtual address spaces.
Anyway, I assume that changing the linking in such a way to get a
components name would be like taking a sledgehammer to crack a nut. I
wonder what exactly you mean with weird values (IP, stack pointer,
pagefaults, ...?) and at where you are when observing them (Core,
Kernel, debugger, ...?). I ask because, for example, the
Region-Management code in Core actually knows which Address Space is
used by which component. If your component causes a pagefault, Core not
only prints the name of the component but also name and IP of the thread
that caused it.

Cheers,
Martin

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Linking genode processes at different address space

2016-10-15 Thread Parfait Tokponnon
Dear Genode community,
I would like to know if there is a way to link Genode process (or
components) at different address spaces especially when building Heeselicht
scenario.
When playing with the kernel (Nova), I encounter some weird values from a
userland process, but which component exactly it is, i don't really know
since almost all of them are linked to the same virtual adress.
According to me, one way to deal with it would be to name each PD
(protection domain) in the kernel according to the Genode component they
belong to, but I think this would be a bit tedious.
So what I am projecting to do is to guess the component name from the
adress space they are executing in  (if they have different address space,
right?).
Any other idea is welcome.
Thanks

-- 
Parfait T.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main