In some cases, /chosen/stdout is not the VGA console. In this case there may still be a viable console. This adds a device node under vgapci* if it's a viable OFW device tree node.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 17316 Build 17151: arc lint + arc unit
Event Timeline
sys/dev/vt/hw/ofwfb/ofwfb.c | ||
---|---|---|
90 | No way for these to be the same driver? | |
522 | It seems a bit weird to have a newbus device appear only if it's *not* the console. | |
525 | How does this interact with drm consoles? I guess the probe bits compete later on? How about module loading of drm consoles? | |
551 | "Open Firmware" usually has a space in it. |
sys/dev/vt/hw/ofwfb/ofwfb.c | ||
---|---|---|
90 | I think they could be the same. I mentioned this on IRC just a few minutes ago. If I move the /chosen handling code into the ofwfb_probe function instead, that might suffice, so that it's not looking for /chosen properties in the ofwfb_init(). | |
522 | If it's not the system console, but has all the makings of a video console. | |
525 | Not sure. I don't have anything that can really use drm console right now. Maybe 'fb' device name is wrong for this. | |
551 | Oops. I'll blame my chrome keyboard's tendency to forget I hit space. |
Reduce the diff, by sharing the same VT driver between the early attach and delayed attach. This required moving some config setting into the probe routine, but that should be fine.
What is needed to get this in tree? Testing on Apple hardware was mentioned. What should be tested?
@tuexen this needs revisited to clean up a bit. As @nwhitehorn mentioned, it looks a little strange in how it attaches, so I need to rethink it. Right now the patch exists to help those who have a Talos or Blackbird and want to boot from serial, but output to the onboard VGA/HDMI.
sys/dev/vt/hw/ofwfb/ofwfb.c | ||
---|---|---|
522 | Newbus should always have a node if the hardware is there... console or not is something else and should have no influence on this choice. |
@jhibbits Thanks for the explanation. I'm using it on a blackbird. I have also a G5 Powermac in my lab, so if there is a need for testing, just let me know. I would like to run an unmodified version of FreeBSD just to make sure I don't commit anything by accident...
Justin, I tested this patch on Blackbird and it looks good, just need to be rebased to latest main. Also tested it along with D30626.
I didn't check how does it interact with loader.conf(5) "console" parameter: should it suppress the attachment if user explicitly sets console=comconsole? ; Should it attach only if user explicitly sets console="comconsole,vidconsole" or console="vidconsole" and the /chosen device is the serial?