separate USB host controller code into external drivers

git-svn-id: svn://kolibrios.org@4418 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse
2013-12-30 11:18:33 +00:00
parent bcb5772288
commit a10422fbce
23 changed files with 1037 additions and 1171 deletions

View File

@@ -1253,22 +1253,7 @@ f68:
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,26 +1333,32 @@ f68call: ; keep this table closer to main code
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
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 @@ proc init_mtrr
xor eax, eax
xor edx, edx
@@:
wrmsr
inc ecx
cmp ecx, 0x210
wrmsr
cmp ecx, 0x20F
jb @b
; enable MTRRs
pop eax