diff --git a/reactos/drivers/base/directory.rbuild b/reactos/drivers/base/directory.rbuild index e02425c92ea..697234e37a6 100644 --- a/reactos/drivers/base/directory.rbuild +++ b/reactos/drivers/base/directory.rbuild @@ -20,4 +20,7 @@ + + + diff --git a/reactos/drivers/base/nmidebug/nmidebug.c b/reactos/drivers/base/nmidebug/nmidebug.c new file mode 100644 index 00000000000..875b92c1e15 --- /dev/null +++ b/reactos/drivers/base/nmidebug/nmidebug.c @@ -0,0 +1,49 @@ +/* + * PROJECT: ReactOS NMI Debug Driver + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: drivers/base/nmidebug/nmidebug.c + * PURPOSE: Driver Code + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES *******************************************************************/ + +#include + +/* FUNCTIONS ******************************************************************/ + +BOOLEAN +NTAPI +NmiDbgCallback(IN PVOID Context, + IN BOOLEAN Handled) +{ + // + // Let the user know we are alive + // + DbgPrint("NMI Callback entered! Letting the system crash...\n"); + + // + // Do not handle the NMI + // + return FALSE; +} + +NTSTATUS +NTAPI +DriverEntry(IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) +{ + PAGED_CODE(); + + // + // Register NMI callback + // + KeRegisterNmiCallback(&NmiDbgCallback, NULL); + + // + // Return success + // + return STATUS_SUCCESS; +} + +/* EOF */ diff --git a/reactos/drivers/base/nmidebug/nmidebug.rbuild b/reactos/drivers/base/nmidebug/nmidebug.rbuild new file mode 100644 index 00000000000..5447a4a10d5 --- /dev/null +++ b/reactos/drivers/base/nmidebug/nmidebug.rbuild @@ -0,0 +1,9 @@ + + + + . + ntoskrnl + hal + nmidebug.c + nmidebug.rc + diff --git a/reactos/drivers/base/nmidebug/nmidebug.rc b/reactos/drivers/base/nmidebug/nmidebug.rc new file mode 100644 index 00000000000..f77708f3552 --- /dev/null +++ b/reactos/drivers/base/nmidebug/nmidebug.rc @@ -0,0 +1,11 @@ +#include +#include + +#define VER_FILETYPE VFT_DRV +#define VER_FILESUBTYPE VFT2_DRV_SYSTEM +#define VER_FILEDESCRIPTION_STR "NMI debug driver" +#define VER_INTERNALNAME_STR "NMIDEBUG.SYS" +#define VER_ORIGINALFILENAME_STR "NMIDEBUG.SYS" +#define VER_LANGNEUTRAL + +#include "common.ver"