[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnumach, task based TSS
From: |
Alfred M. Szmidt |
Subject: |
gnumach, task based TSS |
Date: |
Sun, 08 Jan 2006 18:04:56 +0100 |
This I assume is related to the `gnumach, task based IO ports'.
Explanation behind the changes, why etc are needed. I haven't looked
at the patch yet.
2006-01-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* iopl.c (iopl_emulate): TSS is now task-based. Fix TSS and
locking accordingly.
diff -urp gnumach-mine-4-more_ports/i386/i386at/iopl.c
gnumach-mine-5-io_per_task/i386/i386at/iopl.c
--- gnumach-mine-4-more_ports/i386/i386at/iopl.c 2006-01-02
18:45:17.000000000 +0100
+++ gnumach-mine-5-io_per_task/i386/i386at/iopl.c 2006-01-02
16:30:19.000000000 +0100
@@ -217,10 +217,15 @@ iopl_emulate(regs, opcode, io_port)
int io_port;
{
iopb_tss_t iopb;
+ task_t task;
- iopb = current_thread()->pcb->ims.io_tss;
- if (iopb == 0)
+ task = current_thread()->task;
+ task_lock(task);
+ iopb = task->machine.io_tss;
+ if (iopb == 0) {
+ task_unlock(task);
return FALSE; /* no IO mapped */
+ }
/*
* Handle outb to the timer control port,
@@ -235,11 +240,14 @@ iopl_emulate(regs, opcode, io_port)
&& (opcode == 0xe6 || opcode == 0xee) /* outb */
&& (io_byte & 0xc0) == 0x80) /* timer 2 */
{
+ task_unlock(task);
outb(io_port, io_byte);
return TRUE;
}
+ task_unlock(task);
return FALSE; /* invalid IO to port 42 */
}
+ task_unlock(task);
/*
* If the thread has the IOPL device mapped, and
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnumach, task based TSS,
Alfred M. Szmidt <=