mirror of
https://github.com/drasko/codezero.git
synced 2026-02-04 06:03:12 +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:
@@ -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
27
tasks/mm0/src/utcb.c
Normal 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user