mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
- Write a DebugService routine for ARM in the RTL library and get rid of the hack in ntoskrnl.
- 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
This commit is contained in:
parent
43dd8f4408
commit
f0ba3800a4
5 changed files with 44 additions and 21 deletions
|
@ -17,9 +17,19 @@
|
||||||
//
|
//
|
||||||
// Do a breakpoint and return
|
// Do a breakpoint and return
|
||||||
//
|
//
|
||||||
bkpt 3
|
bkpt BREAKPOINT_BREAK
|
||||||
bx lr
|
bx lr
|
||||||
ENTRY_END DbgBreakPoint
|
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
|
NESTED_ENTRY RtlCaptureContext
|
||||||
PROLOG_END RtlCaptureContext
|
PROLOG_END RtlCaptureContext
|
||||||
|
|
|
@ -102,6 +102,16 @@
|
||||||
.equ CsPc, 0x40
|
.equ CsPc, 0x40
|
||||||
.equ CsPsr, 0x44
|
.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
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -31,24 +31,6 @@ KiIdleLoop(
|
||||||
VOID
|
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
|
VOID
|
||||||
DebugService2(IN ULONG Arg1,
|
DebugService2(IN ULONG Arg1,
|
||||||
IN ULONG Arg2,
|
IN ULONG Arg2,
|
||||||
|
|
|
@ -67,9 +67,22 @@
|
||||||
PROLOG_END KiPrefetchAbortException
|
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
|
ENTRY_END KiPrefetchAbortException
|
||||||
|
|
||||||
|
|
|
@ -431,6 +431,14 @@ KiInterruptHandler(IN PKTRAP_FRAME TrapFrame,
|
||||||
_enable();
|
_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
KiPrefetchAbortHandler(IN PKTRAP_FRAME TrapFrame)
|
||||||
|
{
|
||||||
|
ASSERT(TrapFrame->DbgArgMark == 0xBADB0D00);
|
||||||
|
while (TRUE);
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
KiDataAbortHandler(IN PKTRAP_FRAME TrapFrame)
|
KiDataAbortHandler(IN PKTRAP_FRAME TrapFrame)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue