141 FxSaveFormat->
MXCsr = 0x1F80;
146 Context->FloatSave.ControlWord = 0x27F;
147 Context->FloatSave.StatusWord = 0;
148 Context->FloatSave.TagWord = -1;
149 Context->FloatSave.ErrorOffset = 0;
150 Context->FloatSave.ErrorSelector = 0;
151 Context->FloatSave.DataOffset =0;
152 Context->FloatSave.DataSelector = 0;
156 Context->FloatSave.Cr0NpxState = 0;
168 Context->ContextFlags &= ~CONTEXT_DEBUG_REGISTERS;
177 Context->ContextFlags | ContextFlags,
337 OldProcess = OldThread->ApcState.Process;
338 NewProcess = NewThread->
ApcState.Process;
339 if (OldProcess != NewProcess)
344 if (NewProcess->LdtDescriptor.LimitLow)
347 ((
PULONG)&NewProcess->LdtDescriptor)[0],
348 ((
PULONG)&NewProcess->LdtDescriptor)[1]);
349 Ke386SetLocalDescriptorTable(
KGDT_LDT);
353 Ke386SetLocalDescriptorTable(0);
394 if (NewThread->
ApcState.KernelApcPending)
400 if (SwitchFrame->ApcBypassDisable)
421 SwitchFrame->ApcBypassDisable = OldThreadAndApcFlag & 3;
429 DPRINT1(
"WMI Tracing not supported\n");
434 OldThread = (
PKTHREAD)(OldThreadAndApcFlag & ~3);
441 NewThread->SwapBusy =
FALSE;
514 KxQueueReadyThread(OldThread, Prcb);
VOID NTAPI KiInitializeContextThread(IN PKTHREAD Thread, IN PKSYSTEM_ROUTINE SystemRoutine, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext, IN PCONTEXT Context)
struct _KKINIT_FRAME KKINIT_FRAME
struct _KUINIT_FRAME * PKUINIT_FRAME
struct _KKINIT_FRAME * PKKINIT_FRAME
struct _KUINIT_FRAME KUINIT_FRAME
BOOLEAN FASTCALL KiSwapContextExit(IN PKTHREAD OldThread, IN PKSWITCHFRAME SwitchFrame)
DECLSPEC_NORETURN VOID KiIdleLoop(VOID)
VOID NTAPI KiDispatchInterrupt(VOID)
struct _KSWITCHFRAME KSWITCHFRAME
struct _KSWITCHFRAME * PKSWITCHFRAME
VOID FASTCALL KiSwapContextEntry(IN PKSWITCHFRAME SwitchFrame, IN ULONG_PTR OldThreadAndApcFlag)
VOID FASTCALL KiSwitchThreads(IN PKTHREAD OldThread, IN PKTHREAD NewThread)
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
#define KeLowerIrql(oldIrql)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
VOID FASTCALL HalRequestSoftwareInterrupt(IN KIRQL Irql)
VOID FASTCALL KfLowerIrql(IN KIRQL NewIrql)
KIRQL FASTCALL KfRaiseIrql(IN KIRQL NewIrql)
VOID FASTCALL HalClearSoftwareInterrupt(IN KIRQL Irql)
#define KeGetCurrentThread
__in PVOID ContextPointer
struct _KSTART_FRAME KSTART_FRAME
struct _KSTART_FRAME * PKSTART_FRAME
VOID FASTCALL KiRetireDpcListInDpcStack(IN PKPRCB Prcb, IN PVOID DpcStack)
void __cdecl _disable(void)
void __cdecl _enable(void)
__INTRIN_INLINE unsigned long __readcr0(void)
__INTRIN_INLINE void __writecr3(unsigned int Data)
__INTRIN_INLINE void __writecr0(unsigned int Data)
FORCEINLINE VOID KiAcquirePrcbLock(IN PKPRCB Prcb)
VOID KeSetGdtSelector(ULONG Entry, ULONG Value1, ULONG Value2)
#define KTRAP_FRAME_LENGTH
struct _KTRAP_FRAME KTRAP_FRAME
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
#define NPX_STATE_NOT_LOADED
struct _FXSAVE_FORMAT * PFXSAVE_FORMAT
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
#define EXCEPTION_CHAIN_END
struct _KTHREAD * PKTHREAD
#define CONTEXT_FLOATING_POINT
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
#define DECLSPEC_NORETURN
#define KeGetTrapFrame(Thread)
FORCEINLINE VOID KiSetTebBase(PKPCR Pcr, PNT_TIB TebAddress)
FORCEINLINE PFX_SAVE_AREA KiGetThreadNpxArea(IN PKTHREAD Thread)
VOID NTAPI KiThreadStartup(VOID)
BOOLEAN FASTCALL KiSwapContext(IN KIRQL WaitIrql, IN PKTHREAD CurrentThread)
VOID NTAPI KiQuantumEnd(VOID)
VOID NTAPI KeContextToTrapFrame(PCONTEXT Context, PKEXCEPTION_FRAME ExeptionFrame, PKTRAP_FRAME TrapFrame, ULONG ContextFlags, KPROCESSOR_MODE PreviousMode)
VOID FASTCALL KiRetireDpcList(IN PKPRCB Prcb)
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
#define CONTEXT_EXTENDED_REGISTERS
union _FX_SAVE_AREA::@2458 U
volatile ULONG DpcQueueDepth
PVOID PerfGlobalGroupMask
KSWITCHFRAME CtxSwitchFrame
KSWITCH_FRAME CtxSwitchFrame
PROCESSOR_POWER_STATE PowerState
struct _KTHREAD * CurrentThread
struct _KTHREAD * NextThread
SINGLE_LIST_ENTRY DeferredReadyListHead
ULONG_PTR DirectoryTableBase
PKSYSTEM_ROUTINE SystemRoutine
PKSTART_ROUTINE StartRoutine
ULONG PreviousPreviousMode
struct _EXCEPTION_REGISTRATION_RECORD FAR * ExceptionList
KSWITCHFRAME CtxSwitchFrame
KSWITCH_FRAME CtxSwitchFrame
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
PPROCESSOR_IDLE_FUNCTION IdleFunction
struct _SINGLE_LIST_ENTRY * Next
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
KSTART_ROUTINE * PKSTART_ROUTINE
_In_ ULONG _In_opt_ POBJECT_ATTRIBUTES _In_opt_ HANDLE _Out_opt_ PCLIENT_ID _In_ PKSTART_ROUTINE StartRoutine