Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q0FlY-00039X-Rs for mharc-grub-devel@gnu.org; Thu, 17 Mar 2011 12:09:37 -0400 Received: from [140.186.70.92] (port=56427 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0FlT-0002sP-W8 for grub-devel@gnu.org; Thu, 17 Mar 2011 12:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0FlO-0000qP-1o for grub-devel@gnu.org; Thu, 17 Mar 2011 12:09:27 -0400 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:55157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0FlN-0000q4-VV for grub-devel@gnu.org; Thu, 17 Mar 2011 12:09:26 -0400 Received: by caffeine.csclub.uwaterloo.ca (Postfix, from userid 20367) id D1E1C1A1; Thu, 17 Mar 2011 12:09:24 -0400 (EDT) Date: Thu, 17 Mar 2011 12:09:24 -0400 To: The development of GNU GRUB Message-ID: <20110317160924.GL343@caffeine.csclub.uwaterloo.ca> References: <20110316151332.GC343@caffeine.csclub.uwaterloo.ca> <4D80D75C.9080007@gmail.com> <20110316173216.GE343@caffeine.csclub.uwaterloo.ca> <4D810D54.1020008@cfl.rr.com> <20110316192358.GG343@caffeine.csclub.uwaterloo.ca> <20110316200908.GH343@caffeine.csclub.uwaterloo.ca> <4D811B40.5090302@gmail.com> <20110316220021.GI343@caffeine.csclub.uwaterloo.ca> <4D8136A5.10502@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D8136A5.10502@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 129.97.134.17 Subject: Re: How to debug 'out of disk' error. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2011 16:09:34 -0000 On Wed, Mar 16, 2011 at 11:16:05PM +0100, Vladimir '=CF=86-coder/phcoder'= Serbinenko wrote: > It's not really a fixup. Correct return on no error is CF=3D0 AH=3D0. S= ome > BIOSes in some other functions returned CF=3D0, AH!=3D 0 on no error so= it > was a wild guess. > > Failed int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 returned e= ax=3D8000 > > =20 > Error 0x80 according to > http://www.delorie.com/djgpp/doc/rbinter/it/34/2.html means timeout. > Following code would retry on timeout: > =3D=3D=3D modified file 'grub-core/disk/i386/pc/biosdisk.c' > --- grub-core/disk/i386/pc/biosdisk.c 2011-01-04 14:42:47 +0000 > +++ grub-core/disk/i386/pc/biosdisk.c 2011-03-16 22:13:12 +0000 > @@ -72,6 +72,8 @@ > grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) > { > struct grub_bios_int_registers regs; > + int tries =3D 4; > + retry: > regs.eax =3D ah << 8; > /* compute the address of disk_address_packet */ > regs.ds =3D (((grub_addr_t) dap) & 0xffff0000) >> 4; > @@ -80,6 +82,16 @@ > regs.flags =3D GRUB_CPU_INT_FLAGS_DEFAULT; > =20 > grub_bios_interrupt (0x13, ®s); > + if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY)) > + return 0; > + > + if (((regs.eax >> 8) & 0xff) =3D=3D 0x80 && tries) > + { > + grub_millisleep (10); > + tries--; > + goto retry; > + } > + > return (regs.eax >> 8) & 0xff; > } So that didn't make any difference to it. It just keeps returning 0x8000 in eax on every retry. I really want to find out what this BIOS is doing wrong so I can tell the system maker what to fix. I am going to add some debuging to find out what is in the dap being passed to the BIOS. --=20 Len Sorensen