Date: Tue, 25 Sep 2018 20:07:58 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338932 - head/sys/amd64/amd64 Message-ID: <201809252007.w8PK7wwc041910@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Sep 25 20:07:58 2018 New Revision: 338932 URL: https://svnweb.freebsd.org/changeset/base/338932 Log: Fix some uses of dmaplimit. dmaplimit is the first byte after the end of DMAP. Reported by: "Johnson, Archna" <Archna.Johnson@netapp.com> Reviewed by: alc, markj Approved by: re (gjb) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D17318 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 25 19:53:19 2018 (r338931) +++ head/sys/amd64/amd64/pmap.c Tue Sep 25 20:07:58 2018 (r338932) @@ -1422,7 +1422,7 @@ pmap_init(void) if (ppim->va == 0) continue; /* Make the direct map consistent */ - if (ppim->pa < dmaplimit && ppim->pa + ppim->sz < dmaplimit) { + if (ppim->pa < dmaplimit && ppim->pa + ppim->sz <= dmaplimit) { (void)pmap_change_attr(PHYS_TO_DMAP(ppim->pa), ppim->sz, ppim->mode); } @@ -7055,7 +7055,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mo * If the specified range of physical addresses fits within * the direct map window, use the direct map. */ - if (pa < dmaplimit && pa + size < dmaplimit) { + if (pa < dmaplimit && pa + size <= dmaplimit) { va = PHYS_TO_DMAP(pa); if (!pmap_change_attr(va, size, mode)) return ((void *)(va + offset));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809252007.w8PK7wwc041910>