From owner-freebsd-hackers Tue Jul 23 02:33:51 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA01829 for hackers-outgoing; Tue, 23 Jul 1996 02:33:51 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA01775 for ; Tue, 23 Jul 1996 02:33:37 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id RAA23165; Tue, 23 Jul 1996 17:15:35 +1000 Date: Tue, 23 Jul 1996 17:15:35 +1000 From: Bruce Evans Message-Id: <199607230715.RAA23165@godzilla.zeta.org.au> To: peter@palin.cc.monash.edu.au, se@zpr.uni-koeln.de Subject: Re: PCI driver Cc: freebsd-hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >Just use a context diff between the pre-PCI >version and the current version to see the >changes to the existing ISA code and study >the if_ed_p.c file for a simple example of >the attach code. >I haven't looked into this in detail, but I >guess that converting the Cyclom driver is >only a matter of half an hour ... In the Linux Cyclades driver, the PCI versions seems to use a different i/o mapping. 8-bit hardware registers are memory mapped to 16-bit boundaries for ISA and to 32-bit boundaries for PCI and the conversions for this are done at runtime by shifting by 1 or 2. In the FreeBSD ISA driver, the conversions are done at compile time by always shifting by 1. Thus the FreeBSD PCI version probably can't simply call the ISA version. It needs to make the conversion dynamic (and slower) or arrange for the PCI version to be a different driver. The latter is the best way but it is harder to configure (the standard driver must be compiled twice with slightly different i/o macros to give different objects...). Bruce