From owner-svn-src-all@freebsd.org Mon Dec 18 14:29:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45122E8EC4F; Mon, 18 Dec 2017 14:29:50 +0000 (UTC) (envelope-from bde@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 mx1.freebsd.org (Postfix) with ESMTPS id 0FAA67CD8D; Mon, 18 Dec 2017 14:29:49 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBIETmHG035653; Mon, 18 Dec 2017 14:29:48 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBIETm3R035652; Mon, 18 Dec 2017 14:29:48 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201712181429.vBIETm3R035652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Mon, 18 Dec 2017 14:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326933 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 326933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 18 Dec 2017 14:29:50 -0000 Author: bde Date: Mon Dec 18 14:29:48 2017 New Revision: 326933 URL: https://svnweb.freebsd.org/changeset/base/326933 Log: Also forgotten in the previous that removed the permanent double mapping of low physical memory: Update the comment about leaving the permanent mapping in place. This also improves the wording of the comment. PTD 0 is still left alone because it is fairly important that it was unmapped earlier, and the comment now describes the unmapping of the other low PTDs that the code actually does. Reviewed by: kib Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Dec 18 13:53:22 2017 (r326932) +++ head/sys/i386/i386/pmap.c Mon Dec 18 14:29:48 2017 (r326933) @@ -493,9 +493,13 @@ pmap_bootstrap(vm_paddr_t firstaddr) virtual_avail = va; /* - * Leave in place an identity mapping (virt == phys) for the low 1 MB - * physical memory region that is used by the ACPI wakeup code. This - * mapping must not have PG_G set. + * Finish removing the identity mapping (virt == phys) of low memory. + * It was only used for 2 instructions in locore. locore then + * unmapped the first PTD to get some null pointer checks. ACPI + * wakeup will map the first PTD transiently to use it for 1 + * instruction. The double mapping for low memory is not usable in + * normal operation since it breaks trapping of null pointers and + * causes inconsistencies in page tables when combined with PG_G. */ for (i = 1; i < NKPT; i++) PTD[i] = 0;