Page MenuHomeFreeBSD

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

Authored by greg_unrelenting.technology on Apr 13 2019, 11:05 AM.

Details

Reviewers
andrew
Group Reviewers
arm64
Contributor Reviews (base)
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
Lint
Lint Skipped
Unit
Unit Tests Skipped