[OpenBIOS] [commit] r1288 - trunk/openbios-devel/arch/sparc64

repository service svn at openbios.org
Mon May 12 17:43:27 CEST 2014


Author: mcayland
Date: Mon May 12 17:43:22 2014
New Revision: 1288
URL: http://tracker.coreboot.org/trac/openbios/changeset/1288

Log:
SPARC64: increment ms counter at obp_tick_pointer on every timer interrupt

This is in preparation for a get-ms implementation for SPARC64.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/arch/sparc64/vectors.S

Modified: trunk/openbios-devel/arch/sparc64/vectors.S
==============================================================================
--- trunk/openbios-devel/arch/sparc64/vectors.S	Mon May 12 17:43:18 2014	(r1287)
+++ trunk/openbios-devel/arch/sparc64/vectors.S	Mon May 12 17:43:22 2014	(r1288)
@@ -276,7 +276,7 @@
 
 	.section ".data"
 	.align 8
-	.globl tlb_handler_stack_top, tlb_handler_stack_pointer
+	.globl tlb_handler_stack_top, tlb_handler_stack_pointer, obp_ticks_pointer
 
 	! Stack for the tlb MMU trap handlers
 tlb_handler_stack_bottom:
@@ -288,6 +288,10 @@
 tlb_handler_stack_pointer:
 	.xword tlb_handler_stack_top
 
+	! Pointer to current tick value
+obp_ticks_pointer:
+	.xword 0
+
         .section ".text", "ax"
 
 spill_32bit:
@@ -618,6 +622,18 @@
         and     %g1, %g2, %g1
         brnz,pn %g1, tick_compare_disabled
          nop
+
+        /* update tick value if pointer set */
+        setx    obp_ticks_pointer, %g3, %g1
+        ldx     [%g1], %g3
+        brz     %g3, tick_rearm
+         nop
+
+        ldx     [%g3], %g1
+        add     %g1, 10, %g1    ! 100Hz = 10ms
+        stx     %g1, [%g3]
+         
+tick_rearm:         
         set     TICK_INTERVAL, %g1
         add     %g1, %g2, %g1
         wr      %g1, 0, %tick_cmpr



More information about the OpenBIOS mailing list