101 DPRINT1(
"Swapping from: %p (%16s) to %p (%16s)\n",
102 OldProcess, ((
PEPROCESS)OldProcess)->ImageFileName,
103 NewProcess, ((
PEPROCESS)NewProcess)->ImageFileName);
108 TtbRegister.
AsUlong = NewProcess->DirectoryTableBase[0];
146 DPRINT1(
"WMI Tracing not supported\n");
153 OldProcess = OldThread->ApcState.Process;
154 NewProcess = NewThread->ApcState.Process;
155 if (OldProcess != NewProcess)
166 DPRINT1(
"Address space switch not implemented\n");
174 NewThread->ContextSwitches++;
186 Pcr->CurrentThread = NewThread;
206 if (NewThread->ApcState.KernelApcPending)
211 if (NewThread->SpecialApcDisable == 0)
340 KxQueueReadyThread(OldThread, Prcb);
358 ULONG InterruptCause;
361 ASSERT(TrapFrame->Reserved == 0xBADB0D00);
373 TrapFrame->PreviousIrql =
OldIrql;
441 ASSERT(TrapFrame->Reserved == 0xBADB0D00);
443 ULONG DebugType, Parameter0;
446 DPRINT1(
"[PREFETCH ABORT] (%x) @ %p/%p/%p\n",
467 Parameter0 = TrapFrame->R0;
468 TrapFrame->Pc +=
sizeof(
ULONG);
482 ExceptionRecord.ExceptionFlags = 0;
483 ExceptionRecord.ExceptionRecord =
NULL;
484 ExceptionRecord.ExceptionAddress = (
PVOID)TrapFrame->Pc;
485 ExceptionRecord.NumberParameters = 3;
490 ExceptionRecord.ExceptionInformation[0] = Parameter0;
491 ExceptionRecord.ExceptionInformation[1] = TrapFrame->R1;
492 ExceptionRecord.ExceptionInformation[2] = TrapFrame->R2;
522 ASSERT(TrapFrame->Reserved == 0xBADB0D00);
524 DPRINT1(
"[ABORT] (%x) @ %p/%p/%p\n",
554 ASSERT(TrapFrame->Reserved == 0xBADB0D00);
556 DPRINT1(
"[SWI] @ %p/%p\n", TrapFrame->Lr, TrapFrame->Pc);
578 Thread->TrapFrame = TrapFrame;
595 ASSERT(TrapFrame->Reserved == 0xBADB0D00);
600 DPRINT1(
"[UNDEF] @ %p/%p\n", TrapFrame->Lr, TrapFrame->Pc);
FORCEINLINE ULONG KeArmInstructionFaultStatusRegisterGet(VOID)
FORCEINLINE VOID KeArmWaitForInterrupt(VOID)
FORCEINLINE ULONG KeArmFaultAddressRegisterGet(VOID)
FORCEINLINE VOID KeArmTranslationTableRegisterSet(IN ARM_TTB_REGISTER Ttb)
FORCEINLINE ULONG KeArmFaultStatusRegisterGet(VOID)
VOID NTAPI KiDispatchInterrupt(VOID)
#define NT_SUCCESS(StatCode)
#define KeLowerIrql(oldIrql)
#define KeGetCurrentIrql()
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
VOID FASTCALL HalRequestSoftwareInterrupt(IN KIRQL Irql)
KIRQL FASTCALL KfRaiseIrql(IN KIRQL NewIrql)
ULONG HalGetInterruptSource(VOID)
VOID FASTCALL HalClearSoftwareInterrupt(IN KIRQL Irql)
#define KeGetCurrentThread
void __cdecl _disable(void)
void __cdecl _enable(void)
void __cdecl __debugbreak(void)
#define DECLSPEC_NORETURN
#define KiGetPreviousMode(tf)
VOID KiSystemService(IN PKTHREAD Thread, IN PKTRAP_FRAME TrapFrame, IN ULONG Instruction)
BOOLEAN FASTCALL KiSwapContext(IN KIRQL WaitIrql, IN PKTHREAD CurrentThread)
VOID NTAPI KiQuantumEnd(VOID)
DECLSPEC_NORETURN VOID KiIdleLoop(VOID)
VOID NTAPI KiDispatchException(PEXCEPTION_RECORD ExceptionRecord, PKEXCEPTION_FRAME ExceptionFrame, PKTRAP_FRAME Tf, KPROCESSOR_MODE PreviousMode, BOOLEAN SearchFrames)
VOID FASTCALL KiRetireDpcList(IN PKPRCB Prcb)
NTSTATUS NTAPI MmAccessFault(IN ULONG FaultCode, IN PVOID Address, IN KPROCESSOR_MODE Mode, IN PVOID TrapInformation)
VOID NTAPI KiDeliverApc(IN KPROCESSOR_MODE DeliveryMode, IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame)
#define STATUS_BREAKPOINT
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
volatile ULONG DpcQueueDepth
PVOID PerfGlobalGroupMask
struct _KTHREAD * CurrentThread
struct _KTHREAD * NextThread
SINGLE_LIST_ENTRY DeferredReadyListHead
ULONG_PTR DirectoryTableBase
struct _SINGLE_LIST_ENTRY * Next
NTSTATUS KiPrefetchAbortHandler(IN PKTRAP_FRAME TrapFrame)
VOID KiApcInterrupt(VOID)
NTSTATUS KiUndefinedExceptionHandler(IN PKTRAP_FRAME TrapFrame)
VOID KiSoftwareInterruptHandler(IN PKTRAP_FRAME TrapFrame)
VOID KiInterruptHandler(IN PKTRAP_FRAME TrapFrame, IN ULONG Reserved)
NTSTATUS KiDataAbortHandler(IN PKTRAP_FRAME TrapFrame)
VOID NTAPI KiSwapProcess(IN PKPROCESS NewProcess, IN PKPROCESS OldProcess)
_Reserved_ PVOID Reserved
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_ KPROCESSOR_MODE PreviousMode