summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-11-16 15:40:13 -0800
committermgross <mark.gross@intel.com>2011-11-09 12:06:26 -0800
commitfd3ccc7586403a2f5ab03933932faf2b7d4d88ab (patch)
treeb7e5f5d5c17647d86d5fb4f1dde730540b598764
parentf84edc40a9ee2a0fb7f60634d76019f34bb64286 (diff)
downloadkernel-mfld-blackbay-fd3ccc7586403a2f5ab03933932faf2b7d4d88ab.tar.gz
kernel-mfld-blackbay-fd3ccc7586403a2f5ab03933932faf2b7d4d88ab.tar.bz2
kernel-mfld-blackbay-fd3ccc7586403a2f5ab03933932faf2b7d4d88ab.zip
ARM: fiq_debugger: Add help command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--arch/arm/common/fiq_debugger.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c
index a97c9b2c197..f172c15f1d3 100644
--- a/arch/arm/common/fiq_debugger.c
+++ b/arch/arm/common/fiq_debugger.c
@@ -447,10 +447,35 @@ void dump_stacktrace(struct fiq_debugger_state *state,
tail = user_backtrace(state, tail);
}
+static void debug_help(struct fiq_debugger_state *state)
+{
+ debug_printf(state, "FIQ Debugger commands:\n"
+ " pc PC status\n"
+ " regs Register dump\n"
+ " allregs Extended Register dump\n"
+ " bt Stack trace\n"
+ " reboot Reboot\n"
+ " irqs Interupt status\n"
+ " kmsg Kernel log\n"
+ " version Kernel version\n");
+ debug_printf(state, " sleep Allow sleep while in FIQ\n"
+ " nosleep Disable sleep while in FIQ\n"
+ " console Switch terminal to console\n"
+ " cpu Current CPU\n"
+ " cpu <number> Switch to CPU<number>\n");
+ if (!state->debug_busy) {
+ strcpy(state->debug_cmd, "help");
+ state->debug_busy = 1;
+ debug_force_irq(state);
+ }
+}
+
static void debug_exec(struct fiq_debugger_state *state,
const char *cmd, unsigned *regs, void *svc_sp)
{
- if (!strcmp(cmd, "pc")) {
+ if (!strcmp(cmd, "help") || !strcmp(cmd, "?")) {
+ debug_help(state);
+ } else if (!strcmp(cmd, "pc")) {
debug_printf(state, " pc %08x cpsr %08x mode %s\n",
regs[15], regs[16], mode_name(regs[16]));
} else if (!strcmp(cmd, "regs")) {