Subversion Repositories Kolibri OS

Rev

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

Rev 1267 Rev 1271
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;
2
;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved.
3
;; Copyright (C) KolibriOS team 2004-2009. All rights reserved.
4
;; PROGRAMMING:
4
;; PROGRAMMING:
5
;; Ivan Poddubny
5
;; Ivan Poddubny
6
;; Marat Zakiyanov (Mario79)
6
;; Marat Zakiyanov (Mario79)
7
;; VaStaNi
7
;; VaStaNi
8
;; Trans
8
;; Trans
Line 16... Line 16...
16
;; Iliya Mihailov (Ghost)
16
;; Iliya Mihailov (Ghost)
17
;; Sergey Semyonov (Serge)
17
;; Sergey Semyonov (Serge)
18
;; Johnny_B
18
;; Johnny_B
19
;; SPraid (simba)
19
;; SPraid (simba)
20
;; Hidnplayr
20
;; Hidnplayr
-
 
21
;; Alexey Teplov ()
21
;;
22
;;
22
;; Data in this file was originally part of MenuetOS project which is
23
;; Data in this file was originally part of MenuetOS project which is
23
;; distributed under the terms of GNU GPL. It is modified and redistributed as
24
;; distributed under the terms of GNU GPL. It is modified and redistributed as
24
;; part of KolibriOS project under the terms of GNU GPL.
25
;; part of KolibriOS project under the terms of GNU GPL.
25
;;
26
;;
Line 54... Line 55...
54
;;
55
;;
55
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 56... Line 57...
56
 
57
 
Line 57... Line 58...
57
include 'macros.inc'
58
include 'macros.inc'
Line 58... Line 59...
58
 
59
 
Line 59... Line 60...
59
$Revision: 1267 $
60
$Revision: 1271 $
Line 3378... Line 3379...
3378
; 3 - disable cache. Ret 0 in eax. Ret nothing. Block. ok.
3379
; 3 - disable cache. Ret 0 in eax. Ret nothing. Block. ok.
3379
;eax
3380
;eax
3380
;3 - rdmsr. Counter in edx. (edx:eax) [esi:edi, edx] => [edx:esi, ecx]. Ret in ebx:eax. Block. ok.
3381
;3 - rdmsr. Counter in edx. (edx:eax) [esi:edi, edx] => [edx:esi, ecx]. Ret in ebx:eax. Block. ok.
3381
;4 - wrmsr. Counter in edx. (edx:eax) [esi:edi, edx] => [edx:esi, ecx]. Ret in ebx:eax. Block. ok.
3382
;4 - wrmsr. Counter in edx. (edx:eax) [esi:edi, edx] => [edx:esi, ecx]. Ret in ebx:eax. Block. ok.
3382
;---------------------------------------------------------------------------------------------
3383
;---------------------------------------------------------------------------------------------
-
 
3384
sys_sheduler:   
-
 
3385
;rewroterd by   15.11.2009
-
 
3386
     test	eax,eax		
-
 
3387
     jz         shed_counter    ;eax=0
-
 
3388
     dec	eax             
-
 
3389
     jz         not_supported   ;eax=1
-
 
3390
     dec	eax
-
 
3391
     jz         perf_control    ;eax=2
-
 
3392
     dec	eax
-
 
3393
     jz		rdmsr_instr     ;eax=3
-
 
3394
     dec	eax
-
 
3395
     jz		wrmsr_instr     ;eax=4
3383
sys_sheduler: ;noname & halyavin
3396
; old sys_sheduler ;noname & halyavin
3384
    cmp eax,0
3397
;    cmp eax,0
3385
    je shed_counter
3398
;    je shed_counter
3386
    cmp eax,2
3399
;    cmp eax,2
3387
    je perf_control
3400
;    je perf_control
3388
    cmp eax,3
3401
;    cmp eax,3
3389
    je rdmsr_instr
3402
;    je rdmsr_instr
3390
    cmp eax,4
3403
;    cmp eax,4
3391
    je wrmsr_instr
3404
;    je wrmsr_instr
3392
    cmp eax,1
3405
;    cmp eax,1
3393
    jne not_supported
3406
;    jne not_supported
3394
    call change_task ;delay,0
3407
;    call change_task ;delay,0
-
 
3408
not_supported:
3395
ret
3409
ret
3396
shed_counter:
3410
shed_counter:
3397
    mov eax,[context_counter]
3411
    mov eax,[context_counter]
3398
    mov [esp+36],eax
3412
    mov [esp+36],eax
3399
not_supported:
3413
;not_supported:
3400
ret
3414
ret
3401
perf_control:
3415
perf_control:
3402
    inc eax ;now eax=3
3416
;    inc eax ;now eax=3
-
 
3417
    add eax,3		;
3403
    cmp ebx,eax
3418
    cmp ebx,eax
3404
    je cache_disable
3419
    je cache_disable
3405
    dec eax
3420
    dec eax
3406
    cmp ebx,eax
3421
    cmp ebx,eax
3407
    je cache_enable
3422
    je cache_enable