diff options
Diffstat (limited to 'kern/linux/linux_system.cc')
-rw-r--r-- | kern/linux/linux_system.cc | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc index 4342463c3..4ac03143e 100644 --- a/kern/linux/linux_system.cc +++ b/kern/linux/linux_system.cc @@ -102,12 +102,19 @@ LinuxSystem::LinuxSystem(Params *p) } else panic("could not find dp264_mv\n"); -#ifdef DEBUG +#ifndef NDEBUG kernelPanicEvent = new BreakPCEvent(&pcEventQueue, "kernel panic"); if (kernelSymtab->findAddress("panic", addr)) kernelPanicEvent->schedule(addr); else panic("could not find kernel symbol \'panic\'"); + + kernelDieEvent = new BreakPCEvent(&pcEventQueue, "die if kernel"); + if (kernelSymtab->findAddress("die_if_kernel", addr)) + kernelDieEvent->schedule(addr); + else + panic("could not find kernel symbol \'die_if_kernel\'"); + #endif /** @@ -174,7 +181,7 @@ LinuxSystem::LinuxSystem(Params *p) LinuxSystem::~LinuxSystem() { -#ifdef DEBUG +#ifndef NDEBUG delete kernelPanicEvent; #endif delete skipIdeDelay50msEvent; @@ -208,12 +215,12 @@ LinuxSystem::setDelayLoop(ExecContext *xc) BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem) - SimObjectParam<MemoryController *> mem_ctl; + SimObjectParam<MemoryController *> memctrl; SimObjectParam<PhysicalMemory *> physmem; - Param<string> kernel_code; - Param<string> console_code; - Param<string> pal_code; + Param<string> kernel; + Param<string> console; + Param<string> pal; Param<string> boot_osflags; Param<string> readfile; @@ -230,11 +237,11 @@ END_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem) BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxSystem) - INIT_PARAM(mem_ctl, "memory controller"), + INIT_PARAM(memctrl, "memory controller"), INIT_PARAM(physmem, "phsyical memory"), - INIT_PARAM(kernel_code, "file that contains the kernel code"), - INIT_PARAM(console_code, "file that contains the console code"), - INIT_PARAM(pal_code, "file that contains palcode"), + INIT_PARAM(kernel, "file that contains the kernel code"), + INIT_PARAM(console, "file that contains the console code"), + INIT_PARAM(pal, "file that contains palcode"), INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot", "a"), INIT_PARAM_DFLT(readfile, "file to read startup script from", ""), @@ -251,11 +258,11 @@ CREATE_SIM_OBJECT(LinuxSystem) { System::Params *p = new System::Params; p->name = getInstanceName(); - p->memctrl = mem_ctl; + p->memctrl = memctrl; p->physmem = physmem; - p->kernel_path = kernel_code; - p->console_path = console_code; - p->palcode = pal_code; + p->kernel_path = kernel; + p->console_path = console; + p->palcode = pal; p->boot_osflags = boot_osflags; p->init_param = init_param; p->readfile = readfile; |