mirror of
https://github.com/drasko/codezero.git
synced 2026-01-28 02:33:18 +01:00
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:
@@ -11,6 +11,7 @@
|
||||
#include INC_GLUE(memlayout.h)
|
||||
#include <l4/lib/list.h>
|
||||
#include <l4lib/arch/types.h>
|
||||
#include <l4lib/arch/syscalls.h>
|
||||
#include <l4lib/utcb.h>
|
||||
#include <lib/addr.h>
|
||||
#include <l4/api/kip.h>
|
||||
@@ -53,6 +54,20 @@ struct task_vma_head {
|
||||
int tcb_refs;
|
||||
};
|
||||
|
||||
/*
|
||||
* TLS and UTCB bookkeeping:
|
||||
*
|
||||
* This structure is shared among threads whose utcbs are on the same
|
||||
* physical page. Threads with utcbs on different physical pages have
|
||||
* their own utcb_data structure, even though they are in the same
|
||||
* address space, and share their vm_area_list structure.
|
||||
*/
|
||||
struct utcb_data {
|
||||
unsigned long phys; /* Physical utcb address */
|
||||
unsigned long virt; /* Virtual utcb address */
|
||||
u32 bit; /* Bitvector of free utcb slots on page */
|
||||
struct page *p; /* Physical page */
|
||||
};
|
||||
|
||||
/* Stores all task information that can be kept in userspace. */
|
||||
struct tcb {
|
||||
@@ -104,6 +119,9 @@ struct tcb {
|
||||
/* Default ipc-shared-page information */
|
||||
void *shared_page;
|
||||
|
||||
/* Task's utcb data */
|
||||
struct utcb_data *utcb;
|
||||
|
||||
/* Virtual memory areas */
|
||||
struct task_vma_head *vm_area_head;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user