Index: sys/dev/uart/uart_cpu_fdt.c =================================================================== --- sys/dev/uart/uart_cpu_fdt.c +++ sys/dev/uart/uart_cpu_fdt.c @@ -122,6 +122,7 @@ { const char *propnames[] = {"stdout-path", "linux,stdout-path", "stdout", "stdin-path", "stdin", NULL}; + const char *propname_dbg[] = "{"freebsd,debug-path", NULL}; const char **name; struct uart_class *class; phandle_t node, chosen; @@ -135,8 +136,16 @@ if (!err) return (0); - if (devtype != UART_DEV_CONSOLE) + switch (devtype) { + case UART_DEV_CONSOLE: + cp = kern_getenv("hw.fdt.console"); + break; + case UART_DEV_DBGPORT: + cp = kern_getenv("hw.fdt.debug"); + break; + default: return (ENXIO); + } /* Has the user forced a specific device node? */ cp = kern_getenv("hw.fdt.console"); @@ -146,7 +155,11 @@ */ node = -1; if ((chosen = OF_finddevice("/chosen")) != -1) { - for (name = propnames; *name != NULL; name++) { + if (devtype == UART_DEV_DBGPORT) + name = propnames_dbg; + else + name = propnames; + for (; *name != NULL; name++) { if (phandle_chosen_propdev(chosen, *name, &node) == 0) break;