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)
Sat, Mar 9, 8:47 PM
Unknown Object (File)
Feb 23 2024, 11:25 AM
Unknown Object (File)
Jan 12 2024, 5:02 PM
Unknown Object (File)
Dec 23 2023, 1:52 AM
Unknown Object (File)
Dec 15 2023, 8:12 PM
Unknown Object (File)
Dec 13 2023, 8:14 AM
Unknown Object (File)
Sep 2 2023, 8:47 PM
Unknown Object (File)
Sep 1 2023, 5:07 AM
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