Date: Mon, 28 Sep 2009 17:10:27 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197580 - head/sys/amd64/amd64 Message-ID: <200909281710.n8SHAR9V060581@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909281710.n8SHAR9V060581>