Created attachment 219562 [details] Changes to sys/dev/uart to support UART_DEV_DBGPORT in uart_bus_fdt.c NOTE: This patch is a re-worked copy of another one attached to the review D5986 [1]. Support of UART_DEV_DBGPORT in addition to UART_DEV_CONSOLE added to uart_bus_fdt.c where "hw.fdt.debug" can override the FDT settings. The following properties are looked at in /chosen for the debug node: freebsd,debug-path. I tested it on BeagleBone Black, but I also have BeagleBone (white) and RPi2 model B to check this patch if necessary. [1] https://reviews.freebsd.org/D5986
Review: https://reviews.freebsd.org/D27422
A commit references this bug: Author: mhorne Date: Wed Dec 2 21:01:53 UTC 2020 New revision: 368284 URL: https://svnweb.freebsd.org/changeset/base/368284 Log: uart: allow UART_DEV_DBGPORT for fdt consoles Allow fdt devices to be used as debug ports for gdb(4). A debug console can be specified with the "freebsd,debug-path" property in the device tree's /chosen node, or using the environment variable hw.fdt.dbgport. The device should be specified by its name in the device tree, for example hw.fdt.dbgport="serial2". PR: 251053 Submitted by: Dmitry Salychev <dsl@mcusim.org> Submitted by: stevek (original patch, D5986) Reviewed by: andrew, mhorne Differential Revision: https://reviews.freebsd.org/D27422 Changes: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_cpu_fdt.c head/sys/dev/uart/uart_cpu_fdt.h