- Just like on x86, this routine generates a breakpoint -- on ARM this is done with BKPT followed by an index.
- We use the BREAKPOINT_PRINT index just like on x86.
- This generates a prefetch abort -- so now we implement the prefetch abort handler. Thanks to the trap macros, this was 10 lines of code.
- This calls into the real C handler, which is now unimplemented and hangs the whole system, so we've regressed way back (on purpose).
svn path=/trunk/; revision=34474
//
// Do a breakpoint and return
//
- bkpt 3
+ bkpt BREAKPOINT_BREAK
bx lr
ENTRY_END DbgBreakPoint
+
+ NESTED_ENTRY DebugService
+ PROLOG_END DebugService
+
+ //
+ // Do a breakpoint and return
+ //
+ bkpt BREAKPOINT_PRINT // Could also be PROMPT -- we check later in a1
+ bx lr
+ ENTRY_END DebugService
NESTED_ENTRY RtlCaptureContext
PROLOG_END RtlCaptureContext
.equ CsPc, 0x40
.equ CsPsr, 0x44
+/*
+ * DebugService Control Types
+ */
+.equ BREAKPOINT_BREAK, 0
+.equ BREAKPOINT_PRINT, 1
+.equ BREAKPOINT_PROMPT, 2
+.equ BREAKPOINT_LOAD_SYMBOLS, 3
+.equ BREAKPOINT_UNLOAD_SYMBOLS, 4
+.equ BREAKPOINT_COMMAND_STRING, 5
+
#else
/*
VOID
);
-VOID
-STDCALL
-KdpSerialDebugPrint(LPSTR Message,
- ULONG Length);
-
-VOID
-DebugService(IN ULONG ServiceType,
- IN PCHAR Buffer,
- IN ULONG Length,
- IN ULONG Component,
- IN ULONG Level)
-{
- //
- // FIXME: ARM Bring-up Hack
- //
- KdpSerialDebugPrint(Buffer, Length);
-}
-
VOID
DebugService2(IN ULONG Arg1,
IN ULONG Arg2,
PROLOG_END KiPrefetchAbortException
//
- // FIXME: TODO
+ // Handle trap entry
//
- b .
+ TRAP_PROLOG 1 // FromAbort
+
+ //
+ // Call the C handler
+ //
+ adr lr, 1f
+ mov r0, sp
+ ldr pc, =KiPrefetchAbortHandler
+
+1:
+ //
+ // Handle trap exit
+ //
+ TRAP_EPILOG 0 // NotFromSystemCall
ENTRY_END KiPrefetchAbortException
_enable();
}
+NTSTATUS
+KiPrefetchAbortHandler(IN PKTRAP_FRAME TrapFrame)
+{
+ ASSERT(TrapFrame->DbgArgMark == 0xBADB0D00);
+ while (TRUE);
+ return STATUS_SUCCESS;
+}
+
NTSTATUS
KiDataAbortHandler(IN PKTRAP_FRAME TrapFrame)
{