[LinuxBIOS] filo ide speedup patch?

Stefan Reinauer stepan at coresystems.de
Sun Mar 18 18:25:30 CET 2007


* Peter Stuge <stuge-linuxbios at cdy.org> [070317 04:43]:
> > I'm looking at FILO right now.
> 
> I've hacked FILO to read up to 256 blocks per ATA command now, but am
> repeatedly getting some bad data here and there already in the first
> 10kb at kern_addr.
 
Can all devices read 256 blocks at once? Does the problem happen with
16 blocks, too?

> The two hexdumps don't change after reset.

You mean, the error is always at the same position? 

> There's a note in ide.c:pio_data_in() :
>         /* FIXME handle commands with multiple blocks */
> 
> ..but looking at the ATA PDF the code looks OK as it is, plus I'm
> getting bad data already in the first sector. Dunno.
 
Do you ever get a timeout? Is the ndelay too short for multiple blocks?

try udelay(1) instead. The openbios ide driver reads IDEREG_ASTATUS 4
times before delaying. Also, it waits 1000 times for the drive to become
ready, while the FILO driver only seems to try 1 time?
 
maybe it makes sense to port the openbios ide driver (ie clean out the
device tree hooks)? 

It knows how to do multiple blocks and it knows hot to do ATAPI
correctly. And cleaning this up might make it easily usable for GRUB2
as well..? 

> --- single_sector_read_kernel	2007-03-17 03:41:21.000000000 +0100
> +++ multi_sector_read_kernel	2007-03-17 03:40:01.000000000 +0100
> @@ -3,27 +3,27 @@
>  00100020   32 00 00 00 02 00 00 00 45 4c 46 42 6f 6f 74 00  2.......ELFBoot.
>  00100030   30 2e 35 20 28 73 74 75 67 65 40 63 61 72 65 70  0.5 (stuge at carep
>  00100040   61 64 34 29 20 53 61 74 20 4d 61 72 20 31 37 20  ad4) Sat Mar 17 
> -00100050   30 33 3a 34 30 3a 30 38 20 43 45 54 20 32 30 30  03:40:08 CET 200
> +00100050   30 33 3a 33 38 3a 34 38 20 43 45 54 20 32 30 30  03:38:48 CET 200

It's hard to day what is wrong and what is not, as it seems to load two
different versions of filo. Can you try loading the same version of
filo?

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/




More information about the coreboot mailing list