Using PCI serial ports for debugging
Modern systems usually don’t come with a built-in serial port anymore. This is unconvenient for low level debugging, since the serial port allows access to early boot log as well as kernel debugger, even when the display or keyboard are not working.
It is fortunately possible to add a serial port over the PCI bus on machines which have appropriate expansion ports. This can be done using expresscard, mini-PCI, or PCI express ports.
Devices known to work
Dexlan XMT01A (
https://www.accessoires-informatiques.com/Prix/EXPRESSCARD-PCIE-POUR-PORTABLE-23842.html
)Uses MOSCHIP 9922 controller
Devices to be tested
https://smile.amazon.com/Industrial-Desktop-Bracket-Moschip-MCS9922/dp/B003D3MFHM/
Configuring
- Install the card in your computer
- Boot Haiku and look in the syslog for the PCI bus scan for the device:
Write down the address of “base reg 0”, this is where the serial port registers are mapped (it is probably possible to get this information from lspci on Linux as well?)
Configure serial debug in config/settings/kernel/drivers/kernel:
Now your kernel is configured to send its output to the serial port. You can connect another machine to it (using an USB to serial adapter and a NULL modem cable, for example) and use SerialConnect or a similar tool to see the output and access the KDL prompt.
Happy debugging!