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?
Using serial port on docking station
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Using serial port on docking station
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.
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.
Re: Using serial port on docking station
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
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: Using serial port on docking station
X6 ultrabase? Many modern 1 liter desktops still have native serial ports, like M75n iot.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.
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
Re: Using serial port on docking station
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.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.
Re: Using serial port on docking station
I just found out that the serial port was disabled in BIOS. Stupid me.
Enabled it and everything is fine now.
Enabled it and everything is fine now.
Re: Using serial port on docking station
That's a relief!
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
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie