Date: Fri, 22 Mar 2019 06:28:37 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345406 - head/sys/dev/uart Message-ID: <201903220628.x2M6SbJh002796@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Fri Mar 22 06:28:37 2019 New Revision: 345406 URL: https://svnweb.freebsd.org/changeset/base/345406 Log: Initialize uart_bus_space_mem. This value was being used uninitialized, resulting in predictable issues on systems with memory-mapped UART registers. A case could be made that memmap_bus should be declared in a header rather than being declared in each .c file which needs to refer to it, but that's a broader style question. This commit unbreaks hw.uart.console="mm:..." on ARM64. Submitted by: Greg V Modified: head/sys/dev/uart/uart_cpu_arm64.c Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Fri Mar 22 06:21:03 2019 (r345405) +++ head/sys/dev/uart/uart_cpu_arm64.c Fri Mar 22 06:28:37 2019 (r345406) @@ -65,8 +65,9 @@ __FBSDID("$FreeBSD$"); /* * UART console routines. */ +extern struct bus_space memmap_bus; bus_space_tag_t uart_bus_space_io; -bus_space_tag_t uart_bus_space_mem; +bus_space_tag_t uart_bus_space_mem = &memmap_bus; int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903220628.x2M6SbJh002796>