Author: sir_richard
Date: Sun Jan 31 16:22:55 2010
New Revision: 45357
URL:
http://svn.reactos.org/svn/reactos?rev=45357&view=rev
Log:
[NTOS]: Always set correct segments; the if/else branch should decide which segments to
save, not whether or not to set the sane ones. Fixes boot on VirtualBox and real
hardware.
Modified:
trunk/reactos/ntoskrnl/include/internal/trap_x.h
Modified: trunk/reactos/ntoskrnl/include/internal/trap_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] Sun Jan 31 16:22:55
2010
@@ -654,10 +654,12 @@
TrapFrame->SegGs = Ke386GetGs();
TrapFrame->SegDs = Ke386GetDs();
TrapFrame->SegEs = Ke386GetEs();
- Ke386SetFs(KGDT_R0_PCR);
- Ke386SetDs(KGDT_R3_DATA | RPL_MASK);
- Ke386SetEs(KGDT_R3_DATA | RPL_MASK);
- }
+ }
+
+ /* Set correct segments */
+ Ke386SetFs(KGDT_R0_PCR);
+ Ke386SetDs(KGDT_R3_DATA | RPL_MASK);
+ Ke386SetEs(KGDT_R3_DATA | RPL_MASK);
/* Save exception list and terminate it */
TrapFrame->ExceptionList = KeGetPcr()->Tib.ExceptionList;