Removed special-case utcb shared page from posix services.

Previously a so-called utcb shared page was used for transfering
data between posix services. This was a special shmat/get/dt case
allocating from its own virtual pool. Now the term utcb is renamed
as a shared page and integrated with the shm* handling routines.

Generic l4 threads will use long-ipc and not this method. Posix
services will continue to communicate on a shared page for now.
	modified:   tasks/libl4/include/l4lib/ipcdefs.h
	modified:   tasks/libl4/src/init.c
	new file:   tasks/libposix/init.c
	modified:   tasks/mm0/include/shm.h
	modified:   tasks/mm0/include/task.h
	deleted:    tasks/mm0/include/utcb.h
	modified:   tasks/mm0/main.c
	modified:   tasks/mm0/src/boot.c
	modified:   tasks/mm0/src/clone.c
	modified:   tasks/mm0/src/execve.c
	modified:   tasks/mm0/src/exit.c
	modified:   tasks/mm0/src/init.c
	modified:   tasks/mm0/src/shm.c
	modified:   tasks/mm0/src/task.c
	deleted:    tasks/mm0/src/utcb.c
	deleted:    tools/l4-qemu
This commit is contained in:
Bahadir Balban
2009-04-22 11:58:58 +03:00
parent 8d82fa5f5e
commit 203f053878
16 changed files with 209 additions and 268 deletions

View File

@@ -47,4 +47,25 @@ void *shmat_shmget_internal(struct tcb *task, key_t key, void *shmaddr);
struct vm_file *shm_new(key_t key, unsigned long npages);
void *shm_new_address(int npages);
/* Below is the special-case per-task default shared memory page prototypes */
/* Prefaults shared page after mapping */
#define SHPAGE_PREFAULT (1 << 0)
/* Creates new shm segment for default shpage */
#define SHPAGE_NEW_SHM (1 << 1)
/* Allocates a virtual address for default shpage */
#define SHPAGE_NEW_ADDRESS (1 << 2)
/* IPC to send utcb address information to tasks */
void *task_send_shpage_address(struct tcb *sender, l4id_t taskid);
int shpage_map_to_task(struct tcb *owner, struct tcb *mapper, unsigned int flags);
int shpage_unmap_from_task(struct tcb *owner, struct tcb *mapper);
/* Prefault a *mmaped* default shared page */
int shpage_prefault(struct tcb *task, unsigned int vmflags);
#endif /* __SHM_H__ */

View File

@@ -26,7 +26,7 @@
/* POSIX minimum is 4Kb */
#define DEFAULT_ENV_SIZE SZ_4K
#define DEFAULT_STACK_SIZE SZ_32K
#define DEFAULT_UTCB_SIZE PAGE_SIZE
#define DEFAULT_SHPAGE_SIZE PAGE_SIZE
#define TCB_NO_SHARING 0
#define TCB_SHARED_VM (1 << 0)
@@ -101,8 +101,8 @@ struct tcb {
unsigned long map_start;
unsigned long map_end;
/* UTCB information */
void *utcb;
/* Default ipc-shared-page information */
void *shared_page;
/* Virtual memory areas */
struct task_vma_head *vm_area_head;

View File

@@ -1,24 +0,0 @@
#ifndef __MM0_UTCB_H__
#define __MM0_UTCB_H__
#include <l4lib/types.h>
#include <task.h>
#define UTCB_PREFAULT (1 << 0) /* Prefaults utcb pages after mapping */
#define UTCB_NEW_SHM (1 << 1) /* Creates a new shm segment for utcb */
#define UTCB_NEW_ADDRESS (1 << 2) /* Allocates a virtual address for utcb */
int utcb_pool_init(void);
void *utcb_new_address(void);
int utcb_delete_address(void *utcb_addr);
/* IPC to send utcb address information to tasks */
void *task_send_utcb_address(struct tcb *sender, l4id_t taskid);
int utcb_map_to_task(struct tcb *owner, struct tcb *mapper, unsigned int flags);
int utcb_unmap_from_task(struct tcb *owner, struct tcb *mapper);
/* Prefault an *mmaped* utcb */
int utcb_prefault(struct tcb *task, unsigned int vmflags);
#endif