Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2010 20:39:29 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215707 - head/sys/compat/ndis
Message-ID:  <201011222039.oAMKdTkL004980@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Mon Nov 22 20:39:29 2010
New Revision: 215707
URL: http://svn.freebsd.org/changeset/base/215707

Log:
  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:
  head/sys/compat/ndis/subr_ntoskrnl.c

Modified: head/sys/compat/ndis/subr_ntoskrnl.c
==============================================================================
--- head/sys/compat/ndis/subr_ntoskrnl.c	Mon Nov 22 20:23:18 2010	(r215706)
+++ head/sys/compat/ndis/subr_ntoskrnl.c	Mon Nov 22 20:39:29 2010	(r215707)
@@ -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?201011222039.oAMKdTkL004980>