Subversion Repositories Kolibri OS

Rev

Rev 5984 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5984 Rev 6339
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5984 $
8
$Revision: 6339 $
9
 
9
 
10
 
10
 
Line 54... Line 54...
54
        popfd
54
        popfd
55
        ret
55
        ret
Line 56... Line 56...
56
 
56
 
57
uglobal
57
uglobal
58
align 4
-
 
59
;  far_jump:
-
 
60
;   .offs dd ?
-
 
61
;   .sel  dw ?
58
align 4
62
   context_counter     dd 0 ;noname & halyavin
59
   context_counter     dd 0 ;noname & halyavin
63
   next_usage_update   dd 0
60
   next_usage_update   dd 0
64
   timer_ticks         dd 0
61
   timer_ticks         dd 0
65
;  prev_slot           dd ?
62
;  prev_slot           dd ?
Line 101... Line 98...
101
; set new stack after saving old
98
; set new stack after saving old
102
        mov     [esi+APPDATA.saved_esp], esp
99
        mov     [esi+APPDATA.saved_esp], esp
103
        mov     esp, [ebx+APPDATA.saved_esp]
100
        mov     esp, [ebx+APPDATA.saved_esp]
104
; set new thread io-map
101
; set new thread io-map
105
        mov     eax, [ebx+APPDATA.io_map]
102
        mov     eax, [ebx+APPDATA.io_map]
106
        mov     dword [page_tabs+((tss._io_map_0 and -4096) shr 10)], eax
103
;        mov     dword [page_tabs+((tss._io_map_0 and -4096) shr 9)], eax
107
        mov     eax, [ebx+APPDATA.io_map+4]
104
        mov     eax, [ebx+APPDATA.io_map+4]
108
        mov     dword [page_tabs+((tss._io_map_1 and -4096) shr 10)], eax
105
;        mov     dword [page_tabs+((tss._io_map_1 and -4096) shr 9)], eax
109
; set new thread memory-map
106
; set new thread memory-map
110
        mov     eax, [ebx+APPDATA.process]
107
        mov     eax, [ebx+APPDATA.process]
111
        cmp     eax, [current_process]
108
        cmp     eax, [current_process]
112
        je      @f
109
        je      @f
113
        mov     [current_process], eax
110
        mov     [current_process], eax
-
 
111
 
-
 
112
        mov     ecx, [eax+PROC.pdt_0_phys]
114
        mov     eax, [eax+PROC.pdt_0_phys]
113
        mov     eax, [eax+PROC.pdt_1_phys]
-
 
114
        or      ecx, PG_READ
-
 
115
        or      eax, PG_READ
-
 
116
        mov     [sys_pml3],   ecx
-
 
117
        mov     [sys_pml3+8], eax
-
 
118
 
-
 
119
        or      ecx, PG_SWR
-
 
120
        or      eax, PG_SWR
-
 
121
 
-
 
122
        mov     [sys_pml2+OS_BASE+8192-20*8], ecx
-
 
123
        mov     [sys_pml2+OS_BASE+8192-19*8], eax
-
 
124
 
-
 
125
        mov     eax, sys_pml3-OS_BASE
115
        mov     cr3, eax
126
        mov     cr3, eax
116
@@:
127
@@:
117
; set tss.esp0
128
; set tss.esp0
Line 118... Line 129...
118
 
129