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

@@ -1,7 +1,7 @@
/*
* Initialise system call offsets.
* Initialise system call offsets and utcb reference.
*
* Copyright (C) 2007, 2008 Bahadir Balban
* Copyright (C) 2007-2009 Bahadir Bilgehan Balban
*/
#include <l4lib/kip.h>
#include <l4lib/arch/syslib.h>
@@ -27,16 +27,20 @@ __l4_time_t __l4_time = 0;
struct kip *kip;
/*
* Private UTCB of this task. Used only for pushing/reading ipc
* message registers.
* Reference to private UTCB of this thread.
* Used only for pushing/reading ipc message registers.
*/
struct utcb utcb;
struct utcb **kip_utcb_ref;
void __l4_init(void)
{
/* Kernel interface page */
kip = l4_kernel_interface(0, 0, 0);
/* Reference to utcb field of KIP */
kip_utcb_ref = (struct utcb **)&kip->utcb;
__l4_ipc = (__l4_ipc_t)kip->ipc;
__l4_map = (__l4_map_t)kip->map;
__l4_unmap = (__l4_unmap_t)kip->unmap;