summaryrefslogtreecommitdiff
path: root/src/arch/arm/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/linux')
-rw-r--r--src/arch/arm/linux/system.cc15
-rw-r--r--src/arch/arm/linux/system.hh8
2 files changed, 18 insertions, 5 deletions
diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc
index de4c27d8b..e714cc913 100644
--- a/src/arch/arm/linux/system.cc
+++ b/src/arch/arm/linux/system.cc
@@ -62,11 +62,22 @@ using namespace Linux;
LinuxArmSystem::LinuxArmSystem(Params *p)
: ArmSystem(p),
- enableContextSwitchStatsDump(p->enable_context_switch_stats_dump)
+ enableContextSwitchStatsDump(p->enable_context_switch_stats_dump),
+ kernelPanicEvent(NULL), kernelOopsEvent(NULL)
{
+ if (p->panic_on_panic) {
+ kernelPanicEvent = addKernelFuncEventOrPanic<PanicPCEvent>(
+ "panic", "Kernel panic in simulated kernel");
+ } else {
#ifndef NDEBUG
- kernelPanicEvent = addKernelFuncEventOrPanic<BreakPCEvent>("panic");
+ kernelPanicEvent = addKernelFuncEventOrPanic<BreakPCEvent>("panic");
#endif
+ }
+
+ if (p->panic_on_oops) {
+ kernelOopsEvent = addKernelFuncEventOrPanic<PanicPCEvent>(
+ "oops_exit", "Kernel oops in guest");
+ }
// With ARM udelay() is #defined to __udelay
uDelaySkipEvent = addKernelFuncEventOrPanic<UDelayEvent>(
diff --git a/src/arch/arm/linux/system.hh b/src/arch/arm/linux/system.hh
index feed8cfaa..008c64429 100644
--- a/src/arch/arm/linux/system.hh
+++ b/src/arch/arm/linux/system.hh
@@ -98,10 +98,12 @@ class LinuxArmSystem : public ArmSystem
void mapPid(ThreadContext* tc, uint32_t pid);
private:
-#ifndef NDEBUG
/** Event to halt the simulator if the kernel calls panic() */
- BreakPCEvent *kernelPanicEvent;
-#endif
+ PCEvent *kernelPanicEvent;
+
+ /** Event to halt the simulator if the kernel calls oopses */
+ PCEvent *kernelOopsEvent;
+
/**
* PC based event to skip udelay(<time>) calls and quiesce the
* processor for the appropriate amount of time. This is not functionally