mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Don't save and restore previous mode in trap handlers. This allows us to call KeGetPreviousMode() from exception handlers and get the right value.
svn path=/trunk/; revision=17074
This commit is contained in:
parent
957a1ac6da
commit
e86cc8cec8
1 changed files with 1 additions and 13 deletions
|
@ -45,13 +45,8 @@ _KiTrapRet:
|
||||||
popl %edx
|
popl %edx
|
||||||
popl %ecx
|
popl %ecx
|
||||||
popl %eax
|
popl %eax
|
||||||
|
|
||||||
/* Restore the old previous mode */
|
|
||||||
popl %ebx
|
popl %ebx
|
||||||
cmpl $0, %esi
|
|
||||||
je .L7
|
|
||||||
movb %bl, %ss:KTHREAD_PREVIOUS_MODE(%esi)
|
|
||||||
.L7:
|
|
||||||
/* Restore the old exception handler list */
|
/* Restore the old exception handler list */
|
||||||
popl %ebx
|
popl %ebx
|
||||||
movl %ebx, %fs:KPCR_EXCEPTION_LIST
|
movl %ebx, %fs:KPCR_EXCEPTION_LIST
|
||||||
|
@ -140,13 +135,6 @@ _KiTrapProlog2:
|
||||||
/* Set the new previous mode based on the saved CS selector */
|
/* Set the new previous mode based on the saved CS selector */
|
||||||
movl KTRAP_FRAME_CS(%ebp), %eax
|
movl KTRAP_FRAME_CS(%ebp), %eax
|
||||||
andl $0x0000FFFF, %eax
|
andl $0x0000FFFF, %eax
|
||||||
cmpl $KERNEL_CS, %eax
|
|
||||||
jne .L1
|
|
||||||
movb $KernelMode, KTHREAD_PREVIOUS_MODE(%edi)
|
|
||||||
jmp .L3
|
|
||||||
.L1:
|
|
||||||
movb $UserMode, KTHREAD_PREVIOUS_MODE(%edi)
|
|
||||||
.L3:
|
|
||||||
|
|
||||||
/* Save the old trap frame. */
|
/* Save the old trap frame. */
|
||||||
movl KTHREAD_TRAP_FRAME(%edi), %edx
|
movl KTHREAD_TRAP_FRAME(%edi), %edx
|
||||||
|
|
Loading…
Reference in a new issue