[ros-diffs] [sir_richard] 45144: [NTOS]: Kei386EoiHelper now jumps into the C KiEoiHelper. All interrupt exit is now done through the C trap exit code. [NTOS]: The ASM KiServiceExit/KiServiceExit2 are no more. All system call exit is now done through the C trap exit code.

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Tue Jan 19 09:35:37 CET 2010


Author: sir_richard
Date: Tue Jan 19 09:35:37 2010
New Revision: 45144

URL: http://svn.reactos.org/svn/reactos?rev=45144&view=rev
Log:
[NTOS]: Kei386EoiHelper now jumps into the C KiEoiHelper. All interrupt exit is now done through the C trap exit code.
[NTOS]: The ASM KiServiceExit/KiServiceExit2 are no more. All system call exit is now done through the C trap exit code.

Modified:
    trunk/reactos/ntoskrnl/ke/i386/trap.s
    trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S

Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?rev=45144&r1=45143&r2=45144&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Tue Jan 19 09:35:37 2010
@@ -83,8 +83,6 @@
 #endif
 
 /* We implement the following trap exit points:                             */
-.globl _KiServiceExit               /* Exit from syscall                    */
-.globl _KiServiceExit2              /* Exit from syscall with complete frame*/
 .globl _Kei386EoiHelper at 0           /* Exit from interrupt or H/W trap      */
 .globl _Kei386EoiHelper2ndEntry     /* Exit from unexpected interrupt       */
 
@@ -113,36 +111,8 @@
 _IsrOverflowMsg:
     .asciz "\n*** ISR at %lx appears to have an interrupt storm\n"
 
-_KiTrapPrefixTable:
-    .byte 0xF2                      /* REP                                  */
-    .byte 0xF3                      /* REP INS/OUTS                         */
-    .byte 0x67                      /* ADDR                                 */
-    .byte 0xF0                      /* LOCK                                 */
-    .byte 0x66                      /* OP                                   */
-    .byte 0x2E                      /* SEG                                  */
-    .byte 0x3E                      /* DS                                   */
-    .byte 0x26                      /* ES                                   */
-    .byte 0x64                      /* FS                                   */
-    .byte 0x65                      /* GS                                   */
-    .byte 0x36                      /* SS                                   */
-
-_KiTrapIoTable:
-    .byte 0xE4                      /* IN                                   */
-    .byte 0xE5                      /* IN                                   */
-    .byte 0xEC                      /* IN                                   */
-    .byte 0xED                      /* IN                                   */
-    .byte 0x6C                      /* INS                                  */
-    .byte 0x6D                      /* INS                                  */
-    .byte 0xE6                      /* OUT                                  */
-    .byte 0xE7                      /* OUT                                  */
-    .byte 0xEE                      /* OUT                                  */
-    .byte 0xEF                      /* OUT                                  */
-    .byte 0x6E                      /* OUTS                                 */
-    .byte 0x6F                      /* OUTS                                 */
-
 /* SOFTWARE INTERRUPT SERVICES ***********************************************/
 .text
-
 
 .func KiSystemService
 TRAP_FIXUPS kss_a, kss_t, DoNotFixupV86, DoNotFixupAbios
@@ -282,18 +252,11 @@
     /* Restore the old trap frame pointer */
     mov edx, [ebp+KTRAP_FRAME_EDX]
     mov [ecx+KTHREAD_TRAP_FRAME], edx
-.endfunc
-
-.func KiServiceExit
-_KiServiceExit:
-    /* Disable interrupts */
-    cli
-
-    /* Check for, and deliver, User-Mode APCs if needed */
-    CHECK_FOR_APC_DELIVER 1
-
-    /* Exit and cleanup */
-    TRAP_EPILOG FromSystemCall, DoRestorePreviousMode, DoNotRestoreSegments, DoNotRestoreVolatiles, DoRestoreEverything
+    
+    /* Exit the system call */
+    mov ecx, ebp
+    mov edx, eax
+    jmp @KiServiceExit at 8
 .endfunc
 
 KiBBTUnexpectedRange:
@@ -418,56 +381,12 @@
     ret
 #endif
 
-.func KiServiceExit2
-_KiServiceExit2:
-
-    /* Disable interrupts */
-    cli
-
-    /* Check for, and deliver, User-Mode APCs if needed */
-    CHECK_FOR_APC_DELIVER 0
-
-    /* Exit and cleanup */
-    TRAP_EPILOG NotFromSystemCall, DoRestorePreviousMode, DoRestoreSegments, DoRestoreVolatiles, DoNotRestoreEverything
-.endfunc
-
 .func Kei386EoiHelper at 0
 _Kei386EoiHelper at 0:
-
-    /* Disable interrupts */
-    cli
-
-    /* Check for, and deliver, User-Mode APCs if needed */
-    CHECK_FOR_APC_DELIVER 0
-
-    /* Exit and cleanup */
-_Kei386EoiHelper2ndEntry:
-    TRAP_EPILOG NotFromSystemCall, DoNotRestorePreviousMode, DoRestoreSegments, DoRestoreVolatiles, DoNotRestoreEverything
-.endfunc
-
-V86_Exit:
-    /* Move to EDX position */
-    add esp, KTRAP_FRAME_EDX
-
-    /* Restore volatiles */
-    pop edx
-    pop ecx
-    pop eax
-
-    /* Move to non-volatiles */
-    lea esp, [ebp+KTRAP_FRAME_EDI]
-    pop edi
-    pop esi
-    pop ebx
-    pop ebp
-
-    /* Skip error code and return */
-    add esp, 4
-    iret
-
-AbiosExit:
-    /* FIXME: TODO */
-    UNHANDLED_PATH "ABIOS Exit"
+    /* Call the C EOI Helper */
+    mov ecx, esp
+    jmp @KiEoiHelper at 4
+.endfunc
 
 GENERATE_TRAP_HANDLER KiGetTickCount, 1
 GENERATE_TRAP_HANDLER KiCallbackReturn, 1        
@@ -549,7 +468,7 @@
 
     /* Spurious, ignore it */
     add esp, 8
-    jmp _Kei386EoiHelper2ndEntry
+    jmp _Kei386EoiHelper at 0
 
 Handled:
     /* Unexpected interrupt, print a message on debug builds */

Modified: trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S?rev=45144&r1=45143&r2=45144&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S [iso-8859-1] Tue Jan 19 09:35:37 2010
@@ -204,7 +204,8 @@
     SET_TF_DEBUG_HEADER
 
     /* Exit to user-mode */
-    jmp _KiServiceExit
+    mov ecx, esp
+    jmp @KiServiceExit at 8
 
 SaveDebug:
 




More information about the Ros-diffs mailing list