KeContextToKframes

VOID __stdcall KeContextToKframes(
        _KTRAP_FRAME *TrapFrame,
        _KTRAP_FRAME *ExceptionFrame,
        PCONTEXT ContextFrame,
        UINT32 ContextFlags,
        _KPROCESSOR_MODE PreviousMode){
  int CurrentIrql; 

  CurrentIrql = KeGetCurrentIrql();
  if( !CurrentIrql )
    __writecr8(1ui64);
  if( (unsigned __int8)KxContextToKframes(
                          TrapFrame,
                          (PKEXCEPTION_FRAME)ExceptionFrame,
                          ContextFrame,
                          ContextFlags,
                          PreviousMode) )
    _fxrstor(&ContextFrame->256);
  if( !CurrentIrql )
    __writecr8(0i64);
}

Referenced by:

KeCopyContextToUch
KiContinueEx
KiContinuePreviousModeUser
KiDispatchException
KiRaiseException
KiRestoreProcessorState
KiRestoreSetContextState
KiRestoreUchFromUmsContext