[LinuxBIOS] filo ide speedup patch!

Peter Stuge stuge-linuxbios at cdy.org
Sat Apr 7 04:03:25 CEST 2007


On Fri, Apr 06, 2007 at 06:07:58PM -0400, Tom Sylla wrote:
> Peter Stuge wrote:
> >> If you don't want to do that much work, you may want to at least
> >> try to use rep insd when you can. It is faster. All relatively
> >> modern IDE controllers support it just fine. (Some older
> >> controllers do not, however)

How old by the way? ISA old? VLB old? Early PCI old?


> > Would insd be less compatible than insw? I don't want to compromise
> > compatibility.
> 
> Well, maybe, but no more that doing multiple sector reads without 
> checking if the drive can do them :)

Hehe! :)


> You really should be checking word 47 of the IDENTIFY DEVICE data to
> know how many sectors per interrupt are transferred for READ/WRITE
> MULTIPLE. I didn't see that in your patch any where.

Right, but I'm still using READ SECTOR(S), just with Sector Count > 1
so I don't think I need SET MULTIPLE MODE.


> In general, the various IDE speed-ups can only be done when the
> drive, the controller, and the chipset can do them. Sometimes,
> there is a defined way to detect if they are supported. The ID data
> is usually a good place to look first.

Aye, but nothing seems relevant for READ SECTOR(S).


> We used ATACT and ATAMDT from Hale a lot, and always ran 32 bit
> mode. The default of 16 *is* probably to be safe, but you would
> have to have a pretty crusty IDE controller for it not to support
> 32-bit PIO.
> 
> You may want to try 32 bit mode, and see how much it speeds things
> up; if it isn't worth it, ignore me. If it is a reasonable gain,
> maybe make it a build option or whatever is equivalent for FILO.

On a 1GHz CPU it reduced load time with 48%.

Excellent idea! Said and done. :)


> > Ward's SATA drive/controller reports BSY=0 DRQ=0 at first and BSY=0
> > DRQ=1 one PIO cycle later.
> 
> You will find all sorts of inconsistencies and non-spec-compliant IDE 
> devices brand new. Any one trying to write another IDE driver encounters
> these sorts of things. :) SATA drives and controllers are notorious for
> doing poor PIO emulation.

Ack. :(


//Peter




More information about the coreboot mailing list