Page MenuHomeFreeBSD

Match PCI UART devices using PCI data from the ACPI SPCR table
Needs ReviewPublic

Authored by val_packett.cool on Apr 13 2019, 11:05 AM.
Tags
Referenced Files
Unknown Object (File)
Thu, Oct 2, 2:56 AM
Unknown Object (File)
Sat, Sep 27, 12:35 AM
Unknown Object (File)
Fri, Sep 26, 10:11 AM
Unknown Object (File)
Sun, Sep 21, 2:17 PM
Unknown Object (File)
Sat, Sep 20, 2:10 AM
Unknown Object (File)
Wed, Sep 17, 3:31 PM
Unknown Object (File)
Wed, Sep 17, 3:20 PM
Unknown Object (File)
Sep 16 2025, 5:10 PM
Subscribers

Details

Reviewers
andrew
Group Reviewers
arm64
Contributor Reviews (src)
Summary

(continuing from https://reviews.freebsd.org/D19507)

uart_bus_probe matches discovered devices to system devices using resource addresses (uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)).

The Amazon EC2 UART has different addresses in ACPI (0x90A0000) and PCI (0x80118000). Let's use the PCI address from the SPCR table to match PCIe UART devices.

This fixes userspace console logging (without an UART device, there's no tty, only kernel prints work).

Test Plan

Tested on EC2 a1 instances (ttyu1 appears only with the patch) and on ACPI systems with non-PCI UARTs like my MACCHIATObin desktop (no harm)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped