KiBugCheckDebugBreak(IN ULONG StatusCode)
{
/* If KDBG isn't connected, freeze the CPU, otherwise, break */
- if (KdDebuggerNotPresent) for (;;) Ke386HaltProcessor();
+ if (KdDebuggerNotPresent) for (;;) KeHaltProcessor();
DbgBreakPointWithStatus(StatusCode);
}
IN BOOLEAN DriversOnly,
OUT PBOOLEAN InKernel)
{
+#ifdef _M_IX86
ULONG i = 0;
PVOID ImageBase, EipBase = NULL;
PLDR_DATA_TABLE_ENTRY Entry;
/* Return the base address */
return EipBase;
+#else
+ return 0;
+#endif
}
PCHAR
InterlockedIncrement((PLONG)&KiHardwareTrigger);
/* Capture the CPU Context */
- RtlCaptureContext(&Prcb->ProcessorState.ContextFrame);
+ RtlCaptureContext((PVOID)&Prcb->ProcessorState.ContextFrame);
Context = Prcb->ProcessorState.ContextFrame;
/* FIXME: Call the Watchdog if it's regsitered */
if ((TrapFrame) &&
(BugCheckCode != KERNEL_MODE_EXCEPTION_NOT_HANDLED))
{
+#ifdef _M_IX86
/* Get EIP */
Eip = (PVOID)TrapFrame->Eip;
+#elif defined(_M_PPC)
+ Eip = (PVOID)TrapFrame->Iar;
+#endif
}
break;
/* Check if we have a frame now */
if (TrapFrame)
{
+#ifdef _M_IX86
/* Get EIP */
Eip = (PVOID)TrapFrame->Eip;
+#elif defined(_M_PPC)
+ Eip = (PVOID)TrapFrame->Iar;
+#endif
/* Find out if was in the kernel or drivers */
DriverBase = KiPcToFileHeader(Eip, &LdrEntry, FALSE, &IsSystem);
HalReleaseDisplayOwnership();
/* Raise IRQL to HIGH_LEVEL */
- Ke386DisableInterrupts();
+ KeDisableInterrupts();
KeRaiseIrql(HIGH_LEVEL, &OldIrql);
/* Unlock the Kernel Adress Space if we own it */
else if (KeBugCheckOwnerRecursionCount > 2)
{
/* Halt the CPU */
- for (;;) Ke386HaltProcessor();
+ for (;;) KeHaltProcessor();
}
/* Call the Callbacks */