Subject: Re: Generic/Sysinst Kernel Crashes To Debugger On Startup, Trap In
To: Sabahattin Gucukoglu <mail@sabahattin-gucukoglu.com>
From: Matthew Orgass <darkstar@city-net.com>
List: port-hpcmips
Date: 10/23/2004 17:55:29
On 2004-10-23 mail@sabahattin-gucukoglu.com wrote:
> I can now start my kernel, but unfortunately it doesn't get very far
> before it catches a fault of some kind ("Trap") and drops out to db. Just
> for kicks I let it continue until it panicked and then halted - I'm no old
> hand to debugging NetBSD by a long shot, and the constant values don't,
> from a quick grep of the sources and a look at man.netbsd.org, seem to
> have a home place of reference. So, I'm sorry to have to ask for help
> again, but can anyone help me out with this, or tell me what the numbers
> mean, or else where I can find where they are all plainly "Documented"
> (source or docs)? It seems to me that the only obvious resolve, that in
> my opinion of just disabling the in-kernel swapper, can only be done by
> building a new kernel, something I'm not yet able to do (options(4),
> config(8)). Any ideas?
There isn't any central documentation on this, usually grepping the
source is the best way to find the problem.
> trap: bus error (load or store) in kernel mode
> status=0x2, cause=0x1c, epc=0x801f5908, vaddr=0xc0002b00
> pid=0 cmd=swapper usp=0x0 ksp=0x807b7b70
> Stopped in pid 0.1 (swapper) at 0x801f5908: lw v0,0(s0)
The question is, what is at 801f5908 in this kernel? It looks like
releng is still down, so I can't check this right now. You can't just
disable the swapper, because the process reported as the "swapper" is
actually the main kernel process :). However, depending on where the
problem is, you may just be able to disable a device. This error comes
from sys/arch/mips/mips/trap.c and is a cpu bus trap. The vaddr is in
kseg2 (kernel mapped memory), but I don't have any ideas as to what could
be causing it without knowing what code caused the exception.
The NetBSD build system builds both nm and objdump as part of the build
tools, so this would be a good time to get your cross build setup working.
Are you having any problems setting up the cross build? You can also do a
"trace" at the ddb prompt (just "t" works), although I don't know if
hpcboot is correctly loading symbols (pbsdboot doesn't), so this might not
help too much.
Matthew Orgass
darkstar@city-net.com