Subject: Re: pciide performance on alpha
To: Andreas Johansson <ajo@wopr.campus.luth.se>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-alpha
Date: 08/12/1999 21:08:08
On Thu, Aug 12, 1999 at 08:59:20PM +0200, Andreas Johansson wrote:
> About the pciide driver, it seems your FreeBSD based driver does something
> right that my Linux based driver does not. After I trixed it to setup my
> IO addresses and enable the channels by hand, it actually works as
> expected!
> 
> ajo@ymer /home/ajo #time dd if=/dev/rwd1c of=/dev/null bs=64k count=2048
> 2048+0 records in
> 2048+0 records out
> 134217728 bytes transferred in 12 secs (11184810 bytes/sec)
> 0.004u 0.408s 0:12.13 3.2%      0+0k 6+1io 7pf+0w
> 
> Time to try the real disk...

Cool ! I'll try to have a look at the cypress driver then.

> 
> 
> 
> This is what I had to add:
> 
> -----------------------------------------------------------------------------
>         bus_addr_t addr, forceaddr = 0x8000;
>         int        i;
> 
>         /* XXX Force IO addresses as BIOS doesn't set them up for me */
>         for (i = 0x10; i <= 0x20; i += 4) {
>                 addr = pci_conf_read (sc->sc_pc, sc->sc_tag, i);
>                 printf ("%s: Changing IO from 0x%lx to 0x%lx\n",
>                         sc->sc_wdcdev.sc_dev.dv_xname,
>                         addr & ~7, /* addr & 0xfff8 */
>                         forceaddr);
>                         
>                 pci_conf_write (sc->sc_pc, sc->sc_tag,
>                                 i, /* addr & 0xfff8 */
>                                 forceaddr | PCI_MAPREG_TYPE_IO);
>                 forceaddr += 16;
>         }
>         /* Enable channels (not enabled on alpha???) */
>         st |= PDC246_STATE_EN(0);
>         st |= PDC246_STATE_EN(1);
> -----------------------------------------------------------------------------
> 
> How do we solve the problem that the IO addresses of this card aren't
> setup to any resonable values?   Mostly, they seem to be located over
> 0x10000 (not valid), and I've even seen overlapping addresses.

Well, it seems your firmware is really brocken.

Do you have the BIOS ROM on your board ? If so try to remove it.
Maybe the alpha firmare tries to run it (with i386 emulation, as it is done
for VGA) and it gets this really wrong.

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