Subversion Repositories Kolibri OS

Rev

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

Rev 3786 Rev 4418
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: 3786 $
8
$Revision: 4418 $
9
 
9
 
Line 1251... Line 1251...
1251
        jae     .fail
1251
        jae     .fail
Line 1252... Line 1252...
1252
 
1252
 
1253
        cmp     edx, OS_BASE
1253
        cmp     edx, OS_BASE
Line 1254... Line -...
1254
        jae     .fail
-
 
1255
 
1254
        jae     .fail
1256
        mov     edi, edx
-
 
1257
        stdcall load_PE, ecx
-
 
1258
        mov     esi, eax
-
 
1259
        test    eax, eax
-
 
1260
        jz      @F
-
 
1261
 
-
 
1262
        push    edi
-
 
1263
        push    DRV_ENTRY
-
 
1264
        call    eax
-
 
1265
        add     esp, 8
-
 
1266
        test    eax, eax
-
 
1267
        jz      @F
-
 
1268
 
-
 
1269
        mov     [eax+SRV.entry], esi
-
 
1270
 
1255
 
1271
@@:
1256
        stdcall load_pe_driver, ecx, edx
1272
        mov     [esp+32], eax
1257
        mov     [esp+32], eax
1273
        ret
1258
        ret
1274
.22:
1259
.22:
Line 1346... Line 1331...
1346
           dd f68.26   ; user_unmap
1331
           dd f68.26   ; user_unmap
1347
           dd f68.27   ; load_file_umode
1332
           dd f68.27   ; load_file_umode
Line 1348... Line 1333...
1348
 
1333
 
1349
 
1334
 
-
 
1335
align 4
Line 1350... Line 1336...
1350
align 4
1336
proc load_pe_driver stdcall, file:dword, cmdline:dword
1351
proc load_pe_driver stdcall, file:dword
1337
        push    esi
1352
 
1338
 
Line 1353... Line 1339...
1353
        stdcall load_PE, [file]
1339
        stdcall load_PE, [file]
-
 
1340
        test    eax, eax
1354
        test    eax, eax
1341
        jz      .fail
-
 
1342
 
-
 
1343
        mov     esi, eax
-
 
1344
        push    [cmdline]
1355
        jz      .fail
1345
        push    DRV_ENTRY
1356
 
1346
        call    eax
Line 1357... Line 1347...
1357
        mov     esi, eax
1347
        pop     ecx
-
 
1348
        pop     ecx
1358
        stdcall eax, DRV_ENTRY
1349
        test    eax, eax
Line 1359... Line 1350...
1359
        test    eax, eax
1350
        jz      .fail
1360
        jz      .fail
1351
 
-
 
1352
        mov     [eax+SRV.entry], esi
1361
 
1353
        pop     esi
1362
        mov     [eax+SRV.entry], esi
1354
        ret
Line 1363... Line -...
1363
        ret
-
 
1364
 
1355
 
1365
.fail:
1356
.fail:
Line 1366... Line 1357...
1366
        xor     eax, eax
1357
        xor     eax, eax
1367
        ret
1358
        pop     esi
Line 1413... Line 1404...
1413
        wrmsr
1404
        wrmsr
1414
; clear unused MTRRs
1405
; clear unused MTRRs
1415
        xor     eax, eax
1406
        xor     eax, eax
1416
        xor     edx, edx
1407
        xor     edx, edx
1417
@@:
1408
@@:
1418
        wrmsr
-
 
1419
        inc     ecx
1409
        inc     ecx
-
 
1410
        wrmsr
1420
        cmp     ecx, 0x210
1411
        cmp     ecx, 0x20F
1421
        jb      @b
1412
        jb      @b
1422
; enable MTRRs
1413
; enable MTRRs
1423
        pop     eax
1414
        pop     eax
1424
        or      ah, 8
1415
        or      ah, 8
1425
        and     al, 0xF0; default memtype = UC
1416
        and     al, 0xF0; default memtype = UC