/kernel/trunk/core/memory.inc |
---|
1253,22 → 1253,7 |
cmp edx, OS_BASE |
jae .fail |
mov edi, edx |
stdcall load_PE, ecx |
mov esi, eax |
test eax, eax |
jz @F |
push edi |
push DRV_ENTRY |
call eax |
add esp, 8 |
test eax, eax |
jz @F |
mov [eax+SRV.entry], esi |
@@: |
stdcall load_pe_driver, ecx, edx |
mov [esp+32], eax |
ret |
.22: |
1348,7 → 1333,8 |
align 4 |
proc load_pe_driver stdcall, file:dword |
proc load_pe_driver stdcall, file:dword, cmdline:dword |
push esi |
stdcall load_PE, [file] |
test eax, eax |
1355,19 → 1341,24 |
jz .fail |
mov esi, eax |
stdcall eax, DRV_ENTRY |
push [cmdline] |
push DRV_ENTRY |
call eax |
pop ecx |
pop ecx |
test eax, eax |
jz .fail |
mov [eax+SRV.entry], esi |
pop esi |
ret |
.fail: |
xor eax, eax |
pop esi |
ret |
endp |
align 4 |
proc init_mtrr |
1415,9 → 1406,9 |
xor eax, eax |
xor edx, edx |
@@: |
inc ecx |
wrmsr |
inc ecx |
cmp ecx, 0x210 |
cmp ecx, 0x20F |
jb @b |
; enable MTRRs |
pop eax |