Date: Thu, 11 Nov 2010 18:43:31 +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: r215135 - head/sys/compat/ndis Message-ID: <201011111843.oABIhV9d080688@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <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 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011111843.oABIhV9d080688>