From owner-freebsd-questions Wed Jun 19 16:33:33 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA02457 for questions-outgoing; Wed, 19 Jun 1996 16:33:33 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA02452 for ; Wed, 19 Jun 1996 16:33:31 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA14478; Wed, 19 Jun 1996 16:30:37 -0700 From: Terry Lambert Message-Id: <199606192330.QAA14478@phaeton.artisoft.com> Subject: Re: ?: allocating physical memory for a driver To: msaal@qosnet.com (Michael Saal) Date: Wed, 19 Jun 1996 16:30:36 -0700 (MST) Cc: questions@FreeBSD.org In-Reply-To: <31C80975.41C67EA6@qosnet.com> from "Michael Saal" at Jun 19, 96 02:06:45 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > I am writing a driver for a bus mastering ISA card. > > How do I allocate physical memory and make sure that is located below > the 16M boundry addressable by the ISA bus? > > Is malloc("memory size", M_DEVBUF, M_NOWAIT) sufficient? If it is I > don't see how you can make sure the memory is in the right range with > out testing the resulting pointer. Look at the DMA stuff in (for instance) the aha1542 driver; it's pretty straight-forward. If you use the standard routines, bouncing will be done for you. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.