[LinuxBIOS] filo ide speedup patch?
Peter Stuge
stuge-linuxbios at cdy.org
Thu Mar 15 21:27:48 CET 2007
On Thu, Mar 15, 2007 at 07:37:07PM +0100, Stefan Reinauer wrote:
> * Peter Stuge <peter at stuge.se> [070309 05:20]:
> > Hey,
> >
> > On Tue, Mar 06, 2007 at 03:19:08PM -0500, Ward Vandewege wrote:
> > > Stefan said you wrote a patch at the last symposium to make filo
> > > read several blocks at once from an ide device, and that that sped
> > > reading from IDE up by about 70%.
> > >
> > > Do you happen to have that code lying around somewhere? I'd like
> > > to see it integrated in FILO.
> >
> > Hmm.
> >
> > I'm not sure that it ever happened.
> >
> > I don't remember writing it.. And it's not in my filo source dir..
> >
> > I remember us talking about it, but don't remember any code...
>
> Ah, sorry, I thought you made something on the Symposium last year.
> I do remember you looked at the problem though. What was your
> suggestion? Reading multiple blocks at once or something?
It was someone else's suggestion (Ron maybe?) but I'm afraid I don't
remember looking into it. Looking at the FILO code now it's not very
familiar, but my memory may also have been drowned in malt beverage.
:)
ide_read_sector_* only reads one sector at a time and could instead
read up to 256. fs/blockdev.c:devread() always memcpy():s every
sector as well . Lots of room for improvement here. :)
> > I do have two patches for the EPIA LB code though, one for
> > HARD_RESET and one for using rdtsc to calibrate the timer.
> >
> > I should get them into the tree. Will try to do that next week.
>
> please! whenever you find the time.
>
> Lots of people still use FILO. (Even though I try to talk it down
> while trying to find someone to look into the Grub2 port)
Find attached a patch for timer2 and hard reset. I'm looking at FILO
right now.
//Peter
-------------- next part --------------
Changes by Richard Smith and me from the LinuxBIOS symposium 2006.
Without CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 1 million outb():s are used for timer calibration and that takes over one second.
EPIA boards have the x86 timer2 so let's use it and make boot faster.
src/mainboard/via/epia*/reset.c is dead code so HARD_RESET should be 0. (entire file within #if 0)
Signed-off-by: Peter Stuge <peter at stuge.se>
Index: src/mainboard/via/epia-m/Options.lb
===================================================================
--- src/mainboard/via/epia-m/Options.lb (revision 2570)
+++ src/mainboard/via/epia-m/Options.lb (working copy)
@@ -38,6 +38,7 @@
uses MAXIMUM_CONSOLE_LOGLEVEL
uses CONFIG_CONSOLE_SERIAL8250
uses CONFIG_UDELAY_TSC
+uses CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
uses CONFIG_PCI_ROM_RUN
uses CONFIG_CONSOLE_VGA
uses CONFIG_MAX_PCI_BUSES
@@ -66,11 +67,12 @@
## Use TSC for udelay.
##
default CONFIG_UDELAY_TSC=1
+default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2=1
##
## Build code to reset the motherboard from linuxBIOS
##
-default HAVE_HARD_RESET=1
+default HAVE_HARD_RESET=0
##
## Build code to export a programmable irq routing table
Index: src/mainboard/via/epia/Options.lb
===================================================================
--- src/mainboard/via/epia/Options.lb (revision 2570)
+++ src/mainboard/via/epia/Options.lb (working copy)
@@ -10,7 +10,8 @@
uses USE_FALLBACK_IMAGE
uses HAVE_FALLBACK_BOOT
uses HAVE_HARD_RESET
-uses CONFIG_UDELAY_IO
+uses CONFIG_UDELAY_TSC
+uses CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
uses HAVE_OPTION_TABLE
uses USE_OPTION_TABLE
uses CONFIG_ROM_PAYLOAD
@@ -81,12 +82,13 @@
##
## Build code to reset the motherboard from linuxBIOS
##
-default HAVE_HARD_RESET=1
+default HAVE_HARD_RESET=0
##
-## use io based udelay function
+## use TSC based udelay function
##
-default CONFIG_UDELAY_IO=1
+default CONFIG_UDELAY_TSC=1
+default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2=1
##
## Build code to export a programmable irq routing table
More information about the coreboot
mailing list