mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:53:36 +00:00
- Fix some bugs in LDT switch (EDI->EBP)
- Turn simple bugcheck into BugCheckEx with information that the helpfile says it should have. svn path=/trunk/; revision=24183
This commit is contained in:
parent
8de07ee7b4
commit
63da586075
1 changed files with 12 additions and 5 deletions
|
@ -305,14 +305,14 @@ GetSwapLock:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Increase context switches (use ES for lazy load) */
|
/* Increase context switches (use ES for lazy load) */
|
||||||
//inc dword ptr es:[ebx+KPCR_CONTEXT_SWITCHES]
|
inc dword ptr es:[ebx+KPCR_CONTEXT_SWITCHES]
|
||||||
|
|
||||||
/* Save the Exception list */
|
/* Save the Exception list */
|
||||||
push [ebx+KPCR_EXCEPTION_LIST]
|
push [ebx+KPCR_EXCEPTION_LIST]
|
||||||
|
|
||||||
/* Check for WMI */
|
/* Check for WMI */
|
||||||
cmp dword ptr [ebx+KPCR_PERF_GLOBAL_GROUP_MASK], 0
|
cmp dword ptr [ebx+KPCR_PERF_GLOBAL_GROUP_MASK], 0
|
||||||
//jnz WmiTrace
|
jnz WmiTrace
|
||||||
|
|
||||||
AfterTrace:
|
AfterTrace:
|
||||||
/* Update kernel stack */
|
/* Update kernel stack */
|
||||||
|
@ -419,14 +419,14 @@ ApcReturn:
|
||||||
|
|
||||||
LdtReload:
|
LdtReload:
|
||||||
/* Check if it's empty */
|
/* Check if it's empty */
|
||||||
mov eax, [edi+KPROCESS_LDT_DESCRIPTOR0]
|
mov eax, [ebp+KPROCESS_LDT_DESCRIPTOR0]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz LoadLdt
|
jz LoadLdt
|
||||||
|
|
||||||
/* Write the LDT Selector */
|
/* Write the LDT Selector */
|
||||||
mov ecx, [ebx+KPCR_GDT]
|
mov ecx, [ebx+KPCR_GDT]
|
||||||
mov [ecx+KGDT_LDT], eax
|
mov [ecx+KGDT_LDT], eax
|
||||||
mov eax, [edi+KPROCESS_LDT_DESCRIPTOR1]
|
mov eax, [ebp+KPROCESS_LDT_DESCRIPTOR1]
|
||||||
mov [ecx+KGDT_LDT+4], eax
|
mov [ecx+KGDT_LDT+4], eax
|
||||||
|
|
||||||
/* Write the INT21 handler */
|
/* Write the INT21 handler */
|
||||||
|
@ -452,8 +452,15 @@ WmiTrace:
|
||||||
jmp AfterTrace
|
jmp AfterTrace
|
||||||
|
|
||||||
BugCheckDpc:
|
BugCheckDpc:
|
||||||
|
|
||||||
|
/* Bugcheck the machine, printing out the threads being switched */
|
||||||
|
mov eax, [edi+KTHREAD_INITIAL_STACK]
|
||||||
|
push 0
|
||||||
|
push eax
|
||||||
|
push esi
|
||||||
|
push edi
|
||||||
push ATTEMPTED_SWITCH_FROM_DPC
|
push ATTEMPTED_SWITCH_FROM_DPC
|
||||||
call _KeBugCheck@4
|
call _KeBugCheckEx@20
|
||||||
.endfunc
|
.endfunc
|
||||||
|
|
||||||
/*++
|
/*++
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue