Page 1 of 1

Accessing Serial Port (0x2F8) on modern hardware

Posted: Sat Nov 29, 2025 4:29 pm
by papst
I'm debugging a type-1 hypervisor that's showing undefined behavior. Without a proper kernel debugger on this system, I've been printing internal state to the serial port at 0x2F8 and piping that through VMware. However, VMware's nested virtualization has limitations, and I need to test the hypervisor on actual hardware.

My test motherboard is a Gigabyte B550 AORUS ELITE V2, which has no built-in serial ports, making debugging difficult.

Is there any way to “redirect” or emulate serial output through a USB port?

Regards

Re: Accessing Serial Port (0x2F8) on modern hardware

Posted: Sat Nov 29, 2025 8:07 pm
by MichaelPetch
I don't believe it is possible on real hardware via USB dongles as you generally need a USB stack and then a USB serial driver. I'm not sure about your real hardware but if it has PCI slots you can still find some PCI cards that can still present themselves as legacy interrupts and on legacy ports.

Re: Accessing Serial Port (0x2F8) on modern hardware

Posted: Mon Dec 01, 2025 8:44 am
by bellezzasolo
MichaelPetch wrote: Sat Nov 29, 2025 8:07 pm I don't believe it is possible on real hardware via USB dongles as you generally need a USB stack and then a USB serial driver. I'm not sure about your real hardware but if it has PCI slots you can still find some PCI cards that can still present themselves as legacy interrupts and on legacy ports.
i think PCIe is possible too. Something like the PEX1S1P952 advertises compatibility with Windows 95. It is guesswork that that means ISA ports, though.

Re: Accessing Serial Port (0x2F8) on modern hardware

Posted: Mon Dec 01, 2025 11:51 am
by Octocontrabass
PCI(e) serial port cards won't use the legacy I/O ports or IRQs. They're also not standardized, but most are vaguely descended from the 8250 UART, so it won't be too difficult to adapt a legacy serial port driver if your hypervisor can prevent the guest from messing with it.

Linux recognizes an enormous list of PCI(e) serial port cards, including lots of device-specific quirks. If you're having trouble getting your card to work, you should see if Linux does anything special with it.