svn commit: r215420 - head/sys/compat/ndis

Bernhard Schmidt bschmidt at FreeBSD.org
Wed Nov 17 09:32:40 UTC 2010


Author: bschmidt
Date: Wed Nov 17 09:32:39 2010
New Revision: 215420
URL: http://svn.freebsd.org/changeset/base/215420

Log:
  Fix a panic on i386 for drivers using MmAllocateContiguousMemory()
  and MmAllocateContiguousMemorySpecifyCache().
  
  Those two functions take 64-bit variable(s) for their arguments. On i386
  that takes additional 32-bit variable per argument. This is required so
  that windrv_wrap() can correctly wrap function that miniport driver calls
  with stdcall convention. Similar explanation is provided in subr_ndis.c for
  other functions.
  
  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	Wed Nov 17 09:28:17 2010	(r215419)
+++ head/sys/compat/ndis/subr_ntoskrnl.c	Wed Nov 17 09:32:39 2010	(r215420)
@@ -4237,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = {
 	IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2),
 	IMPORT_SFUNC(IoAllocateMdl, 5),
 	IMPORT_SFUNC(IoFreeMdl, 1),
-	IMPORT_SFUNC(MmAllocateContiguousMemory, 2),
-	IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5),
+	IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1),
+	IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3),
 	IMPORT_SFUNC(MmFreeContiguousMemory, 1),
 	IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3),
 	IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1),


More information about the svn-src-head mailing list