Subversion Repositories Kolibri OS

Rev

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

Rev 2217 Rev 2434
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2009. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2009. 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: 2217 $
8
$Revision: 2434 $
9
 
9
 
Line 164... Line 164...
164
           mov [page_start], eax
164
        mov     [page_start], eax
165
           popfd
165
        popfd
166
           ret
166
        ret
167
endp
167
endp
Line -... Line 168...
-
 
168
 
168
 
169
align 4
Line 169... Line 170...
169
proc map_io_mem stdcall, base:dword, size:dword, flags:dword
170
proc map_io_mem stdcall, base:dword, size:dword, flags:dword
170
 
171
 
171
           push ebx
172
        push    ebx
Line 356... Line 357...
356
           endl
357
           endl
Line 357... Line 358...
357
 
358
 
358
           cmp dword [LFBAddress], -1
359
        cmp     dword [LFBAddress], -1
359
           jne @f
360
        jne     @f
-
 
361
        mov     [BOOT_VAR+0x901c], byte 2
-
 
362
; max VGA=640*480*4=1228800 bytes
360
           mov [BOOT_VAR+0x901c],byte 2
363
; + 32*640*4=81920 bytes for mouse pointer
Line 361... Line 364...
361
           stdcall alloc_pages, (0x280000 / 4096)
364
        stdcall alloc_pages, ((1228800+81920)/4096)
362
 
365
 
363
           push eax
366
        push    eax
364
           call alloc_page
367
        call    alloc_page
365
           stdcall map_page_table, LFB_BASE, eax
368
        stdcall map_page_table, LFB_BASE, eax
366
           pop eax
369
        pop     eax
-
 
370
        or      eax, PG_UW
-
 
371
        mov     ebx, LFB_BASE
367
           or eax, PG_UW
372
; max VGA=640*480*4=1228800 bytes
368
           mov ebx, LFB_BASE
373
; + 32*640*4=81920 bytes for mouse pointer
369
           mov ecx, 0x280000 / 4096
374
        mov     ecx, (1228800+81920)/4096
370
           call commit_pages
375
        call    commit_pages
371
           mov [LFBAddress], dword LFB_BASE
376
        mov     [LFBAddress], dword LFB_BASE
372
           ret
377
        ret
Line 468... Line 473...
468
           push eax
473
        push    eax
469
           invlpg [ebx]
474
        invlpg  [ebx]
470
           pop eax
475
        pop     eax
471
           call free_page
476
        call    free_page
Line -... Line 477...
-
 
477
 
472
 
478
.next:
473
.next:     add edi, 1
479
        add     edi, 1
474
           cmp edi, esi
480
        cmp     edi, esi
Line 475... Line 481...
475
           jb @B
481
        jb      @B
476
 
482
 
Line 795... Line 801...
795
;           test eax, eax
801
;           test eax, eax
796
;           jz @f
802
;           jz @f
797
;          and eax, 0xFFFFF000
803
;          and eax, 0xFFFFF000
798
;           stdcall map_page, edi, eax
804
;           stdcall map_page, edi, eax
Line -... Line 805...
-
 
805
 
799
 
806
@@:
800
@@:        mov edi, [lin_addr]
807
        mov     edi, [lin_addr]
801
           and edi, 0xFFFFF000
808
        and     edi, 0xFFFFF000
802
           mov ecx, [buf_size]
809
        mov     ecx, [buf_size]
803
           add ecx, 4095
810
        add     ecx, 4095
804
           shr ecx, 12
811
        shr     ecx, 12
Line 855... Line 862...
855
           and eax, 0xFFFFF000
862
        and     eax, 0xFFFFF000
856
           test eax, eax
863
        test    eax, eax
857
           jz .exit
864
        jz      .exit
858
           stdcall map_page,edi,eax,PG_UW
865
        stdcall map_page, edi, eax, PG_UW
Line -... Line 866...
-
 
866
 
859
 
867
@@:
860
@@:        mov edi, [lin_addr]
868
        mov     edi, [lin_addr]
861
           and edi, 0xFFFFF000
869
        and     edi, 0xFFFFF000
862
           mov ecx, [buf_size]
870
        mov     ecx, [buf_size]
863
           add ecx, 4095
871
        add     ecx, 4095
864
           shr ecx, 12
872
        shr     ecx, 12
Line 986... Line 994...
986
 
994
 
987
        add edx, ecx
995
        add     edx, ecx
988
        add edx, 4095
996
        add     edx, 4095
Line -... Line 997...
-
 
997
        and     edx, not 4095
989
        and edx, not 4095
998
 
990
 
999
.touch:
991
.touch: mov eax, [ecx]
1000
        mov     eax, [ecx]
992
        add ecx, 0x1000
1001
        add     ecx, 0x1000
Line 993... Line 1002...
993
        cmp ecx, edx
1002
        cmp     ecx, edx
Line 1297... Line 1306...
1297
           jecxz @f
1306
        jecxz   @f
1298
           bts  [eax+APPDATA.except_mask],ecx
1307
        bts     [eax+APPDATA.except_mask], ecx
1299
@@:
1308
@@:
1300
           ret
1309
        ret
Line -... Line 1310...
-
 
1310
 
-
 
1311
.26:
-
 
1312
        stdcall user_unmap, ecx, edx, esi
-
 
1313
        mov     [esp+32], eax
-
 
1314
        ret
1301
 
1315
 
1302
.fail:
1316
.fail:
1303
           xor eax, eax
1317
        xor     eax, eax
1304
           mov [esp+32], eax
1318
        mov     [esp+32], eax
Line 1319... Line 1333...
1319
           dd f68.19   ; load_dll
1333
           dd f68.19   ; load_dll
1320
           dd f68.20   ; user_realloc
1334
           dd f68.20   ; user_realloc
1321
           dd f68.21   ; load_driver
1335
           dd f68.21   ; load_driver
1322
           dd f68.22   ; shmem_open
1336
           dd f68.22   ; shmem_open
1323
           dd f68.23   ; shmem_close
1337
           dd f68.23   ; shmem_close
-
 
1338
           dd f68.24   ; set exception handler
1324
           dd f68.24
1339
           dd f68.25   ; unmask exception
1325
           dd f68.25
1340
           dd f68.26   ; user_unmap
Line 1326... Line 1341...
1326
 
1341
 
1327
 
1342