Author: aandrejevic
Date: Thu Jun 11 21:52:46 2015
New Revision: 68107
URL:
http://svn.reactos.org/svn/reactos?rev=68107&view=rev
Log:
[FAST486]
The VM flag must be cleared before loading the new stack segment on a return
from v86 mode.
Modified:
trunk/reactos/lib/fast486/common.c
Modified: trunk/reactos/lib/fast486/common.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.c?rev=6…
==============================================================================
--- trunk/reactos/lib/fast486/common.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fast486/common.c [iso-8859-1] Thu Jun 11 21:52:46 2015
@@ -339,6 +339,9 @@
/* Switch to the new privilege level */
State->Cpl = GET_SEGMENT_RPL(IdtEntry->Selector);
+ /* Clear the VM flag */
+ State->Flags.Vm = FALSE;
+
/* Check the new (higher) privilege level */
switch (State->Cpl)
{
@@ -404,12 +407,6 @@
}
State->GeneralRegs[FAST486_REG_ESP].Long = NewEsp;
-
- if (State->Flags.Vm)
- {
- /* Clear the VM flag */
- State->Flags.Vm = FALSE;
- }
}
/* Load new CS */