Date: Sat, 25 Jan 2014 21:52:19 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261171 - head/sys/arm/at91 Message-ID: <201401252152.s0PLqJQ6014519@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401252152.s0PLqJQ6014519>