From 8861a95ef358a3067130da163ce60f9a3e21c4ce Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Sat, 5 Sep 2009 22:15:36 +0000 Subject: [PATCH] fixed caching of BIOS disks in some rare situations git-svn-id: svn://kolibrios.org@1150 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/detect/getcache.inc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/kernel/trunk/detect/getcache.inc b/kernel/trunk/detect/getcache.inc index a9dc35d620..d554bfaec2 100644 --- a/kernel/trunk/detect/getcache.inc +++ b/kernel/trunk/detect/getcache.inc @@ -70,15 +70,26 @@ $Revision$ jz .endbd mov esi,BiosDiskCaches .loopbd: - cmp byte [BiosDisksData+ecx*4+2],-1 - jnz .contbd + push ecx + 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 [esi+cache_ide0_size-cache_ide0],eax - push ecx mov cl,1 call get_cache_ide - pop ecx .contbd: + pop ecx add esi,cache_ide1-cache_ide0 inc ecx cmp ecx,[NumBiosDisks]