NetBSD-Bugs archive

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

port-macppc/59529: POWERMAC_G5 trap setting color palette



>Number:         59529
>Category:       port-macppc
>Synopsis:       POWERMAC_G5 trap setting color palette
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 17 19:00:01 +0000 2025
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date 2025-06-05 11:30:23 Z
>Organization:
>Environment:
System: NetBSD
Architecture: powerpc
Machine: macppc
>Description:

If I try to boot the POWERMAC_G5 kernel on a Power Mac G5 model A1093,
it gets as far as attaching genfb, but immediately after the screen
switches from the small Open Firmware font and white background to
the larger wscons font and a black background, it gets into a loop
printing two lines like these over and over:

  [    1.0000000] trap: kernel read DSI trap @ 0x8070200c by 0xff848714 (DSISR 0x40000000, err=14), lr 0xff87a524
  [    1.0000000] Press a key to panic

This happens with kernels from the 10.1 release as well as -current.

The repeating messages cause any message from the initial error to
instantly scroll off the screen, but by modifying trap() to enter an
infinite loop, I managed to capture the initial error message, which
is a trap like this one:

  trap: kernel write DSI trap @ 0x916033d4 by 0xff848880 (DSISR 0x42000000, err=14), lr 0xff9ec9bc

The messages were manually transcribed so they may contain typos, and
the addresses will of course differ depending on the kernel version, etc.

By adding debug printfs, I managed to narrow down the location of
the crash to the following line in of_set_palette():

        OF_call_method_1("color!", ih, 4, r, g, b, index);

Based on the memory addresses in the trap messages, I suspect the trap
happens within Open Firmware.

The machine in case has an Nvidia graphics card.  I hear that this
problem does not affect G5s with Radeon cards, as they will attach
a radeonfb instead of genfb.

As a work-around, I have locally disabled genfb_init_palette() by
adding a return statement at the beginning of the function.  That
makes the system boot, but console output other than kernel
messages is black text on a black background.  As a further
work-around for that, I set WS_DEFAULT_FG=WSCOL_GREEN.  With these two
work-arounds, the kernel boots and the console is mostly readable, but
the colors are wrong (which of course is to be expected when setting
the palette is disabled), and the cursor is not visible.

>How-To-Repeat:

Boot a POWERMAC_G5 kernel on a Power Mac G5 with a Nvidia graphics
card.

>Fix:

Please.



Home | Main Index | Thread Index | Old Index