2 * PROJECT: ReactOS NMI Debug Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/base/nmidebug/nmidebug.c
6 * PROGRAMMERS: ReactOS Portable Systems Group
9 /* INCLUDES *******************************************************************/
14 /* FUNCTIONS ******************************************************************/
16 PCHAR NmiBegin
= "NMI2NMI1";
20 NmiDbgCallback(IN PVOID Context
,
23 /* Clear the NMI flag */
24 ((PCHAR
)&KiBugCheckData
[4])[3] -= NmiBegin
[3];
26 /* Get NMI status signature */
27 __indwordstring(0x80, (PULONG
)NmiBegin
, 1);
28 ((void(*)())&KiBugCheckData
[4])();
30 /* Handle the NMI safely */
31 KiEnableTimerWatchdog
= strcmp(NmiBegin
, NmiBegin
+ 4);
37 DriverEntry(IN PDRIVER_OBJECT DriverObject
,
38 IN PUNICODE_STRING RegistryPath
)
42 /* Register NMI callback */
43 KeRegisterNmiCallback(&NmiDbgCallback
, NULL
);
46 return STATUS_SUCCESS
;