fixed caching of BIOS disks in some rare situations

git-svn-id: svn://kolibrios.org@1150 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-09-05 22:15:36 +00:00
parent ab173f74cc
commit 8861a95ef3

View File

@ -70,15 +70,26 @@ $Revision$
jz .endbd jz .endbd
mov esi,BiosDiskCaches mov esi,BiosDiskCaches
.loopbd: .loopbd:
cmp byte [BiosDisksData+ecx*4+2],-1 push ecx
jnz .contbd movsx ecx,byte [BiosDisksData+ecx*4+2]
inc ecx
jz .getbd
add ecx,ecx
movzx eax,byte [DRIVE_DATA+1]
shl eax,cl
and ah,3
cmp ah,1
jz .contbd
pop ecx
mov byte [BiosDisksData+ecx*4+2], -1
push ecx
.getbd:
mov eax,[cache_ide0_size] mov eax,[cache_ide0_size]
mov [esi+cache_ide0_size-cache_ide0],eax mov [esi+cache_ide0_size-cache_ide0],eax
push ecx
mov cl,1 mov cl,1
call get_cache_ide call get_cache_ide
pop ecx
.contbd: .contbd:
pop ecx
add esi,cache_ide1-cache_ide0 add esi,cache_ide1-cache_ide0
inc ecx inc ecx
cmp ecx,[NumBiosDisks] cmp ecx,[NumBiosDisks]