Subject: kernel loading problems on macppc, was CVS commit:
To: None <port-macppc@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 09/19/2002 21:02:03
A number of folks have been complaining about 1.6 kernels not loading.
ofwboot loads it, then nothing happens. I was stumped by this as the same
kernels load fine on my system.

Turns out that the problem's that ofwboot is NOT loading the kernels
right. I found this out when I tried a new ofwboot to test a change. All
of a sudden MY kernels stopped loading. Note: all I changed was ofwboot,
not the kernel.

I spent a lot of time playing with cvs update -D, and found that sources
from July 24, 2000 work, and sources from July 25, 2000 do not. Note that
all of the failed loads have the kernel fail in the same way.

The one main change that day was that Tsubai switched us from using our
own alloc() to libsa's alloc(). That was the one change. So I added the
old alloc() back to ofwboot, and now it works fine.

The commit below is where I added that alloc() back. At the time, I
thought this was an off-by-one error somewhere; the memory patern was
different with libsa's alloc than with macppc's. Now I'm not so sure.
Turns out both files are almos the same.

The only difference I found is libsa's assumes you can allocate memory by
grabbing it above the loader, while macppc's called OF_claim to get it.
Could others please check this (in libsa's look at the use of the top
pointer)?

I think we should stick w/ our own alloc().

Thoughts?

Take care,

Bill

---------- Forwarded message ----------
Date: Fri, 20 Sep 2002 06:20:25 +0300 (EEST)
From: Bill Studenmund <wrstuden@netbsd.org>
To: source-changes@netbsd.org
Subject: CVS commit: syssrc/sys/arch/macppc/stand/ofwboot


Module Name:	syssrc
Committed By:	wrstuden
Date:		Fri Sep 20 03:20:25 UTC 2002

Modified Files:
	syssrc/sys/arch/macppc/stand/ofwboot: Makefile
Added Files:
	syssrc/sys/arch/macppc/stand/ofwboot: alloc.c

Log Message:
Re-add own alloc(). Recent issues with kernels randomly dying on boot
are related to using libsa's alloc(). Problems go away with this alloc().

Note: THIS MEANS THERE'S A BUG SOMEWHERE ELSE. We probably have an off-by-
one error or something like that. We should fix it, then revert this change.


To generate a diff of this commit:
cvs rdiff -r1.34 -r1.35 syssrc/sys/arch/macppc/stand/ofwboot/Makefile
cvs rdiff -r0 -r1.3 syssrc/sys/arch/macppc/stand/ofwboot/alloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.