Modifications towards full ipc

- Added a full ipc send/recv test
- Removed non-zero value checking in r2 for ipc that was there
  to catch inadvertent full ipc calls.
- Added correct hanlding for read/write mrs for current status of utcb.

TODO:
- Add mapping of every utcb to every task for privileged access so that
  the kernel can access every utcb without switching spaces.
- Removal of same mappings
- Upon thread creation need to copy page tables accordingly i.e.
  each task will have its own utcb mapped with USER access, but every
  other utcb as kernel access only. Need to handle this case upon page
  table copying.
This commit is contained in:
Bahadir Balban
2009-05-17 20:49:13 +03:00
parent 93368447f9
commit 40e088b042
12 changed files with 86 additions and 15 deletions

View File

@@ -146,6 +146,19 @@ static inline int l4_receive_full(l4id_t from)
return l4_ipc(L4_NILTHREAD, from, L4_IPC_FLAGS_FULL);
}
static inline int l4_sendrecv_full(l4id_t to, l4id_t from, unsigned int tag)
{
int err;
BUG_ON(to == L4_NILTHREAD || from == L4_NILTHREAD);
l4_set_tag(tag);
printf("%s: to %d from %d tag %u\n", __FUNCTION__, to, from, tag);
err = l4_ipc(to, from, L4_IPC_FLAGS_FULL);
return err;
}
static inline int l4_send_extended(l4id_t to, unsigned int tag,
unsigned int size, void *buf)
{

View File

@@ -52,12 +52,18 @@ static inline struct utcb *l4_get_utcb()
/* Functions to read/write utcb registers */
static inline unsigned int read_mr(int offset)
{
return l4_get_utcb()->mr[offset];
if (offset < MR_TOTAL)
return l4_get_utcb()->mr[offset];
else
return l4_get_utcb()->mr_rest[offset - MR_TOTAL];
}
static inline void write_mr(unsigned int offset, unsigned int val)
{
l4_get_utcb()->mr[offset] = val;
if (offset < MR_TOTAL)
l4_get_utcb()->mr[offset] = val;
else
l4_get_utcb()->mr[offset - MR_TOTAL] = val;
}
#endif /* !__ASSEMBLY__ */

View File

@@ -17,6 +17,7 @@
/*** IPC Tags used between server tasks ***/
/* For ping ponging */
#define L4_IPC_TAG_SYNC_FULL 2
#define L4_IPC_TAG_SYNC 3
/* To obtain default shared page address */