Ongoing work for adding per-thread UTCB structures.

Added setting of utcb address to l4_thread_control.
This is going to be moved to exchange_registers() since we need to pass
both the utcb physical and virtual address and exregs fits such context
modification better than thread_control.
This commit is contained in:
Bahadir Balban
2009-04-29 16:53:04 +03:00
parent 54a9b2901d
commit 7a81db8782
35 changed files with 424 additions and 72 deletions

View File

@@ -18,6 +18,7 @@
#include <test.h>
#include <boot.h>
/* A separate list than the generic file list that keeps just the boot files */
LIST_HEAD(boot_file_list);

27
tasks/mm0/src/utcb.c Normal file
View File

@@ -0,0 +1,27 @@
/*
* Management of task utcb regions and own utcb.
*
* Copyright (C) 2007-2009 Bahadir Bilgehan Balban
*/
#include <l4lib/arch/utcb.h>
#include <l4/macros.h>
/*
* UTCB management in Codezero:
*
* 1.) Every task in the system defines an array of utcbs in a special .utcb
* section that is page-aligned and to be kept wired in by the pager.
* 2.) The region marks are written to bootdesc structure at compile-time.
* 3.) Pager reads the bootdesc struct from the microkernel during init.
* 4.) Pager initialises structures to alloc/dealloc new utcbs for every address
* space.
* 5.) Pagers dynamically allocate utcb addresses as each thread is created
* via a thread_control() system call.
* 6.) Each thread in an address space learns their utcb address from a
* well-defined KIP offset. This is updated as each thread becomes runnable.
*/