Commit in reactos/ntoskrnl on MAIN
include/internal/i386/ke.h+11.14 -> 1.15
ke/i386/irqhand.s+65-11.6 -> 1.7
       /irq.c+4-11.49 -> 1.50
+70-2
3 modified files
- Save/initialize/restore the gs register on interrupt begin/return.

reactos/ntoskrnl/include/internal/i386
ke.h 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- ke.h	24 Oct 2004 11:59:27 -0000	1.14
+++ ke.h	31 Oct 2004 12:49:36 -0000	1.15
@@ -138,6 +138,7 @@
 typedef struct _KIRQ_TRAPFRAME
 {
    ULONG Magic;
+   ULONG Gs;
    ULONG Fs;
    ULONG Es;
    ULONG Ds;

reactos/ntoskrnl/ke/i386
irqhand.s 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- irqhand.s	8 Sep 2002 10:23:29 -0000	1.6
+++ irqhand.s	31 Oct 2004 12:49:37 -0000	1.7
@@ -3,15 +3,18 @@
 
 .global _irq_handler_0
 _irq_handler_0:
+	cld
 	pusha
-        pushl	%ds
+	pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs
         pushl	%esp
@@ -20,6 +23,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -28,15 +32,18 @@
 
 .global _irq_handler_1
 _irq_handler_1: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -45,6 +52,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -53,15 +61,18 @@
 	
 .global _irq_handler_2
 _irq_handler_2: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -70,6 +81,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -78,15 +90,18 @@
 	
 .global _irq_handler_3
 _irq_handler_3: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -95,6 +110,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -103,15 +119,18 @@
 	
 .global _irq_handler_4
 _irq_handler_4: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -120,6 +139,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -128,15 +148,18 @@
 	
 .global _irq_handler_5
 _irq_handler_5: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -145,6 +168,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -153,15 +177,18 @@
 	
 .global _irq_handler_6
 _irq_handler_6: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl   %gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -170,6 +197,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -178,15 +206,18 @@
 	
 .global _irq_handler_7
 _irq_handler_7: 
+	cld
 	pusha
         pushl	%ds
         pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -195,6 +226,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -203,15 +235,18 @@
 		
 .global _irq_handler_8
 _irq_handler_8:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -220,6 +255,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -228,15 +264,18 @@
 
 .global _irq_handler_9
 _irq_handler_9:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -245,6 +284,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -253,15 +293,18 @@
 	
 .global _irq_handler_10
 _irq_handler_10:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -270,6 +313,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -278,15 +322,18 @@
 	
 .global _irq_handler_11
 _irq_handler_11:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -295,6 +342,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -303,15 +351,18 @@
 	
 .global _irq_handler_12
 _irq_handler_12:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -320,6 +371,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -328,15 +380,18 @@
 	
 .global _irq_handler_13
 _irq_handler_13:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -345,6 +400,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -353,15 +409,18 @@
 	
 .global _irq_handler_14
 _irq_handler_14:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -370,6 +429,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds
@@ -378,15 +438,18 @@
 	
 .global _irq_handler_15
 _irq_handler_15:
+	cld
         pusha
 	pushl	%ds
 	pushl	%es
         pushl	%fs
+        pushl	%gs
         movl	$0xceafbeef,%eax
         pushl	%eax
         movw	$KERNEL_DS,%ax
         movw	%ax,%ds
         movw	%ax,%es
+        movw	%ax,%gs
 	movl	$PCR_SELECTOR, %eax
 	movl	%eax, %fs	
         pushl	%esp
@@ -395,6 +458,7 @@
         popl	%eax
         popl	%eax
         popl	%eax
+        popl	%gs
         popl	%fs
         popl	%es
         popl	%ds

reactos/ntoskrnl/ke/i386
irq.c 1.49 -> 1.50
diff -u -r1.49 -r1.50
--- irq.c	30 Oct 2004 23:48:56 -0000	1.49
+++ irq.c	31 Oct 2004 12:49:37 -0000	1.50
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: irq.c,v 1.49 2004/10/30 23:48:56 navaraf Exp $
+/* $Id: irq.c,v 1.50 2004/10/31 12:49:37 hbirr Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/ke/i386/irq.c
@@ -82,6 +82,7 @@
   "movl	$" STR(KERNEL_DS) ",%eax\n\t" \
   "movl	%eax,%ds\n\t" \
   "movl	%eax,%es\n\t" \
+  "movl %eax,%gs\n\t" \
   "movl	$" STR(PCR_SELECTOR) ",%eax\n\t" \
   "movl	%eax,%fs\n\t" \
   "pushl %esp\n\t" \
@@ -250,6 +251,7 @@
 KeIRQTrapFrameToTrapFrame(PKIRQ_TRAPFRAME IrqTrapFrame,
   PKTRAP_FRAME TrapFrame)
 {
+   TrapFrame->Gs     = (USHORT)IrqTrapFrame->Gs;
    TrapFrame->Fs     = (USHORT)IrqTrapFrame->Fs;
    TrapFrame->Es     = (USHORT)IrqTrapFrame->Es;
    TrapFrame->Ds     = (USHORT)IrqTrapFrame->Ds;
@@ -270,6 +272,7 @@
 KeTrapFrameToIRQTrapFrame(PKTRAP_FRAME TrapFrame,
   PKIRQ_TRAPFRAME IrqTrapFrame)
 {
+   IrqTrapFrame->Gs     = TrapFrame->Gs;
    IrqTrapFrame->Fs     = TrapFrame->Fs;
    IrqTrapFrame->Es     = TrapFrame->Es;
    IrqTrapFrame->Ds     = TrapFrame->Ds;
CVSspam 0.2.8