Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2010 09:32:39 +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: r215420 - head/sys/compat/ndis
Message-ID:  <201011170932.oAH9WdLe084876@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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),



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