[SeaBIOS] [PATCH] timer: Delay timestamp counter init until after pmtimer is probed

Kevin O'Connor kevin at koconnor.net
Wed Jul 22 22:11:05 CEST 2015


Delay call to timer_setup() until after the xxx_platform_setup() calls
so that the pmtimer can be detected first.  Most modern machines will
have a pmtimer and calibrating the timestamp counter is frequently
unnecessary.

Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/post.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/post.c b/src/post.c
index 8cb7b7c..6803585 100644
--- a/src/post.c
+++ b/src/post.c
@@ -168,13 +168,15 @@ platform_hardware_setup(void)
     pic_setup();
     thread_setup();
     mathcp_setup();
-    timer_setup();
-    clock_setup();
 
     // Platform specific setup
     qemu_platform_setup();
     coreboot_platform_setup();
 
+    // Setup timers and periodic clock interrupt
+    timer_setup();
+    clock_setup();
+
     // Initialize TPM
     tpm_setup();
 }
-- 
1.9.3




More information about the SeaBIOS mailing list