Subversion Repositories Kolibri OS

Rev

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

Rev 3555 Rev 3908
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: 3555 $
8
$Revision: 3908 $
9
 
9
 
Line 356... Line 356...
356
             pg_count dd ?
356
             pg_count dd ?
357
           endl
357
           endl
Line 358... Line 358...
358
 
358
 
359
        cmp     dword [LFBAddress], -1
359
        cmp     dword [LFBAddress], -1
360
        jne     @f
360
        jne     @f
361
        mov     [BOOT_VAR+BOOT_MTRR], byte 2
361
        mov     [BOOT_VARS+BOOT_MTRR], byte 2
362
; max VGA=640*480*4=1228800 bytes
362
; max VGA=640*480*4=1228800 bytes
363
; + 32*640*4=81920 bytes for mouse pointer
363
; + 32*640*4=81920 bytes for mouse pointer
Line 364... Line 364...
364
        stdcall alloc_pages, ((1228800+81920)/4096)
364
        stdcall alloc_pages, ((1228800+81920)/4096)
Line 376... Line 376...
376
        mov     [LFBAddress], dword LFB_BASE
376
        mov     [LFBAddress], dword LFB_BASE
377
        ret
377
        ret
378
@@:
378
@@:
379
        test    [SCR_MODE], word 0100000000000000b
379
        test    [SCR_MODE], word 0100000000000000b
380
        jnz     @f
380
        jnz     @f
381
        mov     [BOOT_VAR+BOOT_MTRR], byte 2
381
        mov     [BOOT_VARS+BOOT_MTRR], byte 2
382
        ret
382
        ret
383
@@:
383
@@:
384
        call    init_mtrr
384
        call    init_mtrr
Line 385... Line 385...
385
 
385
 
Line 1197... Line 1197...
1197
        jbe     sys_sheduler
1197
        jbe     sys_sheduler
Line 1198... Line 1198...
1198
 
1198
 
1199
        cmp     ebx, 11
1199
        cmp     ebx, 11
Line 1200... Line 1200...
1200
        jb      .fail
1200
        jb      .fail
1201
 
1201
 
Line 1202... Line 1202...
1202
        cmp     ebx, 25
1202
        cmp     ebx, 27
1203
        ja      .fail
1203
        ja      .fail
1204
 
1204
 
Line 1308... Line 1308...
1308
.26:
1308
.26:
1309
        stdcall user_unmap, ecx, edx, esi
1309
        stdcall user_unmap, ecx, edx, esi
1310
        mov     [esp+32], eax
1310
        mov     [esp+32], eax
1311
        ret
1311
        ret
Line -... Line 1312...
-
 
1312
 
-
 
1313
.27:
-
 
1314
        cmp     ecx, OS_BASE
-
 
1315
        jae     .fail
-
 
1316
 
-
 
1317
        stdcall load_file_umode, ecx
-
 
1318
        mov     [esp+24], edx
-
 
1319
        mov     [esp+32], eax
-
 
1320
        ret
1312
 
1321
 
1313
.fail:
1322
.fail:
1314
        xor     eax, eax
1323
        xor     eax, eax
1315
        mov     [esp+32], eax
1324
        mov     [esp+32], eax
Line 1333... Line 1342...
1333
           dd f68.22   ; shmem_open
1342
           dd f68.22   ; shmem_open
1334
           dd f68.23   ; shmem_close
1343
           dd f68.23   ; shmem_close
1335
           dd f68.24   ; set exception handler
1344
           dd f68.24   ; set exception handler
1336
           dd f68.25   ; unmask exception
1345
           dd f68.25   ; unmask exception
1337
           dd f68.26   ; user_unmap
1346
           dd f68.26   ; user_unmap
-
 
1347
           dd f68.27   ; load_file_umode
Line 1338... Line 1348...
1338
 
1348
 
1339
 
1349
 
Line 1359... Line 1369...
1359
 
1369
 
1360
 
1370
 
Line 1361... Line 1371...
1361
align 4
1371
align 4
1362
proc init_mtrr
1372
proc init_mtrr
Line 1363... Line 1373...
1363
 
1373
 
1364
        cmp     [BOOT_VAR+BOOT_MTRR], byte 2
1374
        cmp     [BOOT_VARS+BOOT_MTRR], byte 2
Line 1454... Line 1464...
1454
        wrmsr
1464
        wrmsr
Line 1455... Line 1465...
1455
 
1465
 
1456
        mov     ebx, [size]
1466
        mov     ebx, [size]
1457
        dec     ebx
1467
        dec     ebx
1458
        mov     eax, 0xFFFFFFFF
1468
        mov     eax, 0xFFFFFFFF
1459
        mov     edx, 0x0000000F
1469
        mov     edx, 0x00000000
1460
        sub     eax, ebx
1470
        sub     eax, ebx
1461
        sbb     edx, 0
1471
        sbb     edx, 0
1462
        or      eax, 0x800
1472
        or      eax, 0x800
1463
        inc     ecx
1473
        inc     ecx