Subversion Repositories Kolibri OS

Rev

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

Rev 4269 Rev 4423
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: 4269 $
8
$Revision: 4423 $
9
 
9
 
Line 1221... Line 1221...
1221
        jae     .fail
1221
        jae     .fail
Line 1222... Line 1222...
1222
 
1222
 
1223
        cmp     edx, OS_BASE
1223
        cmp     edx, OS_BASE
Line 1224... Line -...
1224
        jae     .fail
-
 
1225
 
1224
        jae     .fail
1226
        mov     edi, edx
-
 
1227
        stdcall load_PE, ecx
-
 
1228
        mov     esi, eax
-
 
1229
        test    eax, eax
-
 
1230
        jz      @F
-
 
1231
 
-
 
1232
        push    edi
-
 
1233
        push    DRV_ENTRY
-
 
1234
        call    eax
-
 
1235
        add     esp, 8
-
 
1236
        test    eax, eax
-
 
1237
        jz      @F
-
 
1238
 
-
 
1239
        mov     [eax+SRV.entry], esi
-
 
1240
 
1225
 
1241
@@:
1226
        stdcall load_pe_driver, ecx, edx
1242
        mov     [esp+32], eax
1227
        mov     [esp+32], eax
1243
        ret
1228
        ret
1244
.22:
1229
.22:
Line 1316... Line 1301...
1316
           dd f68.26   ; user_unmap
1301
           dd f68.26   ; user_unmap
1317
           dd f68.27   ; load_file_umode
1302
           dd f68.27   ; load_file_umode
Line 1318... Line 1303...
1318
 
1303
 
1319
 
1304
 
-
 
1305
align 4
Line 1320... Line 1306...
1320
align 4
1306
proc load_pe_driver stdcall, file:dword, cmdline:dword
1321
proc load_pe_driver stdcall, file:dword
1307
        push    esi
1322
 
1308
 
Line 1323... Line 1309...
1323
        stdcall load_PE, [file]
1309
        stdcall load_PE, [file]
-
 
1310
        test    eax, eax
1324
        test    eax, eax
1311
        jz      .fail
-
 
1312
 
-
 
1313
        mov     esi, eax
-
 
1314
        push    [cmdline]
1325
        jz      .fail
1315
        push    DRV_ENTRY
1326
 
1316
        call    eax
Line 1327... Line 1317...
1327
        mov     esi, eax
1317
        pop     ecx
-
 
1318
        pop     ecx
1328
        stdcall eax, DRV_ENTRY
1319
        test    eax, eax
Line 1329... Line 1320...
1329
        test    eax, eax
1320
        jz      .fail
1330
        jz      .fail
1321
 
-
 
1322
        mov     [eax+SRV.entry], esi
1331
 
1323
        pop     esi
1332
        mov     [eax+SRV.entry], esi
1324
        ret
Line 1333... Line -...
1333
        ret
-
 
1334
 
1325
 
1335
.fail:
1326
.fail:
Line 1336... Line 1327...
1336
        xor     eax, eax
1327
        xor     eax, eax
1337
        ret
1328
        pop     esi
Line 1383... Line 1374...
1383
        wrmsr
1374
        wrmsr
1384
; clear unused MTRRs
1375
; clear unused MTRRs
1385
        xor     eax, eax
1376
        xor     eax, eax
1386
        xor     edx, edx
1377
        xor     edx, edx
1387
@@:
1378
@@:
1388
        wrmsr
-
 
1389
        inc     ecx
1379
        inc     ecx
-
 
1380
        wrmsr
1390
        cmp     ecx, 0x210
1381
        cmp     ecx, 0x20F
1391
        jb      @b
1382
        jb      @b
1392
; enable MTRRs
1383
; enable MTRRs
1393
        pop     eax
1384
        pop     eax
1394
        or      ah, 8
1385
        or      ah, 8
1395
        and     al, 0xF0; default memtype = UC
1386
        and     al, 0xF0; default memtype = UC