Author: ros-arm-bringup
Date: Sat Jan 2 05:50:08 2010
New Revision: 44878
URL:
http://svn.reactos.org/svn/reactos?rev=44878&view=rev
Log:
NMI Support Patch 13:
[NMIDEBUG]: Add new NMI Debug driver. It registers an NMI callback on startup. The
callback does nothing useful at the moment, but you can enhance it to add all sorts of
debugging information that would otherwise be unavailable in situations such as an
interrupt storm, IRQL hang, etc. When you send an NMI, such as by using QEMU, you should
see the driver print a string.
Added:
trunk/reactos/drivers/base/nmidebug/
trunk/reactos/drivers/base/nmidebug/nmidebug.c (with props)
trunk/reactos/drivers/base/nmidebug/nmidebug.rbuild (with props)
trunk/reactos/drivers/base/nmidebug/nmidebug.rc (with props)
Modified:
trunk/reactos/drivers/base/directory.rbuild
Modified: trunk/reactos/drivers/base/directory.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/directory.rbu…
==============================================================================
--- trunk/reactos/drivers/base/directory.rbuild [iso-8859-1] (original)
+++ trunk/reactos/drivers/base/directory.rbuild [iso-8859-1] Sat Jan 2 05:50:08 2010
@@ -20,4 +20,7 @@
<directory name="null">
<xi:include href="null/null.rbuild" />
</directory>
+<directory name="nmidebug">
+ <xi:include href="nmidebug/nmidebug.rbuild" />
+</directory>
</group>
Added: trunk/reactos/drivers/base/nmidebug/nmidebug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/nmidebug/nmid…
==============================================================================
--- trunk/reactos/drivers/base/nmidebug/nmidebug.c (added)
+++ trunk/reactos/drivers/base/nmidebug/nmidebug.c [iso-8859-1] Sat Jan 2 05:50:08 2010
@@ -1,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 <ntddk.h>
+
+/* 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 */
Propchange: trunk/reactos/drivers/base/nmidebug/nmidebug.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/base/nmidebug/nmidebug.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/nmidebug/nmid…
==============================================================================
--- trunk/reactos/drivers/base/nmidebug/nmidebug.rbuild (added)
+++ trunk/reactos/drivers/base/nmidebug/nmidebug.rbuild [iso-8859-1] Sat Jan 2 05:50:08
2010
@@ -1,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="nmidebug" type="kernelmodedriver"
installbase="system32/drivers" installname="nmidebug.sys">
+ <include base="null">.</include>
+ <library>ntoskrnl</library>
+ <library>hal</library>
+ <file>nmidebug.c</file>
+ <file>nmidebug.rc</file>
+</module>
Propchange: trunk/reactos/drivers/base/nmidebug/nmidebug.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/base/nmidebug/nmidebug.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/nmidebug/nmid…
==============================================================================
--- trunk/reactos/drivers/base/nmidebug/nmidebug.rc (added)
+++ trunk/reactos/drivers/base/nmidebug/nmidebug.rc [iso-8859-1] Sat Jan 2 05:50:08 2010
@@ -1,0 +1,11 @@
+#include <winver.h>
+#include <ntverp.h>
+
+#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"
Propchange: trunk/reactos/drivers/base/nmidebug/nmidebug.rc
------------------------------------------------------------------------------
svn:eol-style = native