[ros-svn] [ion] 20911: - Fix some nasty context switch bugs:

ion at svn.reactos.org ion at svn.reactos.org
Mon Jan 16 03:21:47 CET 2006


- Fix some nasty context switch bugs:
  * We did not update the KPCR's stacklimit/initialstack with the new thread's stacklimit/initialstack.
  * We always assumed V86 frame bias in KeInitializeThreadContext.
  * We did not properly update ESP0 during context switch, to make space for the NPX frame and V86 bias.
  * We did not update fs:18h to point to the new TEB.
  * We did not clear out GS when switching processes, nor update the TSS's cr3.
  * If a new LDT was being updated, we over-wrote EBP (which was supposed to point to the TSS) by the GDT pointer.
  * We used a push/pop esp0 hack which hid the fact we never updated esp0.


Updated files:
trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
trunk/reactos/ntoskrnl/ke/i386/thread.c




More information about the Ros-svn mailing list