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:
Bahadir Balban
2009-05-01 10:11:47 +03:00
parent 7a81db8782
commit cada0f8f18
31 changed files with 297 additions and 188 deletions

View File

@@ -31,11 +31,9 @@ void exregs_set_pager(struct exregs_data *s, l4id_t pagerid)
s->flags |= EXREGS_SET_PAGER;
}
void exregs_set_utcb(struct exregs_data *s, unsigned long phys,
unsigned long virt)
void exregs_set_utcb(struct exregs_data *s, unsigned long virt)
{
s->utcb_phys = phys;
s->utcb_virt = virt;
s->utcb_address = virt;
s->flags |= EXREGS_SET_UTCB;
}

View File

@@ -19,7 +19,8 @@
/* New macro does double dereference */
.macro utcb_address rx
ldr \rx, =kip_utcb_ref @ First get pointer to utcb pointer in KIP
ldr \rx, [\rx] @ Get UTCB address from UTCB pointer in KIP
ldr \rx, [\rx] @ Get pointer to UTCB address from UTCB pointer in KIP
ldr \rx, [\rx] @ Get the utcb address
.endm
BEGIN_PROC(l4_thread_switch)