From owner-freebsd-hackers Sun Dec 14 00:19:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA20380 for hackers-outgoing; Sun, 14 Dec 1997 00:19:48 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA20372 for ; Sun, 14 Dec 1997 00:19:38 -0800 (PST) (envelope-from gibbs@narnia.plutotech.com) Received: (from gibbs@localhost) by narnia.plutotech.com (8.8.8/8.7.3) id BAA07657; Sun, 14 Dec 1997 01:17:39 -0700 (MST) Date: Sun, 14 Dec 1997 01:17:39 -0700 (MST) Message-Id: <199712140817.BAA07657@narnia.plutotech.com> Mime-Version: 1.0 X-Newsreader: knews 0.9.8 References: <199712140658.WAA09916@rah.star-gate.com> In-Reply-To: <199712140658.WAA09916@rah.star-gate.com> From: gibbs@narnia.plutotech.com (Justin T. Gibbs) Subject: Bus/Processor specific I/O methods - was Re: Beginning SPARC port X-Original-Newsgroups: pluto.freebsd.hackers To: Amancio Hasty cc: hackers@FreeBSD.org Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk NetBSD has already dealt with this issue. It's called "bus.h". All of the new CAM SCSI drivers use a FreeBSD version of this file to perform device I/O. It also covers DMA and in fact the ISA bounce buffers that are used in CAM use "bus DMA" instead of the older bounce buffer scheme used in current. We shouldn't re-invent the wheel unless there are sound reasons to do so. Please review these files from a recent CAM snapshot to see if this is an acceptable solution to the problem: sys/i386/include/bus.h sys/i386/i386/busdma_machdep.c And to see how the APIs are used: sys/dev/aic7xxx/aic7xxx.h sys/dev/aic7xxx/aic7xxx.c sys/pci/ahc_pci.c These files are available in diff format in the archive: ftp://ftp.FreeBSD.org/pub/FreeBSD/cam/cam-971209.diffs.gz -- Justin T. Gibbs =========================================== FreeBSD - Turning PCs into workstations ===========================================