[RFC 3/6] Invalidate IO permission bitmap.

Jan Klötzke <[email protected]> Tue, 29 Apr 2008 00:45:56 +0200
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
The IO permission bitmap is always checked for virtual 8086 mode tasks.
Make sure it is invalid.
---
 src/system/kernel/arch/x86/arch_cpu.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/system/kernel/arch/x86/arch_cpu.c b/src/system/kernel/arch/x86/arch_cpu.c
index ad5d253..f1981a2 100644
--- a/src/system/kernel/arch/x86/arch_cpu.c
+++ b/src/system/kernel/arch/x86/arch_cpu.c
@@ -229,6 +229,7 @@ init_double_fault(int cpuNum)
 	tss->fs = KERNEL_DATA_SEG;
 	tss->gs = KERNEL_DATA_SEG;
 	tss->ldt_seg_selector = 0;
+	tss->io_map_base = sizeof(struct tss);
 
 	// add TSS descriptor for this new TSS
 	set_tss_descriptor(&gGDT[DOUBLE_FAULT_TSS_BASE_SEGMENT + cpuNum],
@@ -501,6 +502,7 @@ arch_cpu_init_post_vm(kernel_args *args)
 		// structure
 		memset(&gCPU[i].arch.tss, 0, sizeof(struct tss));
 		gCPU[i].arch.tss.ss0 = KERNEL_DATA_SEG;
+		gCPU[i].arch.tss.io_map_base = sizeof(struct tss);
 
 		// add TSS descriptor for this new TSS
 		set_tss_descriptor(&gGDT[TSS_BASE_SEGMENT + i],
-- 
1.5.4.2


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone