mirror of
https://github.com/drasko/codezero.git
synced 2026-01-14 20:03:16 +01:00
New UTCB implementation almost working.
- KIP's pointer to UTCB seems to work with existing l4lib ipc functions. - Works up to clone() - In clone we mmap() the same UTCB on each new thread - excessive. - Generally during page fault handling, cloned threads may fault on the same page multiple times even though a single handling would be enough for all of them. Need to detect and handle this.
This commit is contained in:
@@ -20,8 +20,7 @@ struct exregs_data {
|
||||
u32 valid_vect;
|
||||
u32 flags;
|
||||
l4id_t pagerid;
|
||||
unsigned long utcb_phys;
|
||||
unsigned long utcb_virt;
|
||||
unsigned long utcb_address;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -72,8 +72,7 @@ struct ktcb {
|
||||
struct list_head task_list; /* Global task list. */
|
||||
|
||||
/* UTCB related, see utcb.txt in docs */
|
||||
unsigned long utcb_virt; /* Virtual ref to task's utcb area */
|
||||
unsigned long utcb_phys; /* Physical ref to task's utcb area */
|
||||
unsigned long utcb_address; /* Virtual ref to task's utcb area */
|
||||
|
||||
/* Thread times */
|
||||
u32 kernel_time; /* Ticks spent in kernel */
|
||||
@@ -151,5 +150,7 @@ extern struct id_pool *thread_id_pool;
|
||||
extern struct id_pool *space_id_pool;
|
||||
extern struct id_pool *tgroup_id_pool;
|
||||
|
||||
void task_update_utcb(struct ktcb *cur, struct ktcb *next);
|
||||
|
||||
#endif /* __TCB_H__ */
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define UTCB_AREA_START 0xF8000000
|
||||
#define UTCB_AREA_END 0xF9000000
|
||||
#define UTCB_AREA_SIZE (UTCB_AREA_END - UTCB_AREA_START)
|
||||
#define UTCB_AREA_SECTIONS (UTCB_AREA_SIZE / ARM_SECTION_SIZE)
|
||||
#define UTCB_SIZE (sizeof(int) * 64)
|
||||
|
||||
#define IO_AREA_START 0xF9000000
|
||||
#define IO_AREA_END 0xFF000000
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
#ifndef __GLUE_ARM_MESSAGE_H__
|
||||
#define __GLUE_ARM_MESSAGE_H__
|
||||
|
||||
#define MR_REST 56
|
||||
#include INC_GLUE(memlayout.h)
|
||||
|
||||
#define MR_REST (UTCB_SIZE - MR_TOTAL - 2) /* -2 is for fields on utcb */
|
||||
#define MR_TOTAL 6
|
||||
#define MR_TAG 0 /* Contains the purpose of message */
|
||||
#define MR_SENDER 1 /* For anythread receivers to discover sender */
|
||||
|
||||
Reference in New Issue
Block a user