Having a serial port is a nice feature for an osdev programmer; unfortunately many modern PCs and laptops lack it. My Latitude E5470 happens to have an UART port right in the middle of it's motherboard so I've decided to make use of it.
The machine's EFI firmware provides 2 options for this supposedly debug port in the NVRAM Setup variable: enabling UART as a simple serial port available somewhere in ACPI namespace (I guess, in that case the port is detected via DSDT/SSDT tables; I haven't found that detection code in linux kernel yet though) or as a Debug Port specified in DBGP/DBG2 tables (those are used by the Windows SoC for debugging). Needless to say, using debug port tables is much easier than interpreting AML-coded ACPI tables. However, linux kernel doesn't support using DBGP tables to enable /dev/tty*, only as an early_printk debugging interface and only USB EHCI/XHCI debug ports. There are a couple of patches enabling it for MMIO & IO ports however they were prevented from getting to mainline because of Microsoft-connected licensing concerns (sic!); yet they're not easy to be used as a reference implementation; you can find these patches in linux kernel mailing lists.
After soldering an external port to the internal UART pins I have managed to use it (both RXD and TXD communications with other computer) as a simple /dev/ttyS0 by enabling it as a serial port, so I know the port is actually working.
There's very little information available on this topic, so I'm very curious about others' experiences with it. I have tried accessing MMIO registers specified in DBGP using same offsets from IO COM ports but it has given no result so far. Are offsets the same for IO and MMIO ports? How are memory mapped serial ports usually handled?
Ilya


