From owner-svn-src-all@FreeBSD.ORG Mon Sep 28 17:10:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE3B3106566B; Mon, 28 Sep 2009 17:10:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE02D8FC13; Mon, 28 Sep 2009 17:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SHAR3B060583; Mon, 28 Sep 2009 17:10:27 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SHAR9V060581; Mon, 28 Sep 2009 17:10:27 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200909281710.n8SHAR9V060581@svn.freebsd.org> From: Alan Cox Date: Mon, 28 Sep 2009 17:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197580 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2009 17:10:27 -0000 Author: alc Date: Mon Sep 28 17:10:27 2009 New Revision: 197580 URL: http://svn.freebsd.org/changeset/base/197580 Log: Temporarily disable the use of 1GB page mappings by the direct map. There are currently two problems with the use of 1GB page mappings by the direct map. First, at least one device driver uses pmap_extract() rather than DMAP_TO_PHYS() to translate a direct map address to a physical address. Unfortunately, neither pmap_extract() nor pmap_kextract() yet support 1GB page mappings. Second, pmap_bootstrap() needs to interrogate the MTRRs to ensure that a 1GB page mapping doesn't span two MTRRs of different types. Reported and tested by: Daniel O'Connor MFC after: 3 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 28 16:59:47 2009 (r197579) +++ head/sys/amd64/amd64/pmap.c Mon Sep 28 17:10:27 2009 (r197580) @@ -442,7 +442,7 @@ create_pagetables(vm_paddr_t *firstaddr) if (ndmpdp < 4) /* Minimum 4GB of dirmap */ ndmpdp = 4; DMPDPphys = allocpages(firstaddr, NDMPML4E); - if ((amd_feature & AMDID_PAGE1GB) == 0) + if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) DMPDphys = allocpages(firstaddr, ndmpdp); dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT; @@ -476,7 +476,7 @@ create_pagetables(vm_paddr_t *firstaddr) /* Now set up the direct map space using either 2MB or 1GB pages */ /* Preset PG_M and PG_A because demotion expects it */ - if ((amd_feature & AMDID_PAGE1GB) == 0) { + if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) { for (i = 0; i < NPDEPG * ndmpdp; i++) { ((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT; ((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS |