Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Panic at boot on 4/330 with cgfour and cgsix



On Wed, 29 Jan 2025 at 16:37, foo bar <tokenalt%gmail.com@localhost> wrote:
> >
> > I'll also chime in with Julian to suggest testing NetBSD 1.6 - 3 to
> > try to find at which major release it broke. Once there it is likely
> > to be debugging, or we could bisect the NetBSD current tree around
> > that time, building test kernels (I've done that before using an older
> > NetBSD release in a chroot to build. It is possible, but we'll see if
> > needed :)
>
> So after testing several kernels I found the last working version is
> 1.5.3 and the first not working version is 2.0. The 1.6.x kernels are
> unknown, I tried booting several of them but all of them would drop to
> sunmon after loading the kernel, some times with a memory alignment
> error, some times with no error.

OK, but the netbsd-1-6 kernels do attach cgfour and continue further
before dropping back to the prom, which implies we may have two
independent issues, so it may well be worth looking at the netbsd-1-5
to netbsd-1-6 changes

> > I did notice that the newer kernel attaches bwtwo0 before cgfour0.
> > Probably not significant... but might be
>
> Yeah I noticed that on 1.5.x bwtwo0 and cgfour0 are detected back to
> back but on 2.0 - current cgfour0 is detected well after bwtwo0.

So, a quick diff of the netbsd-1-5 and netbsd-1-6 trees shows a small
set of changes in cgfour.c, mainly related to bus_space reworking

http://sync.absd.org/sparc/sys-arch-sparc-dev-cgfour.diff

The changes to netbsd-2 include the introduction of CFATTACH_DECL,
which would substantially increase the diff.

There is no guarantee the issue is in cgfour.c, but it seems like an
excellent place to start :)

So:

- bus_space_probe() lost an arg (zero in this case)

- bus_space_mmap() gains an arg (offset) as "sc->sc_paddr + poff"
becomes "sc->sc_paddr, poff"

- conversion from obio_bus_map() to bus_space_map() loses two args.
They look like offsets as the diff ~line 276 changes "oba->oba_paddr,
PFOUR_COLOR_OFF_CMAP" to "oba->oba_paddr + PFOUR_COLOR_OFF_CMAP"
That is supported by sys/arch/sparc/include/autoconf.h which had
#define obio_bus_map(t, a, o, s, f, v, hp)              \
        bus_space_map2(t, 0, (long)(a) + o, s, f, (vaddr_t)v, hp)

My first suspicion would be something in the obio_bus_map() to
bus_space_map() changes, particularly as FOUR_COLOR_OFF_CMAP is
0xfff00000 which is 4,293,918,720 - a fair sized offset to pass in on
a 32 bit machine

I'd be tempted to look at the comparable changes to bwtwo @ obio, to
see if anything obvious pops up.

I have to go visit someone in hospital right now, but will try to come
back to this later if no-one beats me to it :)

Davod


Home | Main Index | Thread Index | Old Index