Re: Current ofwboot failure
Michael <[email protected]> Tue, 6 Dec 2022 01:47:14 -0500
| Newsgroups | gmane.os.netbsd.ports.macppc |
|---|---|
| Message-ID | <20221206014714.79b14996@bushmills> |
Hello, On Sun, 4 Dec 2022 11:21:32 +0100 Martin Husemann <[email protected]> wrote: > current ofwboot fails for me on a G5 powermac. It loads the kernel > (skipping several memory regions beyound 4G physical address) and > then lists two available regions, jumps to the kernel and crashes > (manual transcript, please excuse the left out parts): > > avail region 2 start ... > Invalid memory access at %SRR0: ...00134b3c %SRR1: 100000000000.0000003030 This looks like fallout from the locking-around-console-output dance, which now needs things like curcpu() and the like to work. Problem with that - macppc sets up its console *very* early compared to other ports. > That would be: > > (gdb) list *(0x00134b3c) > 0x134b3c is in splraise (../../../../arch/powerpc/pic/intr.c:622). > 617 splraise(int ncpl) > 618 { > 619 struct cpu_info *ci = curcpu(); > 620 int ocpl; > 621 > 622 if (ncpl == ci->ci_cpl) > 623 return ncpl; > 624 REORDER_PROTECT(); > 625 ocpl = ci->ci_cpl; > 626 KASSERT(ncpl < NIPL); > > > Using an older ofwboot the same kernel just boots fine. > Only relevant recent changes were in libsa it seems (but none looks > related to this). Maybe something in the kernel changed and older ofwboot > just is lucky? No idea how ofwboot plays into this, my guess is it got lucky. I started converting early debug output to ofprint() in order to avoid this. have fun Michael