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), _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"