[OpenBIOS] r563 - trunk/openbios-devel/arch/sparc64

svn at openbios.org svn at openbios.org
Fri Aug 21 21:15:56 CEST 2009


Author: blueswirl
Date: 2009-08-21 21:15:55 +0200 (Fri, 21 Aug 2009)
New Revision: 563

Modified:
   trunk/openbios-devel/arch/sparc64/entry.S
Log:
Enable timer after trap table is initialized

Signed-off-by: igor.v.kovalenko at gmail.com
Signed-off-by: Blue Swirl <blauwirbel at gmail.com>

Modified: trunk/openbios-devel/arch/sparc64/entry.S
===================================================================
--- trunk/openbios-devel/arch/sparc64/entry.S	2009-08-21 19:15:46 UTC (rev 562)
+++ trunk/openbios-devel/arch/sparc64/entry.S	2009-08-21 19:15:55 UTC (rev 563)
@@ -47,8 +47,8 @@
         wrpr    %g0, 0, %canrestore
         wrpr    %g0, 0, %otherwin
         wrpr    %g0, 0, %wstate
-        ! 100 Hz timer
-        set     10 * 1000 * 1000, %g1
+        ! disable timer now
+        setx    0x8000000000000000, %g2, %g1
         wr      %g1, 0, %tick_cmpr
 
         ! Disable I/D MMUs and caches
@@ -319,6 +319,12 @@
         /* Finally, turn on traps so that we can call c-code. */
 	wrpr    %g0, (PSTATE_PRIV|PSTATE_PEF|PSTATE_IE), %pstate
 
+        ! 100 Hz timer
+        rd      %tick, %g2
+        set     10 * 1000 * 1000, %g1
+        add     %g1, %g2, %g1
+        wr      %g1, 0, %tick_cmpr
+
         /* Switch to our main context.
          * Main context is statically defined in C.
          */




More information about the OpenBIOS mailing list