Restore the stack before the LDT.

This commit is contained in:
mycroft 1994-04-18 01:24:09 +00:00
parent 0be2dea3b6
commit e65b5b259e
1 changed files with 10 additions and 5 deletions

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
* $Id: locore.s,v 1.63 1994/04/08 22:03:09 mycroft Exp $
* $Id: locore.s,v 1.64 1994/04/18 01:24:09 mycroft Exp $
*/
/*
@ -1603,7 +1603,11 @@ swtch_exited:
movl PCB_CR3(%esi),%ecx
movl %ecx,%cr3
#ifdef USER_LDT
/* Restore stack. */
movl PCB_ESP(%esi),%esp
movl PCB_EBP(%esi),%ebp
#ifdef USER_LDT
cmpl $0,PCB_USERLDT(%esi)
jnz 1f
movl __default_ldt,%ecx
@ -1618,9 +1622,7 @@ swtch_exited:
2:
#endif
/* Restore stack and segments. */
movl PCB_ESP(%esi),%esp
movl PCB_EBP(%esi),%ebp
/* Restore segments. */
movl PCB_FS(%esi),%ecx
movl %cx,%fs
movl PCB_GS(%esi),%ecx
@ -1658,6 +1660,9 @@ ENTRY(swtch_exit)
incl _cnt+V_SWTCH
/* In case we fault... */
movl $0,_curproc
/* Restore proc0's context. */
cli
movl P_ADDR(%ebx),%esi