On Thu, Aug 28, 2008 at 06:46:03AM +0100, Chris Lamb wrote:
> Package: bochsbios
> Version: 2.3.7-1
> 
> This is a bug that has been discussed somewhat privately until now; I think
> it deserves a real bug report so we can track it better.
> 
> The issue is that a syslinux template is displayed with the Debian logo but
> the text is cut off:
> 
>       "Press F1 for help, or ENTER to"
> 
> It should, obviously, append "boot:" and allow the user to press enter or
> enter parameters, etc. I don't know the full details but I can easily
> reproduce this with Qemu using a Debian Live image.
> 
> Simply waiting about 60 seconds results in the boot prompt appearing. I have
> heard of some workarounds (including setting a high screen resolution!).
> Using GRUB does not cause similar problems.
> 
> I believe aurel32 will reply to this bug adding some more details:
> 
>    < lamby> aurel32: Is there are bug report open for that qemu/syslinux
>             timing issue? If not, could you file one; it is difficult to
>             track.
>  < aurel32> lamby: it's actually not a qemu issue, but a bochsbios issue
>  < aurel32> lamby: please open one, I'll add some details here
>  < aurel32> lamby: though some people are able to reproduce the problem with
>             real bios
> 

Here are some details. This has been broken by commit 1.187 of
rombios.c:

| revision 1.187
| date: 2007/10/14 08:11:05;  author: vruppert;  state: Exp;  lines: +194 -84
| - improved HD recognition and CD boot (patches by Myles Watson)
|   * fixed minor error from printf patch confusion (negation based on wrong 
word)
|   * added helper function await_ide
|   * changed lba calculation to not corrupt lba (for debugging and clarity)
|   * added support for partial completions of ata_cmd_packet (never happens in
|     the simulator, but happens all the time in hardware)
|   * update atapi_request_sense and atapi_is_ready - based on FILO
|   * correct an int 15 call that should have been int 0x15
|   * trivial fix when BX_PCIBIOS and BX_ROMBIOS32 not defined
| - implemented %X in bios_printf (patch by Sebastian)

And more specifically this part of the commit:

--- rombios.c.orig
+++ rombios.c
@@ -2956,28 +2994,34 @@
 ASM_END
 
   if (inout == ATA_DATA_NO) {
+    await_ide(NOT_BSY, iobase1, IDE_TIMEOUT);
     status = inb(iobase1 + ATA_CB_STAT);
     }
   else {
+        Bit16u loops = 0;
+        Bit8u sc;
   while (1) {
 
+      if (loops == 0) {//first time through
+        status = inb(iobase2 + ATA_CB_ASTAT);
+        await_ide(NOT_BSY_DRQ, iobase1, IDE_TIMEOUT);
+      }
+      else
+        await_ide(NOT_BSY, iobase1, IDE_TIMEOUT);
+      loops++;
+
       status = inb(iobase1 + ATA_CB_STAT);
+      sc = inb(iobase1 + ATA_CB_SC);
 
       // Check if command completed
-      if ( (status & (ATA_CB_STAT_BSY | ATA_CB_STAT_DRQ) ) ==0 ) break;
+      if(((inb(iobase1 + ATA_CB_SC)&0x7)==0x3) && 
+         ((status & (ATA_CB_STAT_RDY | ATA_CB_STAT_ERR)) == ATA_CB_STAT_RDY)) 
break;
 
       if (status & ATA_CB_STAT_ERR) {
         BX_DEBUG_ATA("ata_cmd_packet : error (status %02x)\n",status);
         return 3;
       }
 
-      // Device must be ready to send data
-      if ( (status & (ATA_CB_STAT_BSY | ATA_CB_STAT_RDY | ATA_CB_STAT_DRQ | 
ATA_CB_STAT_ERR) )
-            != (ATA_CB_STAT_RDY | ATA_CB_STAT_DRQ) ) {
-        BX_DEBUG_ATA("ata_cmd_packet : not ready (status %02x)\n", status);
-        return 4;
-        }
-
       // Normalize address
       bufseg += (bufoff / 16);
       bufoff %= 16;



-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to