Subversion Repositories Kolibri OS

Rev

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

Rev 5350 Rev 5356
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5350 $
8
$Revision: 5356 $
Line 9... Line 9...
9
 
9
 
Line 501... Line 501...
501
        mov     ecx, (OS_BASE shr 20)/4
501
        mov     ecx, (OS_BASE shr 20)/4
502
        mov     esi, sys_proc+PROC.pdt_0+(OS_BASE shr 20)
502
        mov     esi, sys_proc+PROC.pdt_0+(OS_BASE shr 20)
503
        rep movsd
503
        rep movsd
Line 504... Line 504...
504
 
504
 
505
        mov     eax, [edi-8192+PROC.pdt_0_phys]
505
        mov     eax, [edi-8192+PROC.pdt_0_phys]
506
        or      eax, PG_SW
506
        or      eax, PG_SWR
Line 507... Line 507...
507
        mov     [edi-4096+(page_tabs shr 20)], eax
507
        mov     [edi-4096+(page_tabs shr 20)], eax
508
 
508
 
Line 527... Line 527...
527
        shl     ecx, 10
527
        shl     ecx, 10
528
        xor     eax, eax
528
        xor     eax, eax
529
        rep stosd
529
        rep stosd
Line 530... Line 530...
530
 
530
 
531
        mov     ecx, [img_pages]
531
        mov     ecx, [img_pages]
532
        mov     ebx, PG_UW
532
        mov     ebx, PG_UWR
533
        xor     edx, edx
533
        xor     edx, edx
534
        mov     esi, [img_base]
534
        mov     esi, [img_base]
535
        shr     esi, 10
535
        shr     esi, 10
536
        add     esi, page_tabs
536
        add     esi, page_tabs
Line 552... Line 552...
552
.alloc:
552
.alloc:
553
        call    alloc_page
553
        call    alloc_page
554
        test    eax, eax
554
        test    eax, eax
555
        jz      .fail
555
        jz      .fail
Line 556... Line 556...
556
 
556
 
557
        stdcall map_page, edx, eax, dword PG_UW
557
        stdcall map_page, edx, eax, dword PG_UWR
558
        add     edx, 0x1000
558
        add     edx, 0x1000
559
        dec     [app_pages]
559
        dec     [app_pages]
Line 560... Line 560...
560
        jnz     .alloc
560
        jnz     .alloc
Line 641... Line 641...
641
.destroy:
641
.destroy:
642
        mov     eax, [esi]
642
        mov     eax, [esi]
643
        test    eax, 1
643
        test    eax, 1
644
        jz      .next
644
        jz      .next
645
        and     eax, not 0xFFF
645
        and     eax, not 0xFFF
646
        stdcall map_page, [tmp_task_ptab], eax, PG_SW
646
        stdcall map_page, [tmp_task_ptab], eax, PG_SWR
647
        stdcall destroy_page_table, [tmp_task_ptab]
647
        stdcall destroy_page_table, [tmp_task_ptab]
648
        mov     eax, [esi]
648
        mov     eax, [esi]
649
        call    free_page
649
        call    free_page
650
.next:
650
.next:
651
        add     esi, 4
651
        add     esi, 4
Line 786... Line 786...
786
@@:
786
@@:
787
        mov     ebx, [offset]
787
        mov     ebx, [offset]
Line 788... Line 788...
788
 
788
 
789
        push    ecx
789
        push    ecx
790
        stdcall map_memEx, [proc_mem_map], \
790
        stdcall map_memEx, [proc_mem_map], \
791
                [slot], ebx, ecx, PG_MAP
791
                [slot], ebx, ecx, PG_READ
Line 792... Line 792...
792
        pop     ecx
792
        pop     ecx
793
 
793
 
794
        mov     esi, [offset]
794
        mov     esi, [offset]
Line 857... Line 857...
857
@@:
857
@@:
858
        mov     ebx, [offset]
858
        mov     ebx, [offset]
859
      ;     add ebx, new_app_base
859
      ;     add ebx, new_app_base
860
        push    ecx
860
        push    ecx
861
        stdcall map_memEx, [proc_mem_map], \
861
        stdcall map_memEx, [proc_mem_map], \
862
                [slot], ebx, ecx, PG_SW
862
                [slot], ebx, ecx, PG_SWR
863
        pop     ecx
863
        pop     ecx
Line 864... Line 864...
864
 
864
 
865
        mov     edi, [offset]
865
        mov     edi, [offset]
866
        and     edi, 0xfff
866
        and     edi, 0xfff