Using serial port on docking station

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
wildptr
Posts: 3
Joined: Thu Feb 04, 2021 3:50 am

Using serial port on docking station

Post by wildptr »

Hello fellow OS developers!

I'm trying to develop my OS for a real machine. The machine is a ThinkPad T400, which I'd like to connect to my dev machine via serial port for easier debugging. The ThinkPad does not have a serial port, but I have a docking station for it that does. However, even with the laptop in the docking station, the BIOS data area reports no available serial ports at all (I/O addresses for COM[1-4] are all 0) and indeed, serial loopback test on the usual address of COM1 (3F8h) fails. Also there is nothing on the PCI bus that resembles a serial port.

The serial port on the docking station works perfectly well on Windows XP out of the box. Now I have totally no idea how to get this port working. I can tell from Windows XP's Device Manager that the port is apparantly connected to the LPC interface of the ICH9. I've glanced through the datasheets but could not find out why it doesn't work.

Any ideas?
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Using serial port on docking station

Post by Octocontrabass »

Windows probably uses ACPI to handle dynamically allocating resources for the serial port when it's attached to the LPC bus.

If you don't want to use ACPI, you could mess with the LPC controller's PCI configuration registers (documented in the ICH9 datasheet) to enable the serial port address decoding, but there's no guarantee the dock will respond without additional configuration.
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Using serial port on docking station

Post by eekee »

Huh! I've been recommending old laptops with docking stations, but if they're like this, maybe I shouldn't. I've been happily using an X61 which is a lot older than a T400.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
xeyes
Member
Member
Posts: 212
Joined: Mon Dec 07, 2020 8:09 am

Re: Using serial port on docking station

Post by xeyes »

eekee wrote:Huh! I've been recommending old laptops with docking stations, but if they're like this, maybe I shouldn't. I've been happily using an X61 which is a lot older than a T400.
X6 ultrabase? Many modern 1 liter desktops still have native serial ports, like M75n iot.

Not sure whether it works with simple inb/outb though, can't find a serial to usb adapter now.

Maybe it is case by case and some are connected to the CPU in overly complicated ways :(
wildptr
Posts: 3
Joined: Thu Feb 04, 2021 3:50 am

Re: Using serial port on docking station

Post by wildptr »

Octocontrabass wrote:If you don't want to use ACPI, you could mess with the LPC controller's PCI configuration registers (documented in the ICH9 datasheet) to enable the serial port address decoding, but there's no guarantee the dock will respond without additional configuration.
Sadly, a quick examination of the relevant configuration registers shows that the ICH9 is already decoding I/O address 3F8h-3FFh. The device just isn't there for some reason. I'll take a look into the system's ACPI tables to figure out how to enable the serial port.
wildptr
Posts: 3
Joined: Thu Feb 04, 2021 3:50 am

Re: Using serial port on docking station

Post by wildptr »

I just found out that the serial port was disabled in BIOS. Stupid me. :oops:

Enabled it and everything is fine now.
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Using serial port on docking station

Post by eekee »

That's a relief! :D
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Post Reply