Page MenuHomeFreeBSD

Add a delayed VT attachment for ofwfb
Needs ReviewPublic

Authored by jhibbits on Jun 15 2018, 3:57 AM.



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.

Test Plan

Still need to test that I didn't break direct attachment.

Diff Detail

rS FreeBSD src repository - subversion
Lint OK
No Unit Test Coverage
Build Status
Buildable 17316
Build 17151: arc lint + arc unit

Event Timeline


No way for these to be the same driver?


It seems a bit weird to have a newbus device appear only if it's *not* the console.


How does this interact with drm consoles? I guess the probe bits compete later on? How about module loading of drm consoles?


"Open Firmware" usually has a space in it.

jhibbits added inline comments.

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().


If it's not the system console, but has all the makings of a video console.


Not sure. I don't have anything that can really use drm console right now. Maybe 'fb' device name is wrong for this.


Oops. I'll blame my chrome keyboard's tendency to forget I hit space.

jhibbits marked an inline comment as done.

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.


Is this tested on Apple hardware?


So? Don't you always want a newbus device, even if it is the console (like uart)?

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.


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...