Subject: Re: G4/450 Boot
To: None <jv09177@pegasus.cc.ucf.edu>
From: Dan Winship <danw@MIT.EDU>
List: port-macppc
Date: 01/06/2000 12:53:14
> trap type 200 at 272764

according to sys/arch/powerpc/powerpc/include/trap.h, 0x0200 is a
"Machine Check", which means it's trying to access unmapped memory or
I/O space. So you're probably right (or at least close) about the PCI
controller.

> Also, does anyone know the boot sequence step-by-step (that is, what the
> kernel looks for when)? This might help me figure out what is happening.

The entry point (as set by the ld invocation used to build the kernel)
is __start in sys/arch/macppc/macppc/locore.S. It does a bunch of OF
to NetBSD glue stuff and then calls initppc() in macppc/machdep.c
which sets up memory mapping and trap vectors.

Then __start calls main(), which is in sys/kern/init_main.c. main()
sets up the console (calling consinit, which is back in
macppc/machdep.c), prints the copyright message, initializes a bunch
of subsystems and then eventually calls configure() in
sys/kern/subr_autoconf.c to configure devices.

configure() in turn calls cpu_configure() in macppc/autoconf.c ("cpu"
in kernel function names often just means "machine-dependent", not
actually "related specifically to the processor"). cpu_configure does
some macppc-specific setup stuff and then calls back to code in
subr_autoconf.c to attach the mainbus. The mainbus code is in
macppc/mainbus.c, and it first attaches the mainbus and then tries to
configure and attach the PCI busses. Assuming you are crashing in the
PCI code, that's in sys/arch/macppc/pci/bandit.c (which, despite the
name, is used for all macppc PCI controllers, not just the bandit).

Hope this helps...

-- Dan