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 Sun, Jun 1, 2025 at 3:18 AM Julian Coleman <jdc%coris.org.uk@localhost> wrote:
>
> Hi,
>
> > So I have an update with mostly good news. After a few bug fixes and
> > cleaning up a bit I now have a working cgfour driver. I can boot to
> > the login prompt and the keyboard works, I can run some programs that
> > use color such as htop and neofetch, I can even startx and after a
> > long wait get a desktop in color. Once I saw that the keyboard was
> > working I retested a kernel with just bwtwo and the keyboard still did
> > not work, then I tested a kernel with bwtwo and cgfour and things
> > worked but the bwtwo didn't appear to be doing anything. The bwtwo
> > driver has some code to detect when it's an overlay plane and tries to
> > act as sort of a half console, I'm now suppecting that's what's
> > causing the problem with the keyboard. Also now that I have a working
> > cgfour it's made the cause of the double echoed characters in the
> > kernel debugger visually apparent. I believe ddb is using two routines
> > to put a character on the screen, one through the kernel and one with
> > the prom. On most framebuffers they both end up at the same place so
> > you just get repeated characters, but on the cgfour they go to
> > different places. The kernel will draw to the color plane and the prom
> > will draw to the monochrome plane making them visually distinct. I
> > haven't looked at the code yet this is just my guess based on how it
> > appears on screen. I can make a video of all of this if anyone wants.
>
> This is definitely good news - thanks for working on it!  I think that we
> could commit the changes that you have so far and look at the others if
> you're interested.
>
> For bw2 versus cg4 as console, I think that we have to decide which one we
> want to really be the console - either to use the previous logic with the
> faster bw2 console, or just use cg4 for everything.  I wonder if using bw2
> would also make DDB work correctly.

Personally I think cg4 console is the better option now. Back when the
machine was new and running SunOS the performance difference between
them might have mattered. But now when running modern NetBSD they're
equally slow so might as well have color. Also there's a lot more
color CLI programs now than there was back in the day.

> I made some small changes to your patch, really just to put the definitions
> for the sizes together and make it compile without SUN4.  I also removed
> the comment about not doing any of the console handling, but we could keep
> that if we want to work on the bw2 driver.  It might be possible to check
> the PROM settings and set the console based on that (or a compile-time
> option) although this might be extra work for little gain.

I tested this patch and made a video of it showing things working and
showing the issue with ddb.

https://www.youtube.com/watch?v=FwshltYmPvY


Home | Main Index | Thread Index | Old Index