/* INCLUDES *****************************************************************/
-#include <ddk/ntddk.h>
+#include <roskrnl.h>
+#include <ntos/bootvid.h>
+#include <internal/kd.h>
#include <internal/ke.h>
#include <internal/ps.h>
#include <internal/debug.h>
+#include "../../hal/halx86/include/hal.h"
+
/* GLOBALS ******************************************************************/
static LIST_ENTRY BugcheckCallbackListHead = {NULL,NULL};
InBugCheck = 0;
}
+/*
+ * @unimplemented
+ */
BOOLEAN STDCALL
KeDeregisterBugCheckCallback(PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
{
return FALSE;
}
+/*
+ * @implemented
+ */
BOOLEAN STDCALL
KeRegisterBugCheckCallback(PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
{
PRTL_MESSAGE_RESOURCE_ENTRY Message;
NTSTATUS Status;
-
+ KIRQL OldIrql;
+
+ /* Make sure we're switching back to the blue screen and print messages on it */
+ HalReleaseDisplayOwnership();
+ if (0 == (KdDebugState & KD_DEBUG_GDB))
+ {
+ KdDebugState |= KD_DEBUG_SCREEN;
+ }
+
__asm__("cli\n\t");
+ if (KeGetCurrentIrql() < DISPATCH_LEVEL)
+ {
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ }
DbgPrint("Bug detected (code %x param %x %x %x %x)\n",
BugCheckCode,
BugCheckParameter1,
}
}
+/*
+ * @implemented
+ */
VOID STDCALL
KeBugCheckEx(ULONG BugCheckCode,
ULONG BugCheckParameter1,
{
PRTL_MESSAGE_RESOURCE_ENTRY Message;
NTSTATUS Status;
-
+ KIRQL OldIrql;
+
+ /* Make sure we're switching back to the blue screen and print messages on it */
+ HalReleaseDisplayOwnership();
+ KdDebugState |= KD_DEBUG_SCREEN;
+
__asm__("cli\n\t");
+ if (KeGetCurrentIrql() < DISPATCH_LEVEL)
+ {
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ }
DbgPrint("Bug detected (code %x param %x %x %x %x)\n",
BugCheckCode,
BugCheckParameter1,
}
}
+/*
+ * @implemented
+ */
VOID STDCALL
KeBugCheck(ULONG BugCheckCode)
/*