Subversion Repositories Kolibri OS

Rev

Rev 3462 | Rev 3486 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3462 Rev 3481
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
Line 74... Line 74...
74
$Revision: 3462 $
74
$Revision: 3481 $
Line 835... Line 835...
835
        mov     esi, 250            ; wait 1/4 a second
835
        mov     esi, 250            ; wait 1/4 a second
836
        call    delay_ms
836
        call    delay_ms
837
        rdtsc   ;call  _rdtsc
837
        rdtsc   ;call  _rdtsc
838
        sti
838
        sti
839
        sub     eax, ecx
839
        sub     eax, ecx
-
 
840
        xor     edx, edx
-
 
841
        shld    edx, eax, 2
840
        shl     eax, 2
842
        shl     eax, 2
-
 
843
        mov     dword [cpu_freq], eax
841
        mov     [CPU_FREQ], eax       ; save tsc / sec
844
        mov     dword [cpu_freq+4], edx
842
;       mov ebx, 1000000
845
        mov     ebx, 1000000
843
;       div ebx
846
        div     ebx
844
; ¢®®¡é¥-â® ¯à®¨§¢®¤¨â¥«ì­®áâì ¢ ¤ ­­®¬ ª®­ªà¥â­®¬ ¬¥áâ¥
847
; ¢®®¡é¥-â® ¯à®¨§¢®¤¨â¥«ì­®áâì ¢ ¤ ­­®¬ ª®­ªà¥â­®¬ ¬¥áâ¥
845
; ᮢ¥à襭­® ­¥ªà¨â¨ç­ , ­® çâ®¡ë § âª­ãâì «î¡¨â¥«¥©
848
; ᮢ¥à襭­® ­¥ªà¨â¨ç­ , ­® çâ®¡ë § âª­ãâì «î¡¨â¥«¥©
846
; ®¯â¨¬¨§¨àãîé¨å ª®¬¯¨«ïâ®à®¢ Ÿ‚“...
849
; ®¯â¨¬¨§¨àãîé¨å ª®¬¯¨«ïâ®à®¢ Ÿ‚“...
847
        mov     edx, 2251799814
850
;        mov     edx, 2251799814
848
        mul     edx
851
;        mul     edx
849
        shr     edx, 19
852
;        shr     edx, 19
850
        mov     [stall_mcs], edx
853
        mov     [stall_mcs], edx
851
; PRINT CPU FREQUENCY
854
; PRINT CPU FREQUENCY
852
        mov     esi, boot_cpufreq
855
        mov     esi, boot_cpufreq
853
        call    boot_log
856
        call    boot_log
Line 2238... Line 2241...
2238
        mov     eax, [idleusesec]
2241
        mov     eax, [idleusesec]
2239
        mov     [esp+32], eax
2242
        mov     [esp+32], eax
2240
        ret
2243
        ret
2241
;------------------------------------------------------------------------------
2244
;------------------------------------------------------------------------------
2242
sysfn_getcpuclock:              ; 18.5 = GET TSC/SEC
2245
sysfn_getcpuclock:              ; 18.5 = GET TSC/SEC
2243
        mov     eax, [CPU_FREQ]
2246
        mov     eax, dword [cpu_freq]
2244
        mov     [esp+32], eax
2247
        mov     [esp+32], eax
2245
        ret
2248
        ret
2246
;------------------------------------------------------------------------------
2249
;------------------------------------------------------------------------------
-
 
2250
get_cpu_freq:
-
 
2251
        mov     eax, dword [cpu_freq]
-
 
2252
        mov     edx, dword [cpu_freq+4]
-
 
2253
        ret
2247
;  SAVE ramdisk to /hd/1/menuet.img
2254
;  SAVE ramdisk to /hd/1/menuet.img
2248
;!!!!!!!!!!!!!!!!!!!!!!!!
2255
;!!!!!!!!!!!!!!!!!!!!!!!!
2249
   include 'blkdev/rdsave.inc'
2256
   include 'blkdev/rdsave.inc'
2250
;!!!!!!!!!!!!!!!!!!!!!!!!
2257
;!!!!!!!!!!!!!!!!!!!!!!!!
2251
;------------------------------------------------------------------------------
2258
;------------------------------------------------------------------------------