Subversion Repositories Kolibri OS

Rev

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

Rev 400 Rev 418
Line 145... Line 145...
145
           mov eax, 1
145
           mov eax, 1
146
           xchg eax, [application_table_status]
146
           xchg eax, [application_table_status]
147
           cmp eax, 0
147
           cmp eax, 0
148
           jne .wait_lock
148
           jne .wait_lock
Line 149... Line -...
149
 
-
 
150
;           pushfd
-
 
151
;           cli
-
 
152
 
149
 
Line 153... Line 150...
153
           call set_application_table_status
150
           call set_application_table_status
154
 
151
 
155
           call get_new_process_place
152
           call get_new_process_place
Line 387... Line 384...
387
           jz .fail
384
           jz .fail
388
           mov [dir_addr], eax
385
           mov [dir_addr], eax
389
           stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
386
           stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
Line 390... Line 387...
390
 
387
 
391
           mov edi, [tmp_task_pdir]
388
           mov edi, [tmp_task_pdir]
392
           mov ecx, (page_tabs shr 20)/4
389
           mov ecx, (OS_BASE shr 20)/4
-
 
390
           xor eax, eax
393
           xor eax, eax
391
           cld
Line 394... Line -...
394
           rep stosd
-
 
395
 
-
 
396
           mov eax, [dir_addr]
-
 
397
           or eax, PG_SW
-
 
398
           stosd
-
 
399
 
392
           rep stosd
400
           mov esi, sys_pgdir+(OS_BASE shr 20)
393
 
401
           mov ecx, (OS_BASE shr 20)/4
394
           mov ecx, (OS_BASE shr 20)/4
Line 402... Line 395...
402
           cld
395
           mov esi, sys_pgdir+(OS_BASE shr 20)
-
 
396
           rep movsd
-
 
397
 
-
 
398
           mov eax, [dir_addr]
-
 
399
           or eax, PG_SW
403
           rep movsd
400
           mov [edi-4096+(page_tabs shr 20)], eax
Line 404... Line 401...
404
 
401
 
405
           mov eax, [dir_addr]
402
           and eax, -4096
406
           call set_cr3
403
           call set_cr3
Line 549... Line 546...
549
 
546
 
550
           mov eax, [pg_dir]
547
           mov eax, [pg_dir]
551
           and eax, not 0xFFF
548
           and eax, not 0xFFF
552
           stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
549
           stdcall map_page,[tmp_task_pdir],eax,dword PG_SW
553
           mov esi, [tmp_task_pdir]
550
           mov esi, [tmp_task_pdir]
554
           mov edi, (page_tabs shr 20)/4
551
           mov edi, (OS_BASE shr 20)/4
555
.destroy:
552
.destroy:
556
           mov eax, [esi]
553
           mov eax, [esi]
557
           test eax, 1
554
           test eax, 1
558
           jz .next
555
           jz .next
Line 940... Line 937...
940
 
937
 
941
           locals
938
           locals
942
             pl0_stack dd ?
939
             pl0_stack dd ?
Line 943... Line 940...
943
           endl
940
           endl
944
 
941
 
Line 945... Line 942...
945
           stdcall kernel_alloc, 0x2000
942
           stdcall kernel_alloc, RING0_STACK_SIZE+512
Line 946... Line 943...
946
           mov [pl0_stack], eax
943
           mov [pl0_stack], eax
947
 
944
 
Line 948... Line 945...
948
           lea edi, [eax+0x2000-512]
945
           lea edi, [eax+RING0_STACK_SIZE]
Line 1068... Line 1065...
1068
           mov [edi+TSS._fs],app_data
1065
           mov [edi+TSS._fs],app_data
1069
           mov [edi+TSS._gs],graph_data ;selector of graphic segment
1066
           mov [edi+TSS._gs],graph_data ;selector of graphic segment
1070
           mov [edi+TSS._io],word 128
1067
           mov [edi+TSS._io],word 128
1071
           mov [edi+TSS._ss0], os_data
1068
           mov [edi+TSS._ss0], os_data
1072
           mov ebx, [pl0_stack]
1069
           mov ebx, [pl0_stack]
1073
           add ebx, 0x2000-512
1070
           add ebx, RING0_STACK_SIZE
1074
           mov [edi+TSS._esp0],ebx
1071
           mov [edi+TSS._esp0],ebx
Line 1075... Line 1072...
1075
 
1072
 
1076
           mov ecx, edi    ;ecx - address of application TSS
1073
           mov ecx, edi    ;ecx - address of application TSS
1077
           mov ebx,[slot]
1074
           mov ebx,[slot]