From owner-freebsd-hackers Thu Mar 15 10:59:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from tantalum.btinternet.com (tantalum.btinternet.com [194.73.73.80]) by hub.freebsd.org (Postfix) with ESMTP id 6B3C837B719 for ; Thu, 15 Mar 2001 10:59:22 -0800 (PST) (envelope-from oh@btinternet.com) Received: from [213.1.77.238] (helo=adelie.btinternet.com) by tantalum.btinternet.com with esmtp (Exim 3.03 #83) id 14dcxy-0003g0-00 for freebsd-hackers@freebsd.org; Thu, 15 Mar 2001 18:59:18 +0000 Received: from btinternet.com (localhost [127.0.0.1]) by adelie.btinternet.com (8.11.1/8.11.1) with ESMTP id f2FIx2i03080 for ; Thu, 15 Mar 2001 18:59:04 GMT (envelope-from oh@btinternet.com) Message-Id: <200103151859.f2FIx2i03080@adelie.btinternet.com> To: freebsd-hackers@freebsd.org From: Orion Hodson Subject: bus_space_alloc (formerly bus_space_foo) Date: Thu, 15 Mar 2001 18:59:02 +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi I've been writing a driver for the S3 Sonicvibes audio card. The card is PCI, but has 7 io ports. The PCI initialization stops after 5 ports have been mapped out (constants are hardcoded in sys/pci so reasonable to assume this fits with PCI spec). The netbsd version of this driver uses bus_space_alloc to deal with the other two ports, but that function never made it from NetBSD to FreeBSD. Is there a workaround or equivalent? Or a driver that deals with the same problem? [ What the code does just now is examine the initial 5 io port allocations and then pick 2 non-overlapping port spaces between them for the unallocated ports. This is gross, but works for the time being (likely not future proof, but assumptions could be hardcoded to prevent driver loading if not met). A snapshot of the driver is at http://www.cs.ucl.ac.uk/staff/O.Hodson/misc/s3vibes.c - playback works, recording maybe, XXX marks the spot of resource fun. Feedback appreciated. ] Kind Regards - Orion. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message