Author: sginsberg Date: Fri Aug 22 09:55:20 2008 New Revision: 35531
URL: http://svn.reactos.org/svn/reactos?rev=35531&view=rev Log: - Replace more magic values with symbolic constants - Fix a peculiar header duplication
Modified: trunk/reactos/ntoskrnl/include/internal/i386/v86m.h trunk/reactos/ntoskrnl/ke/i386/v86m_sup.S
Modified: trunk/reactos/ntoskrnl/include/internal/i386/v86m.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/v86m.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/v86m.h [iso-8859-1] Fri Aug 22 09:55:20 2008 @@ -59,68 +59,3 @@ } KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME;
#endif - -/* EOF */ -#ifndef __V86M_ -#define __V86M_ - -#include "ketypes.h" - -/* Emulate cli/sti instructions */ -#define KV86M_EMULATE_CLI_STI (0x1) -/* Allow the v86 mode code to access i/o ports */ -#define KV86M_ALLOW_IO_PORT_ACCESS (0x2) - -typedef struct _KV86M_REGISTERS -{ - /* - * General purpose registers - */ - ULONG Ebp; - ULONG Edi; - ULONG Esi; - ULONG Edx; - ULONG Ecx; - ULONG Ebx; - ULONG Eax; - ULONG Ds; - ULONG Es; - ULONG Fs; - ULONG Gs; - - /* - * Control registers - */ - ULONG Eip; - ULONG Cs; - ULONG Eflags; - ULONG Esp; - ULONG Ss; - - /* - * Control structures - */ - ULONG RecoveryAddress; - UCHAR RecoveryInstruction[4]; - ULONG Vif; - ULONG Flags; - PNTSTATUS PStatus; -} KV86M_REGISTERS, *PKV86M_REGISTERS; - -typedef struct _KV86M_TRAP_FRAME -{ - KTRAP_FRAME Tf; - - ULONG SavedExceptionStack; - - /* - * These are put on the top of the stack by the routine that entered - * v86 mode so the exception handlers can find the control information - */ - struct _KV86M_REGISTERS* regs; - ULONG orig_ebp; -} KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME; - -#endif - -/* EOF */
Modified: trunk/reactos/ntoskrnl/ke/i386/v86m_sup.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/v86m_sup.S... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/v86m_sup.S [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/v86m_sup.S [iso-8859-1] Fri Aug 22 09:55:20 2008 @@ -203,7 +203,7 @@ _OpcodePUSHFV86:
/* Get VDM state */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT mov eax, [eax]
/* Get EFLAGS and mask out IF */ @@ -211,7 +211,7 @@ and eax, ~EFLAGS_INTERRUPT_MASK
/* Mask align check and interrupt mask */ - and eax, EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK + and eax, EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK or eax, edx
/* Add IOPL Mask */ @@ -252,7 +252,7 @@ _OpcodePOPFV86:
/* Get VDM state */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT
/* Get flat ESP */ mov ecx, [ebp+KTRAP_FRAME_SS] @@ -279,8 +279,8 @@ /* Mask out EFLAGS */ and eax, ~EFLAGS_IOPL mov ebx, ebx - and ebx, ~0x4000 - and ecx, EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK + and ebx, ~EFLAGS_NESTED_TASK + and ecx, EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK
/* FIXME: Support VME */
@@ -314,7 +314,7 @@ pop eax
/* Update the flags in the VDM State */ - LOCK and dword ptr [eax], ~(EFLAGS_ALIGN_CHECK + 0x4000 + EFLAGS_INTERRUPT_MASK) + LOCK and dword ptr [eax], ~(EFLAGS_ALIGN_CHECK + EFLAGS_NESTED_TASK + EFLAGS_INTERRUPT_MASK) LOCK or [eax], ecx
/* Update EIP */ @@ -334,7 +334,7 @@ mov edx, [ebp+KTRAP_FRAME_EFLAGS]
/* Remove the flag in the VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT mov ecx, [eax] LOCK and dword ptr [eax], ~EFLAGS_INTERRUPT_MASK
@@ -349,7 +349,7 @@
/* Now mask out VIF and TF */ or eax, ecx - and edx, ~(EFLAGS_VIF + 0x4000 + EFLAGS_TF) + and edx, ~(EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_TF) mov [ebp+KTRAP_FRAME_EFLAGS], edx
/* Set the IOPL Mask */ @@ -422,7 +422,7 @@ _OpcodeIRETV86:
/* Get the VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT
/* Get flat ESP */ movzx ecx, word ptr [ebp+KTRAP_FRAME_SS] @@ -450,7 +450,7 @@ MaskEFlags:
/* Mask out EFLAGS */ - and ebx, ~(EFLAGS_IOPL + EFLAGS_VIF + 0x4000 + EFLAGS_VIP) + and ebx, ~(EFLAGS_IOPL + EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_VIP) mov ecx, ebx
/* FIXME: Check for VME support */ @@ -595,7 +595,7 @@ _OpcodeCLIV86:
/* Get VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT
/* FIXME: Support VME */
@@ -616,7 +616,7 @@ _OpcodeSTIV86:
/* Get VDM State */ - mov eax, 0x714 + mov eax, FIXED_NTVDMSTATE_LINEAR_PC_AT
/* FIXME: Support VME */