From owner-freebsd-hackers Wed Jul 23 19:48:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA02536 for hackers-outgoing; Wed, 23 Jul 1997 19:48:19 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id TAA02531 for ; Wed, 23 Jul 1997 19:48:14 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id DAA25440; Thu, 24 Jul 1997 03:46:54 +0200 From: Luigi Rizzo Message-Id: <199707240146.DAA25440@labinfo.iet.unipi.it> Subject: Re: getting physically contiguous memory in the kernel To: jas@flyingfox.com (Jim Shankland) Date: Thu, 24 Jul 1997 03:46:54 +0200 (MET DST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199707232315.QAA10162@biggusdiskus.flyingfox.com> from "Jim Shankland" at Jul 23, 97 04:14:44 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Is there an easy way to get physically contiguous memory in the FreeBSD > kernel? The de driver calls malloc() to obtain a buffer, part of which > must be physically contiguous; this buffer has now grown to be > 4K, > causing the transmit descriptors to span a page boundary. When the > 2 pages are not physically contiguous, the driver breaks. look at contigmalloc() or (probably better) vm_page_alloc_contig(). The latter is used in /sys/pci/brooktree848.c for the brooktree driver and /sys/pci/meteor.c for the meteor driver. The former is generally used for allocating buffers for use with the ISA DMA. Cheers Luigi