mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[NTOS]
- Always initialize TrapFrame segment selectors in KiEnterTrap, because further C code relies on at least TrapFrame->SegFs being correct. Running Arwinss on VirtualBox exposed this bug. I wouldn't find solution for this bug without Timo's great help! svn path=/trunk/; revision=50095
This commit is contained in:
@@ -135,7 +135,17 @@ MACRO(KiEnterTrap, Flags)
|
||||
endif
|
||||
|
||||
/* Save segment registers? */
|
||||
if (NOT (Flags AND KI_DONT_SAVE_SEGS))
|
||||
if (Flags AND KI_DONT_SAVE_SEGS)
|
||||
|
||||
/* Initialize TrapFrame segment registers with sane values */
|
||||
mov eax, 0x23
|
||||
mov ecx, fs
|
||||
mov [esp - FrameSize + KTRAP_FRAME_DS], eax
|
||||
mov [esp - FrameSize + KTRAP_FRAME_ES], eax
|
||||
mov [esp - FrameSize + KTRAP_FRAME_FS], ecx
|
||||
mov dword ptr [esp - FrameSize + KTRAP_FRAME_GS], 0
|
||||
|
||||
else
|
||||
|
||||
/* Check for V86 mode */
|
||||
test byte ptr [esp + KTRAP_FRAME_EFLAGS + 2], (EFLAGS_V86_MASK / HEX(10000))
|
||||
|
||||
Reference in New Issue
Block a user