grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug 'out of disk' error.


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: How to debug 'out of disk' error.
Date: Thu, 17 Mar 2011 17:29:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110303 Icedove/3.0.11

On 17.03.2011 17:09, Lennart Sorensen wrote:
> On Wed, Mar 16, 2011 at 11:16:05PM +0100, Vladimir 'φ-coder/phcoder' 
> Serbinenko wrote:
>   
>> It's not really a fixup. Correct return on no error is CF=0 AH=0. Some
>> BIOSes in some other functions returned CF=0, AH!= 0 on no error so it
>> was a wild guess.
>>     
>>> Failed int13_ext call: ah=42, drive=80, dap=   6fe00 returned eax=8000
>>>   
>>>       
>> Error 0x80 according to
>> http://www.delorie.com/djgpp/doc/rbinter/it/34/2.html means timeout.
>> Following code would retry on timeout:
>> === 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 = 4;
>> + retry:
>>    regs.eax = ah << 8;
>>    /* compute the address of disk_address_packet */
>>    regs.ds = (((grub_addr_t) dap) & 0xffff0000) >> 4;
>> @@ -80,6 +82,16 @@
>>    regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
>>  
>>    grub_bios_interrupt (0x13, &regs);
>> +  if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY))
>> +    return 0;
>> +
>> +  if (((regs.eax >> 8) & 0xff) == 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.
>
>   
Another wild guess:
@@ -506,6 +520,8 @@ get_safe_sectors (grub_disk_addr_t secto
   grub_size_t size;
   grub_uint32_t offset;
 
+  return 1;
+
   /* OFFSET = SECTOR % SECTORS */
   grub_divmod64 (sector, sectors, &offset);
 

> 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.
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]