Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2010 11:48:47 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r215861 - stable/8/sys/compat/ndis
Message-ID:  <201011261148.oAQBmlnM038194@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Fri Nov 26 11:48:47 2010
New Revision: 215861
URL: http://svn.freebsd.org/changeset/base/215861

Log:
  MFC r215707:
  Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().
  According to the comment for MmIsAddressValid() there are issues on PAE
  kernels using pmap_kextract().
  
  Submitted by:	Paul B Mahol <onemda at gmail.com>

Modified:
  stable/8/sys/compat/ndis/subr_ntoskrnl.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/compat/ndis/subr_ntoskrnl.c
==============================================================================
--- stable/8/sys/compat/ndis/subr_ntoskrnl.c	Fri Nov 26 11:37:35 2010	(r215860)
+++ stable/8/sys/compat/ndis/subr_ntoskrnl.c	Fri Nov 26 11:48:47 2010	(r215861)
@@ -2544,6 +2544,12 @@ MmUnmapLockedPages(vaddr, buf)
  * here, but it doesn't.
  */
 
+static uint64_t
+MmGetPhysicalAddress(void *base)
+{
+	return (pmap_extract(kernel_map->pmap, (vm_offset_t)base));
+}
+
 uint8_t
 MmIsAddressValid(vaddr)
 	void			*vaddr;
@@ -4241,12 +4247,12 @@ image_patch_table ntoskrnl_functbl[] = {
 	IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3),
 	IMPORT_SFUNC(MmFreeContiguousMemory, 1),
 	IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3),
-	IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1),
 	IMPORT_SFUNC(MmSizeOfMdl, 1),
 	IMPORT_SFUNC(MmMapLockedPages, 2),
 	IMPORT_SFUNC(MmMapLockedPagesSpecifyCache, 6),
 	IMPORT_SFUNC(MmUnmapLockedPages, 2),
 	IMPORT_SFUNC(MmBuildMdlForNonPagedPool, 1),
+	IMPORT_SFUNC(MmGetPhysicalAddress, 1),
 	IMPORT_SFUNC(MmIsAddressValid, 1),
 	IMPORT_SFUNC(MmMapIoSpace, 3 + 1),
 	IMPORT_SFUNC(MmUnmapIoSpace, 2),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011261148.oAQBmlnM038194>