Subject: Re: IDE interface at PCI bus?
To: None <bsieker@techfak.uni-bielefeld.de>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 12/03/1998 15:31:24
On Dec 2, Bernd Sieker wrote
> 
> Hi,
> 
> again one of those stupid hardware quastions...
> 
> I use NetBSD-1.3.2.
> 
> As most more recent PCs my board has 2 (E)IDE interfaces onboard,
> supposedly connected via the PCI bus.
> 
> However, the kernel configuration file does not have options for ide
> buses at pci, and although the kernel detects it like: 
> 
>   vendor 0x1106 product 0x0571 (IDE mass storage, interface 0x8a,\
> 	revision 0x06) at pci0 dev 7 function 1 not configured
> 
> it still configures only wdc0 at isa0 port 0x1f0-0x1f7 irq 14.
> 
> Does this have any meaning for performance, or is it just that the IDE
> interface resides "logically" on the ISA bus?
> 
> My board also supports UDMA/33 transfers, but NetBSD only uses:
>   wd0: using 16-sector 16-bit pio transfers, lba mode
> 
> I'm not an expert in PC hardware, so maybe anyone could clarify the
> situation here? I did not find anything in the FAQs.

Well, modern PCs use 'pciide' controllers, which are on the PCI bus
(often integrated in a multi-function chip which also has the PCI-ISA
bridge, and eventually (common now) an USB controller). Most of these
pciide controllers offer 2 IDE channels which supports DMA, and now
Ultra-DMA modes of operations.
For compatibility, pciide can uses the same registers and IRQ as the
old ISA ide primary and secondary controllers (this is called the
'compatibility mode'). For now I've only seen controllers that
are configured to use this compatibility mode.

NetBSD 1.3.2 doesn't have a driver for pciide controllers; but as
these controllers handle the ISA-compatible registers, NetBSD will
find it as 2 ISA controllers. Of course it will not use DMA modes,
so this will impact performances (not really disks transfers speed, but
CPU usage for these transferts).

NetBSD-current has a pciide driver, which supports DMA for a few pciide
controller (the most used ones - including yours which is a "VIA Technologies
VT82C586A IDE Controller"). This driver is also available as an unofficial
patch for 1.3.2 in
ftp://ftp.netbsd.org/pub/NetBSD/arch/i386/ide-1.3.2/. You'll find
a precompiled GENERIC kernel, along with sources patche (and a README
for instructions :)

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--