From owner-freebsd-commit Tue Sep 5 16:29:03 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id QAA10603 for freebsd-commit-outgoing; Tue, 5 Sep 1995 16:29:03 -0700 Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id QAA10590 for cvs-all-outgoing; Tue, 5 Sep 1995 16:29:01 -0700 Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id QAA10577 for cvs-sys-outgoing; Tue, 5 Sep 1995 16:29:00 -0700 Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.6.11/8.6.6) with ESMTP id QAA10567 ; Tue, 5 Sep 1995 16:28:53 -0700 Received: from corbin.Root.COM (corbin [198.145.90.34]) by Root.COM (8.6.12/8.6.5) with ESMTP id QAA01460; Tue, 5 Sep 1995 16:27:49 -0700 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id QAA25464; Tue, 5 Sep 1995 16:29:45 -0700 Message-Id: <199509052329.QAA25464@corbin.Root.COM> To: Stefan Esser , CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/pci ncr.c In-reply-to: Your message of "Tue, 05 Sep 95 15:59:38 PDT." <199509052259.PAA25428@corbin.Root.COM> From: David Greenman Reply-To: davidg@Root.COM Date: Tue, 05 Sep 1995 16:29:45 -0700 Sender: commit-owner@FreeBSD.org Precedence: bulk >>se 95/09/05 15:38:02 >> >> Modified: sys/pci ncr.c >> Log: >> The NCR script has grown beyond one page (4KB). Since malloc() returns >> contiguous memory in virtual space, but doesn't guarantee any particular >> physical layout of pages, the script may be not contguous in physical >> memory. This made the first write command fail in very rare cases. >> This has been fixed by checking the region returned by malloc() for >> being contiguous, but there should be a physical memory allocate >> and later mapping to virtual memory instead. >> >> A few assertions and error messages are improved. > > I wrote a routine specifically for allocating physically contiguous memory. >Take a look at vm_page_alloc_contig() in vm/vm_page.c. BTW, this routine is designed to only be called during system startup. If you need to allocate the memory dynamically, then this won't work... -DG