From owner-svn-src-head@FreeBSD.ORG Thu Nov 11 18:43:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E043E106566B; Thu, 11 Nov 2010 18:43:31 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFAE48FC08; Thu, 11 Nov 2010 18:43:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oABIhVih080690; Thu, 11 Nov 2010 18:43:31 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oABIhV9d080688; Thu, 11 Nov 2010 18:43:31 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011111843.oABIhV9d080688@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 11 Nov 2010 18:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215135 - head/sys/compat/ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 18:43:32 -0000 Author: bschmidt Date: Thu Nov 11 18:43:31 2010 New Revision: 215135 URL: http://svn.freebsd.org/changeset/base/215135 Log: According to specs for MmAllocateContiguousMemorySpecifyCache() physically contiguous memory with requested restrictions must be allocated. Submitted by: Paul B Mahol Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 11 18:41:03 2010 (r215134) +++ head/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 11 18:43:31 2010 (r215135) @@ -2426,12 +2426,9 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_t boundary; uint32_t cachetype; { - void *addr; - size_t pagelength = roundup(size, PAGE_SIZE); - addr = ExAllocatePoolWithTag(NonPagedPool, pagelength, 0); - - return (addr); + return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, + highest, PAGE_SIZE, boundary)); } static void @@ -2447,7 +2444,7 @@ MmFreeContiguousMemorySpecifyCache(base, uint32_t size; uint32_t cachetype; { - ExFreePool(base); + contigfree(base, size, M_DEVBUF); } static uint32_t