[openfirmware] [commit] r1982 - in cpu/x86: . pc/olpc/via

repository service svn at openfirmware.info
Thu Oct 14 23:56:33 CEST 2010


Author: wmb
Date: Thu Oct 14 23:56:33 2010
New Revision: 1982
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1982

Log:
Added some variants of t( to prepare for timers with narrow width and different granularity.

Modified:
   cpu/x86/acpitimer.fth
   cpu/x86/pc/olpc/via/fsupdate.fth
   cpu/x86/tsc.fth

Modified: cpu/x86/acpitimer.fth
==============================================================================
--- cpu/x86/acpitimer.fth	Thu Oct 14 11:20:33 2010	(r1981)
+++ cpu/x86/acpitimer.fth	Thu Oct 14 23:56:33 2010	(r1982)
@@ -78,6 +78,7 @@
    <#  u# u# u#  [char] , hold  u# u#s u#>  type  ."  uS "
    pop-base
 ;
+: t-sec(  ( -- )  t(  ;
 : ))t-sec  ( -- sec )  ))t1  d# 3,580,000 um/mod nip  ;
 : )t-sec  ( -- )
    ))t-sec  ( seconds )
@@ -91,6 +92,7 @@
    <# u# u#s u#> type ." :" <# u# u# u#> type ." :" <# u# u# u#>  type
    pop-base
 ;
+: t-hms(  ( -- )  t(  ;
 : )t-hms  ( -- )  ))t-sec  .hms  ;
 [then]
 

Modified: cpu/x86/pc/olpc/via/fsupdate.fth
==============================================================================
--- cpu/x86/pc/olpc/via/fsupdate.fth	Thu Oct 14 11:20:33 2010	(r1981)
+++ cpu/x86/pc/olpc/via/fsupdate.fth	Thu Oct 14 23:56:33 2010	(r1982)
@@ -230,7 +230,7 @@
 
    linefeed over force-line-delimiter  ( fd )
 
-   t(                                  ( fd )
+   t-hms(                              ( fd )
    also nand-commands                  ( fd )
    ['] include-file catch  ?dup  if    ( x error )
       nip .error

Modified: cpu/x86/tsc.fth
==============================================================================
--- cpu/x86/tsc.fth	Thu Oct 14 11:20:33 2010	(r1981)
+++ cpu/x86/tsc.fth	Thu Oct 14 23:56:33 2010	(r1982)
@@ -53,6 +53,7 @@
    <#  u# u# u#  [char] , hold  u# u#s u#>  type  ."  uS "
    pop-base
 ;
+: t-sec(  ( -- )  t(  ;
 : )t-sec  ( -- )
    ))t  us-factor d# 1,000,000 *  um/mod nip  ( seconds )
    push-decimal
@@ -65,6 +66,7 @@
    <# u# u#s u#> type ." :" <# u# u# u#> type ." :" <# u# u# u#>  type
    pop-base
 ;
+: t-hms(  ( -- )  t(  ;
 : )t-hms
    ))t  us-factor d# 1,000,000 *  um/mod nip  ( seconds )
    .hms



More information about the openfirmware mailing list