fixed problem with extremely slow work on some machines

git-svn-id: svn://kolibrios.org@821 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2008-07-09 21:46:35 +00:00
parent c6b94086d8
commit 3dac4b35a4

View File

@ -1159,8 +1159,14 @@ proc init_mtrr
mov ecx, 0x2FF mov ecx, 0x2FF
wrmsr ;disable all MTRR wrmsr ;disable all MTRR
stdcall set_mtrr, dword 0,dword 0,[MEM_AMOUNT],MEM_WB mov eax, [MEM_AMOUNT]
stdcall set_mtrr, dword 1,[LFBAddress],[LFBSize],MEM_WC ; round eax up to next power of 2
dec eax
bsr ecx, eax
mov eax, 2
shl eax, cl
stdcall set_mtrr, edx,edx,eax,MEM_WB
stdcall set_mtrr, 1,[LFBAddress],[LFBSize],MEM_WC
xor edx, edx xor edx, edx
xor eax, eax xor eax, eax
mov ecx, 0x204 mov ecx, 0x204