From owner-svn-src-head@FreeBSD.ORG Sat Jan 25 21:52:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFF64D6; Sat, 25 Jan 2014 21:52:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8ED1A83; Sat, 25 Jan 2014 21:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PLqKux014520; Sat, 25 Jan 2014 21:52:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PLqJQ6014519; Sat, 25 Jan 2014 21:52:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401252152.s0PLqJQ6014519@svn.freebsd.org> From: Warner Losh Date: Sat, 25 Jan 2014 21:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261171 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 21:52:20 -0000 Author: imp Date: Sat Jan 25 21:52:19 2014 New Revision: 261171 URL: http://svnweb.freebsd.org/changeset/base/261171 Log: Bus space handles need to be the VA of the requested resource, not the rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary. Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Sat Jan 25 20:58:05 2014 (r261170) +++ head/sys/arm/at91/at91.c Sat Jan 25 21:52:19 2014 (r261171) @@ -65,11 +65,13 @@ at91_bs_map(void *t, bus_addr_t bpa, bus pa = trunc_page(bpa); if (pa >= AT91_PA_BASE + 0xff00000) { - *bshp = pa - AT91_PA_BASE + AT91_BASE; + *bshp = bpa - AT91_PA_BASE + AT91_BASE; return (0); } - if (pa >= AT91_BASE + 0xff00000) + if (pa >= AT91_BASE + 0xff00000) { + *bshp = bpa; return (0); + } endpa = round_page(bpa + size); *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa);