Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sys/amd64: fallback to VGA text mode on headless systems
To:
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc:
tech@openbsd.org
Date:
Fri, 30 Jan 2026 23:20:55 +0100

Download raw body.

Thread
On Fri, 30 Jan 2026 23:05:37 +0100,
Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> 
> > Date: Fri, 30 Jan 2026 20:39:34 +0100
> > From: Kirill A. Korinsky <kirill@korins.ky>
> > 
> > On Tue, 27 Jan 2026 15:23:55 +0100,
> > Kirill A. Korinsky <kirill@korins.ky> wrote:
> > > 
> > > On Tue, 27 Jan 2026 13:18:50 +0100,
> > > Crystal Kolipe <kolipe.c@exoticsilicon.com> wrote:
> > > > 
> > > > On Tue, Jan 27, 2026 at 11:31:50AM +0000, Stuart Henderson wrote:
> > > > > On 2026/01/27 12:05, Kirill A. Korinsky wrote:
> > > > > > On Tue, 27 Jan 2026 10:21:02 +0100,
> > > > > > Crystal Kolipe <kolipe.c@exoticsilicon.com> wrote:
> > > > > > > Whilst it fixes your machine, how confident can we be that this is harmless on
> > > > > > > others?
> > > > > > > 
> > > > > > > It's perfectly valid to have no graphics hardware at all and run entirely from
> > > > > > > a serial console, so this could plausibly break machines that are currently
> > > > > > > working just fine.
> > > > > > > 
> > > > > > 
> > > > > > Well, here my assumption that on amd64, both the VGA legacy memory region
> > > > > > and I/O ports is still reserved and not used.
> > > > > 
> > > > > if my reading is correct then I think that is ok in this case (but I'm
> > > > > not 100%) ..
> > > > > 
> > > > > boot> machine mem
> > > > > Region 0: type 1 at 0x0 for 639KB
> > > > > Region 1: type 2 at 0x9fc00 for 1KB
> > > > > Region 2: type 2 at 0xf0000 for 64KB
> > > > > Region 3: type 1 at 0x100000 for 2078296KB
> > > > > Region 4: type 2 at 0x7ee96000 for 17832KB
> > > > > Region 5: type 2 at 0xf8000000 for 65536KB
> > > > > Region 6: type 2 at 0xfec10000 for 4KB
> > > > > Region 7: type 2 at 0xfed40000 for 20KB
> > > > > Low ram: 639KB  High ram: 2078296KB
> > > > > Total free memory: 2078935KB
> > > > 
> > > > The VGA memory space is certainly marked as reserved.
> > > > 
> > > > But 'reserved' doesn't mean that writing arbitrary values to those addresses
> > > > is harmless.
> > > > 
> > > 
> > > But for compatiblity it should stay reserved for VGA, and to reuse it for
> > > something else BIOS should have two code paths: when VGA is avaialbel and
> > > when it isn't.
> > > 
> > > This is quite small region and introduce two code path seems strange.
> > > 
> > > But, again, here many assumptions.
> > > 
> > 
> > Here the second attempt. This time it is looks safer.
> > 
> > Idea to scan PCI bus to find some VGA adapter and use it as primamary.
> > 
> > More or less similar with Loongson's approach.
> > 
> > It allows to boot this machine without serial and amdgpu and dmesg has:
> > 
> > ~ $ grep vga /var/run/dmesg.boot  
> > vga1 at pci13 dev 0 function 0 "ATI Raphael" rev 0xc9
> > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> > ~ $ 
> > 
> > which is expected.
> > 
> > Thoughts? Tests? OKs?
> 
> What about my suggestion to have a dummy framebuffer?
> 

I had tried, but I wasn't able make something that works.

Or better to say all my attemt leads to that machine still hungs.

Here hard part: this is remote machine, I haven't got access to serial
console on it, I can only boot it, or boot in "rescue mode" (Linux) or as
to attach KVM.

... and without the way to debug I can't figure out why and where it hangs.

-- 
wbr, Kirill