From owner-svn-src-all@freebsd.org Fri Mar 22 06:28:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D93B155C4BE; Fri, 22 Mar 2019 06:28:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B604F6CAAA; Fri, 22 Mar 2019 06:28:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F47C1C82D; Fri, 22 Mar 2019 06:28:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2M6SbPN002797; Fri, 22 Mar 2019 06:28:37 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2M6SbJh002796; Fri, 22 Mar 2019 06:28:37 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201903220628.x2M6SbJh002796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 22 Mar 2019 06:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345406 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 345406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B604F6CAAA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 06:28:38 -0000 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)