fang zhengshu | 2 Sep 03:43
Picon

Re: l4-hackers Digest, Vol 76, Issue 13

hi all,
 
could someone tell me how to get the thread id when do the open_call()/close_call()?
or we can get the thread id unless wo do the l4_ipc_send() operation?
 
I only want to get the thread id who do the open_call()/close_call() operation? When more than one task do the operation The server can store the thread id.

thank you and best wishes.
 
 
On Sun, Aug 30, 2009 at 6:00 PM, <l4-hackers-request <at> os.inf.tu-dresden.de> wrote:
Send l4-hackers mailing list submissions to
       l4-hackers <at> os.inf.tu-dresden.de

To subscribe or unsubscribe via the World Wide Web, visit
       http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
or, via email, send a message with subject or body 'help' to
       l4-hackers-request <at> os.inf.tu-dresden.de

You can reach the person managing the list at
       l4-hackers-owner <at> os.inf.tu-dresden.de

When replying, please edit your Subject line so it is more specific
than "Re: Contents of l4-hackers digest..."


Today's Topics:

  1. Re: can server side get the thread id of client side?
     (fang zhengshu)


----------------------------------------------------------------------

Message: 1
Date: Sun, 30 Aug 2009 02:57:16 -0400
From: fang zhengshu <fangzhsh07 <at> gmail.com>
To: l4-hackers <at> os.inf.tu-dresden.de
Subject: Re: can server side get the thread id of client side?
Message-ID:
       <a73d246f0908292357w7ddaed5cwdb2a3013b07020c5 <at> mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

hi all,

 3. Re: can server side get the thread id of client side?
>      (Bj?rn D?bel)
> Message: 3
> Date: Fri, 28 Aug 2009 09:40:17 +0200
> From: Bj?rn D?bel <doebel <at> os.inf.tu-dresden.de>
> To: L4 Hackers <l4-hackers <at> os.inf.tu-dresden.de>
> Subject: Re: can server side get the thread id of client side?
> Message-ID: <4A9789E1.7080503 <at> os.inf.tu-dresden.de>
> Content-Type: text/plain; charset=ISO-8859-1
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> > I know that the client side can get the server's thread_id throw name
> > service. I want to ask can the server side get the client's task_id or
> > thread_id?
> > or must the client side send the thread_id to server?
>
> your server will call either l4_ipc_wait() or l4_ipc_reply_and_wait() in
> order to receive the message from the client. In both cases there is a
> src parameter which will contain the client's thread ID after the system
> call returns.
>
sorry for not explaining it clearly.
if I defined two functions in idl file, just like:
interface test{
int open(int fd, int flags);
int close(fd);
};

 and I implement them in the server side.
I know that when I use open()/close() in the client side, the server will
call the function open_component()/close_component() which are in the server
side.

In the open_component()/close_component() function I want to get thread id
of the caller to do some operation flag.but as we know, when we call
open()/close() in client side, the open_component()/close_component()
function in server side will be executed. so we can not use l4_ipc_wait() or
l4_ipc_reply_and_wait() function in the open_component()/close_component()
function, or it will be stop and wait for a message in the function. So in
order to get the thread id in the open_component()/close_component(), when
or where should I use the l4_ipc_wait() or l4_ipc_reply and wait()  to get
the thread id?

thank you!





--
fang,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20090830/8a457373/attachment-0001.html>

------------------------------

_______________________________________________
l4-hackers mailing list
l4-hackers <at> os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers


End of l4-hackers Digest, Vol 76, Issue 13
******************************************



--
fang,
_______________________________________________
l4-hackers mailing list
l4-hackers <at> os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Ronald Aigner | 2 Sep 05:38
Picon
Favicon

Re: l4-hackers Digest, Vol 76, Issue 13

Hi,

the open_component and close_component function do get as first
parameter the sender of the invocation (see Chapter 2.3 in the Dice
manual
http://www.inf.tu-dresden.de/content/institutes/sya/os/forschung/projekte/dice/manual-3.3.0.pdf).

To get the thread ID of the server to which you want to send the
open_call or close_call, you need some name service. See
http://www.inf.tu-dresden.de/index.php?node_id=1314&ln=en and
http://www.inf.tu-dresden.de/index.php?node_id=1315&ln=en.

Cheers, Ron.

fang zhengshu wrote:
> hi all,
>  
> could someone tell me how to get the thread id when do the
> open_call()/close_call()?
> or we can get the thread id unless wo do the l4_ipc_send() operation?
>  
> I only want to get the thread id who do the open_call()/close_call()
> operation? When more than one task do the operation The server can store
> the thread id.
> 
> thank you and best wishes.
>  
>  
> On Sun, Aug 30, 2009 at 6:00 PM,
> <l4-hackers-request <at> os.inf.tu-dresden.de
> <mailto:l4-hackers-request <at> os.inf.tu-dresden.de>> wrote:
> 
>     Send l4-hackers mailing list submissions to
>            l4-hackers <at> os.inf.tu-dresden.de
>     <mailto:l4-hackers <at> os.inf.tu-dresden.de>
> 
>     To subscribe or unsubscribe via the World Wide Web, visit
>            http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
>     or, via email, send a message with subject or body 'help' to
>            l4-hackers-request <at> os.inf.tu-dresden.de
>     <mailto:l4-hackers-request <at> os.inf.tu-dresden.de>
> 
>     You can reach the person managing the list at
>            l4-hackers-owner <at> os.inf.tu-dresden.de
>     <mailto:l4-hackers-owner <at> os.inf.tu-dresden.de>
> 
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of l4-hackers digest..."
> 
> 
>     Today's Topics:
> 
>       1. Re: can server side get the thread id of client side?
>          (fang zhengshu)
> 
> 
>     ----------------------------------------------------------------------
> 
>     Message: 1
>     Date: Sun, 30 Aug 2009 02:57:16 -0400
>     From: fang zhengshu <fangzhsh07 <at> gmail.com <mailto:fangzhsh07 <at> gmail.com>>
>     To: l4-hackers <at> os.inf.tu-dresden.de
>     <mailto:l4-hackers <at> os.inf.tu-dresden.de>
>     Subject: Re: can server side get the thread id of client side?
>     Message-ID:
>            <a73d246f0908292357w7ddaed5cwdb2a3013b07020c5 <at> mail.gmail.com
>     <mailto:a73d246f0908292357w7ddaed5cwdb2a3013b07020c5 <at> mail.gmail.com>>
>     Content-Type: text/plain; charset="iso-8859-1"
> 
>     hi all,
> 
>      3. Re: can server side get the thread id of client side?
>     >      (Bj?rn D?bel)
>     > Message: 3
>     > Date: Fri, 28 Aug 2009 09:40:17 +0200
>     > From: Bj?rn D?bel <doebel <at> os.inf.tu-dresden.de
>     <mailto:doebel <at> os.inf.tu-dresden.de>>
>     > To: L4 Hackers <l4-hackers <at> os.inf.tu-dresden.de
>     <mailto:l4-hackers <at> os.inf.tu-dresden.de>>
>     > Subject: Re: can server side get the thread id of client side?
>     > Message-ID: <4A9789E1.7080503 <at> os.inf.tu-dresden.de
>     <mailto:4A9789E1.7080503 <at> os.inf.tu-dresden.de>>
>     > Content-Type: text/plain; charset=ISO-8859-1
>     >
>     > -----BEGIN PGP SIGNED MESSAGE-----
>     > Hash: SHA1
>     >
>     > Hi,
>     >
>     > > I know that the client side can get the server's thread_id throw
>     name
>     > > service. I want to ask can the server side get the client's
>     task_id or
>     > > thread_id?
>     > > or must the client side send the thread_id to server?
>     >
>     > your server will call either l4_ipc_wait() or
>     l4_ipc_reply_and_wait() in
>     > order to receive the message from the client. In both cases there is a
>     > src parameter which will contain the client's thread ID after the
>     system
>     > call returns.
>     >
>     sorry for not explaining it clearly.
>     if I defined two functions in idl file, just like:
>     interface test{
>     int open(int fd, int flags);
>     int close(fd);
>     };
> 
>      and I implement them in the server side.
>     I know that when I use open()/close() in the client side, the server
>     will
>     call the function open_component()/close_component() which are in
>     the server
>     side.
> 
>     In the open_component()/close_component() function I want to get
>     thread id
>     of the caller to do some operation flag.but as we know, when we call
>     open()/close() in client side, the open_component()/close_component()
>     function in server side will be executed. so we can not use
>     l4_ipc_wait() or
>     l4_ipc_reply_and_wait() function in the
>     open_component()/close_component()
>     function, or it will be stop and wait for a message in the function.
>     So in
>     order to get the thread id in the
>     open_component()/close_component(), when
>     or where should I use the l4_ipc_wait() or l4_ipc_reply and wait()
>      to get
>     the thread id?
> 
>     thank you!
> 
> 
> 
> 
> 
>     --
>     fang,
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20090830/8a457373/attachment-0001.html>
> 
>     ------------------------------
> 
>     _______________________________________________
>     l4-hackers mailing list
>     l4-hackers <at> os.inf.tu-dresden.de <mailto:l4-hackers <at> os.inf.tu-dresden.de>
>     http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
> 
> 
>     End of l4-hackers Digest, Vol 76, Issue 13
>     ******************************************
> 
> 
> 
> 
> -- 
> fang,
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> l4-hackers mailing list
> l4-hackers <at> os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Ding ying | 2 Sep 05:48
Picon

My problem of I/O port

Hello,everyone:
         I have built a parport server based on dde, and test it through on fiasco. Now I want to booting it together with l4linux, but there are conflict occured.
         And I have some questions to ask:
        1. I used the l4linux-2.6.30 kernel, now to booting it besides fiasco default config, there is
                [ *] Enable I/O port protection
            feature must need, isn't it?
            It not needed in l4linux-2.6.23 kernel or earlier.
        2. Will this feature prevent the other server to access to the io port?
            I seems meeting this problem, my parport server(#b) want to access the port 077a, but system say the owner is #a(l4io), even I set the parport priority higher than l4io, it also the same problem. the last error message is like follow:
           ............................... 
           server  | <6>parport0: PC-style at 0x378 [PCSPP,TRISTATE]
           server  | <6>parport0: irq 7 detected
           ROOT: Cannot send port 077a to task #0b, owner is #a
           ROOT: task B.00 at 01804299 is trying to get I/O port 077a allocated by task 0b.
           ................................
         How can I do could make the parport server run together with the l4linux, or to make it could access the port it needed?
         Any help is precious.

         Best Regards!
         ding

_______________________________________________
l4-hackers mailing list
l4-hackers <at> os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Björn Döbel | 2 Sep 11:46
Picon
Favicon

Re: My problem of I/O port


Hi,

>          And I have some questions to ask:
>         1. I used the l4linux-2.6.30 kernel, now to booting it besides
> fiasco default config, there is
>                 [ *] Enable I/O port protection
>             feature must need, isn't it?
>             It not needed in l4linux-2.6.23 kernel or earlier.

This is not a Linux feature, but one from the Fiasco kernel. You should
have it enabled by default. It basically prevents applications from
accessing I/O ports unless they are the first to access these.
Otherwise, your application needs to get them mapped (using an I/O
flexpage) from an application that has access to the IO/ ports.

>         2. Will this feature prevent the other server to access to the io
> port?
>             I seems meeting this problem, my parport server(#b) want to
> access the port 077a, but system say the owner is #a(l4io), even I set the
> parport priority higher than l4io, it also the same problem. the last error
> message is like follow:
>            ...............................
>            server  | <6>parport0: PC-style at 0x378 [PCSPP,TRISTATE]
>            server  | <6>parport0: irq 7 detected
>            ROOT: Cannot send port 077a to task #0b, owner is #a
>            ROOT: task B.00 at 01804299 is trying to get I/O port 077a
> allocated by task 0b.

What are tasks A and B? Assuming A is your parport server and B is L4IO,
then you need to call l4io_request_region() to retrieve the ports you
want to access from L4IO. As your parport server is DDE-based you can
also do this using Linux' means (request_region()).

>            ................................
>          How can I do could make the parport server run together with the
> l4linux, or to make it could access the port it needed?

I don't see where L4Linux comes into play here?

Bjoern
Guanghui, Cheng | 2 Sep 16:41
Picon

the memory overlapping problem when loading the two duplicate components

Hello:
	I try to run the same two duplicate components on top of Fiasco but there is 
an error about memory overlapping problem.
	The problem is very simple which read the value of tsc looply like this:

int main(int argc, char ** argv)
{
        l4_uint64_t val;
        //rdtscll(val);
        l4_calibrate_tsc();
        val = l4_rdtsc();
        while(1)
        {
                printf("0x%0x:%0x\n", (unsigned long)((val>>32)&0xFFFFFFFF),
                                (unsigned long)(val&0xFFFFFFFF));
                //rdtscll(val);
                val = l4_rdtsc();
                l4_sleep(2);
        }
        l4_sleep_forever();
        return 0;
}
	In the menu.lst this modules was loaded twice like this:
module  /rdtsc
module  /rdtsc
	When booting the error messsage is like this:
#09: loading "/rdtsc"
     from [034c0000-034eff24] to [01000000-01003857][01004000-01009000]
     entry at 00065060 via trampoline page code
     symbols at [0eae2000-0eae3000] (4kB), lines at [0eade000-0eae2000] (16kB)
#0a: loading "/rdtsc"
     from [034f0000-0351ff24] to [01000000-01003857]
Roottask: cannot load binary because address at 01000000 not free
  loaded module:   [034f0000-0351ff24) /rdtsc
  overlaps with:   [01000000-01004000) #09 rdtsc

	Can i configure these two rdtsc with loading different address?
											Cheng
Björn Döbel | 2 Sep 17:16
Picon
Favicon

Re: the memory overlapping problem when loading the two duplicate components


Hi Cheng,

> 	In the menu.lst this modules was loaded twice like this:
> module  /rdtsc
> module  /rdtsc

That's as expected. You statically try to put the rdtsc image into the
same physical memory area twice.

2 solutions: You can either compile the rdtsc app twice and use
different DEFAULT_RELOC settings, or use the loader to load the
application twice.

Bjoern
Guanghui, Cheng | 2 Sep 17:30
Picon

Re: the memory overlapping problem when loading the two duplicate components

On Wednesday 02 September 2009 11:16:47 pm Björn Döbel wrote:
> Hi Cheng,
>
> > 	In the menu.lst this modules was loaded twice like this:
> > module  /rdtsc
> > module  /rdtsc
>
> That's as expected. You statically try to put the rdtsc image into the
> same physical memory area twice.
>
> 2 solutions: You can either compile the rdtsc app twice and use
> different DEFAULT_RELOC settings, or use the loader to load the
> application twice.
	Thank you. I start to know what DEFAULT_RELOC is but before i ignore this 
option all the time.
						Cheng
fang zhengshu | 8 Sep 14:03
Picon

page fault:no entry in region list

hi all,
I have write a simple example in the server side:
 
struct node{
l4_threadid_t sender;
unsigned short flags;
struct node* next;
}THREADNODE, *PTHREADNODE;
 
typedef struct node{
char buffer[4096];
PTHREADNODE head;
}FF, *PFF;
 
int sender_is_in_queue(PFF ff, l4_threadid_t sender)
{
PTHREADNODE p;
p = ff->head;
while(p != NULL && !thread_equal(p->sender, sender))
{
 p = p->next;
}
if (p == NULL) return -1;
else return 0;
}
......
 
there not error when I compile the server source file, but when I run them:
__handle_pf(): L4RM: page fault: no entry in region list
 
I use objdump  command to find the error and find it was in the place:
p = ff->head;
could someone give me some advice?
 
thank you and bestwishes!
--
fang,
_______________________________________________
l4-hackers mailing list
l4-hackers <at> os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Guanghui, Cheng | 9 Sep 09:29
Picon

the __main symbol in the crt0_x.S

Hello:
	I checked the crt0_x.S in the crtx package and find something interesting. In 
the crt0_x.S the main function is named __main() but not main() normally.
	But in the normal function we still use main() but not main() i want to know 
where to address with the symbol __main() by the address of main() in the 
real application.
	I look around the crtx package, mk directory and libgendep.so unluckily i 
don't find it.
	thanks a lot.
								Cheng Guanghui
Björn Döbel | 9 Sep 10:00
Picon
Favicon

Re: page fault:no entry in region list


Hi,

if you seek help on your code, please provide

* working source code of your example
  * output of your compile run
* your Fiasco kernel configuration
* full log output
* menu.lst and if necessary loader config

Cheers,
Bjoern

Gmane