Repository navigation
gr2: use only the low byte of a textport colour - #829
Merged
Merged
Conversation
OpenBSD's GR2 console sends PUC_COLOR as rasops' 8-bit colour with the index repeated in all four bytes (0x07070707 for index 7). PUC_COLOR loaded the low 12 bits into the red channel, 0x707, which the default pixel format clamps to 255. Every kernel message in OpenBSD 6.9's installer drew white glyphs on a white cell: white rectangles (techomancer#775). A textport pixel is one byte, so take the low byte. The PROM and NetBSD send small indices and are unaffected. Tested: a new unit test sends 0x07070707 and expects pixel 7, and fails without the change (255). OpenBSD 6.9's boot log is readable on an indigo2_ip28 with a GR2 XZ, white on blue. The GR2 PROM menu is byte-identical before and after. What the real microcode does with the upper bytes is inferred from OpenBSD working on real boards, not known. Fixes: 5d07b4d ("added gr2 support")
jamesbraid
marked this pull request as ready for review
November 22, 2026 10:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenBSD 6.9's boot messages on a GR2 came out as white rectangles. OpenBSD's console sends PUC_COLOR as rasops' 8-bit colour with the index repeated in all four bytes (
0x07070707for index 7). iris loaded the low 12 bits into the red channel,0x707, which the default pixel format clamps to 255. The glyphs were white on a white cell.A textport pixel is one byte, so PUC_COLOR now keeps the low byte. The PROM and NetBSD send small indices and are unaffected.
Tested:
0x07070707and expects pixel 7. It fails without the change (255).indigo2_ip28with a GR2 XZ, white on blue.What the real microcode does with the upper bytes is inferred from OpenBSD working on real boards, not known. OpenBSD's later lines also needed #824 (narrow DRAWCHAR rows), so #775 needs both.
Fixes #775