im using register based IPC operation to transfer string of more than two double word. (32 bit x 2). how IPC handle this? it's the register copy is loop twice to transfer the data or fiasco automatically copy that data to memory and send to the receiver?
-saufy --- l4-hackers-request@os.inf.tu-dresden.de wrote:
Send l4-hackers mailing list submissions to l4-hackers@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@os.inf.tu-dresden.de
You can reach the person managing the list at l4-hackers-owner@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:
- Re: Failed to create a new task (Adam
Lackorzynski) 2. Re: porting L4linux on minix3. (Adam Lackorzynski) 3. Re: Compiling Fiasco UX problems under Fedora 8 (Adam Lackorzynski) 4. Re: Compiling Fiasco UX problems under Fedora 8 (Olivier Landemarre)
----------------------------------------------------------------------
Message: 1 Date: Sun, 16 Mar 2008 22:37:39 +0100 From: Adam Lackorzynski adam@os.inf.tu-dresden.de Subject: Re: Failed to create a new task To: l4-hackers@os.inf.tu-dresden.de Message-ID: 20080316213739.GB5636@os.inf.tu-dresden.de Content-Type: text/plain; charset=iso-8859-1
Hi,
Here's a diff of your program against a version that works, with comments:
--- x.c 2008-03-16 22:30:26.000000000 +0100 +++ x.c 2008-03-16 22:30:26.000000000 +0100 @@ -3,6 +3,7 @@ #include <l4/sys/ipc.h> #include <l4/rmgr/librmgr.h> #include <l4/sigma0/sigma0.h> +#include <l4/util/util.h>
#include <stdio.h>
@@ -41,14 +42,13 @@ l4_addr_t map_area = 0x60000000; l4_addr_t base; l4_umword_t rcv_fpage;
l4_umword_t snd_fpage;
res = l4_ipc_call(SIGMA0_ID,
// thread id L4_IPC_SHORT_MSG, // send descriptor SIGMA0_REQ_FPAGE_ANY, // snd_dword0
snd_fpage, // snd_dword1
l4_fpage(0,
L4_LOG2_PAGESIZE, 0, 0).fpage, // snd_dword1 L4_IPC_MAPMSG(map_area, L4_WHOLE_ADDRESS_SPACE),// rcv_desc
base, // *rcv_dword0
&base, // *rcv_dword0 &rcv_fpage, // *rcv_dword1 timeout, &result);
Please fix compiler warnings, gcc is not issueing them just for fun. You've been giving an uninitialized value as an address to l4_ipc_call, so no wonder strange things happen.
@@ -75,26 +75,17 @@ enter_kdebug("FAILED in l4_ipc_wait: %d\n"); }
- while(1) { l4_umword_t fault_addr = rcv_dword0 &~
0x00000003; //rcv_dword0 & 0xFFFFFFFC
// mask lower bits for
(write/grant) flags? l4_umword_t rw_addr = fault_addr | 0x00000002; // mask the 2 nd lower bits to set write flags
- while(1) {
l4_snd_fpage_t fpage;
fpage.snd_base = rw_addr; // do wee need to
left shift the address???
//we can also use the function
l4_fpage(address, size, write, grant)
fpage.fpage.fp.grant = 0;
fpage.fpage.fp.write = 1;
fpage.fpage.fp.page = rw_addr;
fpage.fpage.fp.size = L4_LOG2_PAGESIZE;
//12
l4_touch_rw((void *)rw_addr, 1);
Just to make sure the memory is really available.
res = l4_ipc_reply_and_wait(src_id, //dest_id
L4_IPC_SHORT_FPAGE, //send descriptor
fpage.snd_base, //snd_dword0
fpage.fpage.fpage, //snd_dword1 - might change later to .fp
rw_addr
& L4_PAGEMASK, //snd_dword0
l4_fpage(rw_addr & L4_PAGEMASK, L4_LOG2_PAGESIZE, L4_FPAGE_RW, L4_FPAGE_MAP).fpage,
&src_id, //src_id
L4_IPC_SHORT_MSG, //rcv descriptor
&rcv_dword0, //rcv_dword0
I just aggregated the l4_fpage to the one line, more compact.
Adam
Adam adam@os.inf.tu-dresden.de Lackorzynski http://os.inf.tu-dresden.de/~adam/
Message: 2 Date: Sun, 16 Mar 2008 22:54:59 +0100 From: Adam Lackorzynski adam@os.inf.tu-dresden.de Subject: Re: porting L4linux on minix3. To: l4-hackers@os.inf.tu-dresden.de Message-ID: 20080316215459.GC5636@os.inf.tu-dresden.de Content-Type: text/plain; charset=iso-8859-1
On Thu Mar 13, 2008 at 11:26:52 +0530, Pravin wrote:
Adam Lackorzynski adam@os.inf.tu-dresden.de
wrote:
Hi,
On Mon Mar 10, 2008 at 19:52:53 +0530, Pravin
wrote:
I wanted to ask a question regarding the
procedure followed in porting
linux on L4 (L4Linux). I am exploring the possibility of porting
Linux on Minix3 on similar lines.
I'd find it more interesting to see Minix on
L4.
Well, I had not considered that possibility much
yet.
I wanted to port Linux on minix to see if minix
can work as a virtualizer
I am not very clear about the advantages of
porting minix of L4,
can you put more light on it ?
I think that L4 is much more of a virtualizer than minix but that's just my opinion.
=== message truncated ===
___________________________________________________________ Rise to the challenge for Sport Relief with Yahoo! For Good
On Fri Mar 21, 2008 at 04:12:57 +0000, muhammad saufy wrote:
im using register based IPC operation to transfer string of more than two double word. (32 bit x 2). how IPC handle this? it's the register copy is loop twice to transfer the data or fiasco automatically copy that data to memory and send to the receiver?
There are two ways: short IPC with UTCB and so-called long IPC.
Transfer with UTCBs basically works like this:
sender:
l4_msgtag_t tag = l4_msgtag(0, size, 0, 0); // max size is L4_UTCB_GENERIC_DATA_SIZE memcpy(l4_utcb_get()->values, data, size * sizeof(long)); l4_ipc_send_tag(receiver_id, L4_IPC_SHORT_MSG, dw0, dw1, tag, L4_IPC_NEVER, &dope);
receiver: l4_ipc_receive_tag(thread1_id, L4_IPC_SHORT_MSG, &d0, &d1, L4_IPC_NEVER, &dope, &tag); memcpy(store, l4_utcb_get()->values, size); // at most sizeof(utcb)
Doing long-IPC needs a few more lines but also lets you transfer up to a super-page data with one IPC. You can look up plenty of examples by looking in IDL generated code.
Adam
l4-hackers@os.inf.tu-dresden.de