[LinuxBIOS] EPIA and -M TSC and HARD_RESET changes from symposium 06

Peter Stuge stuge-linuxbios at cdy.org
Fri May 11 01:33:38 CEST 2007


Repost with some cosmetic improvements over last patch.


//Peter
-------------- next part --------------
Changes by Richard Smith and Peter Stuge from the LinuxBIOS symposium 2006.

With CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2=0, 1 million outb():s are used for timer calibration, which takes about one second.

All EPIA-M boards have timer2 so we use it to boot faster.
Only some EPIA boards have the Nehemiah CPU with timer2 so we default to IO calibration but add the TSC options so that they can be set in Config.lb.

src/mainboard/via/epia*/reset.c is dead code (entire file within #if 0) so we set HAVE_HARD_RESET=0 for both boards.

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 2657)
+++ 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 2657)
+++ src/mainboard/via/epia/Options.lb	(working copy)
@@ -11,6 +11,8 @@
 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 +83,15 @@
 ##
 ## Build code to reset the motherboard from linuxBIOS
 ##
-default HAVE_HARD_RESET=1
+default HAVE_HARD_RESET=0
 
 ##
 ## use io based udelay function
+## disable IO and enable TSC on Nehemiah boards
 ##
 default CONFIG_UDELAY_IO=1
+default CONFIG_UDELAY_TSC=0
+default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2=0
 
 ##
 ## Build code to export a programmable irq routing table
Index: targets/via/epia/Config.lb
===================================================================
--- targets/via/epia/Config.lb	(revision 2657)
+++ targets/via/epia/Config.lb	(working copy)
@@ -1,6 +1,11 @@
 # Sample config file for EPIA
 # This will make a target directory of ./epia
 
+## uncomment these three lines if you have a Nehemiah CPU to boot 1s faster
+#option CONFIG_UDELAY_IO=0
+#option CONFIG_UDELAY_TSC=1
+#option CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2=1
+
 target epia
 mainboard via/epia
 option MAXIMUM_CONSOLE_LOGLEVEL=9


More information about the coreboot mailing list