KiExitV86Mode is supposed to return a pointer to the protected mode KTRAP_FRAME. Instead it was returning the value of TrapFrame->Edi, which would be identical to PmTrapFrame->Ebp, which doesn't have any particular meaning. Fix it by returning PmTrapFrame directly. Fixes 2nd stage boot.

svn path=/trunk/; revision=45062
This commit is contained in:
Timo Kreuzer 2010-01-13 21:31:55 +00:00
parent 8e24e6be5e
commit a12f63e380

View file

@ -478,9 +478,9 @@ KiExitV86Mode(IN PKTRAP_FRAME TrapFrame)
GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Thread->Teb >> 16);
GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Thread->Teb >> 24);
/* Enable interrupts and get back to protected mode */
/* Enable interrupts and return a pointer to the trap frame */
_enable();
return TrapFrame->Edi;
return (ULONG)PmTrapFrame;
}
VOID