From owner-svn-src-head@FreeBSD.ORG Fri Nov 12 09:17:25 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 65779106566C; Fri, 12 Nov 2010 09:17:25 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC518FC14; Fri, 12 Nov 2010 09:17:24 +0000 (UTC) Received: by wya21 with SMTP id 21so614998wya.13 for ; Fri, 12 Nov 2010 01:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=KUZj1MzRGqUFIY2r3x5ZZfITFH0w29nIeviS84myCmQ=; b=IM1fuSTP6UXq+pZYf+gfH2bZSYK+B0HwmaI61fhQ401WZMsUnX6VVGhL3RhQJ9gH+m NNUuJitM5Wv7HRRPD3Wlx9xIFNKa++ZJ5q+d4vijxvLHo02q9dRgofLOzPKPENtJUn/C GBZpBBtw+zkJOV+ay0JFUmkregyWeNz7nKEUw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=N6YzSRCrwrxo0G2ZY3k4DyQ+yU/qecwFWCo9d5KwF7FuZz/X0T/vXLUh6lx3MIH6Bg B/hDMQHtKgkvkU4DQZatJNDi3n1JVAGhogkwKF+b2EdkA9mc0n6oKXLXavCRpbRJ4Xfg R4KW9dFSk5mpL6sJB7ngSwCpLW1/g5905bKvQ= MIME-Version: 1.0 Received: by 10.216.155.68 with SMTP id i46mr1649313wek.92.1289553442943; Fri, 12 Nov 2010 01:17:22 -0800 (PST) Received: by 10.216.234.82 with HTTP; Fri, 12 Nov 2010 01:17:22 -0800 (PST) In-Reply-To: <4CDCE57B.3000602@rice.edu> References: <201011111843.oABIhV9d080688@svn.freebsd.org> <4CDCE57B.3000602@rice.edu> Date: Fri, 12 Nov 2010 09:17:22 +0000 Message-ID: From: Paul B Mahol To: Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bernhard Schmidt Subject: Re: 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: Fri, 12 Nov 2010 09:17:25 -0000 On 11/12/10, Alan Cox wrote: > Bernhard Schmidt wrote: >> 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. >> >> > > It appears to me that these functions should be using > kmem_alloc_contig() and kmem_free() instead of contigmalloc() and > contigfree(). Then, the "cachetype" parameter could be correctly > implemented rather than ignored. It just requires mapping the cachetype > values to their corresponding vm_memattr_t values. Well, even if mapping is possible, I can't recognize every type in Windows, some of them are not documented: 0 MmNonCached 1 MmCached 2 MmWriteCombined 3 MmHardwareCoherentCached 4 MmNonCachedUnordered 5 MmUSWCCached 0 UNCACHEABLE 1 WRITE_COMBINING 2 WRITE_THROUGH 3 WRITE_PROTECTED 4 WRITE_BACK 5 UNCACHED